Merge lp:~ivoks/charms/precise/nova-cloud-controller/neutron-url into lp:~ivoks/charms/precise/nova-cloud-controller/tls-ha

Proposed by Ante Karamatić
Status: Merged
Merged at revision: 67
Proposed branch: lp:~ivoks/charms/precise/nova-cloud-controller/neutron-url
Merge into: lp:~ivoks/charms/precise/nova-cloud-controller/tls-ha
Diff against target: 62 lines (+20/-2)
3 files modified
hooks/charmhelpers/contrib/openstack/context.py (+17/-1)
revision (+1/-1)
templates/folsom/nova.conf (+2/-0)
To merge this branch: bzr merge lp:~ivoks/charms/precise/nova-cloud-controller/neutron-url
Reviewer Review Type Date Requested Status
Ante Karamatić Pending
Review via email: mp+206679@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/charmhelpers/contrib/openstack/context.py'
2--- hooks/charmhelpers/contrib/openstack/context.py 2014-02-16 19:17:42 +0000
3+++ hooks/charmhelpers/contrib/openstack/context.py 2014-02-17 10:37:45 +0000
4@@ -410,6 +410,22 @@
5
6 return nvp_ctxt
7
8+ def neutron_ctxt(self):
9+ if https():
10+ proto = 'https'
11+ else:
12+ proto = 'http'
13+ if is_clustered():
14+ host = config()['vip']
15+ else:
16+ host = unit_get('private-address')
17+ url = proto + '://' + host + ':9696'
18+ ctxt = {
19+ 'network_manager': self.network_manager,
20+ 'neutron_url': url,
21+ }
22+ return ctxt
23+
24 def __call__(self):
25 self._ensure_packages()
26
27@@ -419,7 +435,7 @@
28 if not self.plugin:
29 return {}
30
31- ctxt = {'network_manager': self.network_manager}
32+ ctxt = self.neutron_ctxt()
33
34 if self.plugin == 'ovs':
35 ctxt.update(self.ovs_ctxt())
36
37=== modified file 'revision'
38--- revision 2014-02-14 20:56:58 +0000
39+++ revision 2014-02-17 10:37:45 +0000
40@@ -1,1 +1,1 @@
41-313
42+331
43
44=== modified file 'templates/folsom/nova.conf'
45--- templates/folsom/nova.conf 2014-02-03 13:32:52 +0000
46+++ templates/folsom/nova.conf 2014-02-17 10:37:45 +0000
47@@ -73,6 +73,7 @@
48
49 {% if network_manager and network_manager == 'quantum' -%}
50 network_api_class = nova.network.quantumv2.api.API
51+quantum_url = {{ neutron_url }}
52 {% if auth_host -%}
53 quantum_auth_strategy = keystone
54 quantum_admin_tenant_name = {{ admin_tenant_name }}
55@@ -82,6 +83,7 @@
56 {% endif -%}
57 {% elif network_manager and network_manager == 'neutron' -%}
58 network_api_class = nova.network.neutronv2.api.API
59+neutron_url = {{ neutron_url }}
60 {% if auth_host -%}
61 neutron_auth_strategy = keystone
62 neutron_admin_tenant_name = {{ admin_tenant_name }}

Subscribers

People subscribed via source and target branches

to all changes: