Merge lp:~sdn-charmers/charms/trusty/neutron-gateway/ovs-odl into lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next

Proposed by James Page
Status: Merged
Merged at revision: 144
Proposed branch: lp:~sdn-charmers/charms/trusty/neutron-gateway/ovs-odl
Merge into: lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next
Diff against target: 243 lines (+127/-8)
5 files modified
.project (+1/-1)
.pydevproject (+2/-2)
hooks/neutron_contexts.py (+4/-1)
hooks/neutron_utils.py (+66/-4)
unit_tests/test_neutron_utils.py (+54/-0)
To merge this branch: bzr merge lp:~sdn-charmers/charms/trusty/neutron-gateway/ovs-odl
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+265237@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #6503 neutron-gateway-next for james-page mp265237
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.

Full lint test output: http://paste.ubuntu.com/11908130/
Build: http://10.245.162.77:8080/job/charm_lint_check/6503/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #6135 neutron-gateway-next for james-page mp265237
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/6135/

Revision history for this message
Edward Hope-Morley (hopem) :
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #5225 neutron-gateway-next for james-page mp265237
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/11908462/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5225/

129. By James Page

Drop surplus packages for ovs-odl

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #6506 neutron-gateway-next for james-page mp265237
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.

Full lint test output: http://paste.ubuntu.com/11908678/
Build: http://10.245.162.77:8080/job/charm_lint_check/6506/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #6138 neutron-gateway-next for james-page mp265237
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/6138/

130. By James Page

Tidy lint

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #5228 neutron-gateway-next for james-page mp265237
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/11908979/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5228/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #6507 neutron-gateway-next for james-page mp265237
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/6507/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #6139 neutron-gateway-next for james-page mp265237
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/6139/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #5229 neutron-gateway-next for james-page mp265237
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/11909385/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5229/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.project'
2--- .project 2012-12-06 10:22:24 +0000
3+++ .project 2015-07-20 12:31:15 +0000
4@@ -1,6 +1,6 @@
5 <?xml version="1.0" encoding="UTF-8"?>
6 <projectDescription>
7- <name>quantum-gateway</name>
8+ <name>neutron-gateway</name>
9 <comment></comment>
10 <projects>
11 </projects>
12
13=== modified file '.pydevproject'
14--- .pydevproject 2013-07-19 09:46:25 +0000
15+++ .pydevproject 2015-07-20 12:31:15 +0000
16@@ -3,7 +3,7 @@
17 <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
18 <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
19 <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
20-<path>/quantum-gateway/hooks</path>
21-<path>/quantum-gateway/unit_tests</path>
22+<path>/neutron-gateway/hooks</path>
23+<path>/neutron-gateway/unit_tests</path>
24 </pydev_pathproperty>
25 </pydev_project>
26
27=== modified file 'hooks/neutron_contexts.py'
28--- hooks/neutron_contexts.py 2015-05-07 09:33:38 +0000
29+++ hooks/neutron_contexts.py 2015-07-20 12:31:15 +0000
30@@ -42,6 +42,7 @@
31 NEUTRON_N1KV_PLUGIN = \
32 "neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2"
33 NEUTRON_NSX_PLUGIN = "vmware"
34+NEUTRON_OVS_ODL_PLUGIN = "ml2"
35
36 NEUTRON = 'neutron'
37 QUANTUM = 'quantum'
38@@ -58,6 +59,7 @@
39 NVP = 'nvp'
40 N1KV = 'n1kv'
41 NSX = 'nsx'
42+OVS_ODL = 'ovs-odl'
43
44 CORE_PLUGIN = {
45 QUANTUM: {
46@@ -68,7 +70,8 @@
47 OVS: NEUTRON_OVS_PLUGIN,
48 NVP: NEUTRON_NVP_PLUGIN,
49 N1KV: NEUTRON_N1KV_PLUGIN,
50- NSX: NEUTRON_NSX_PLUGIN
51+ NSX: NEUTRON_NSX_PLUGIN,
52+ OVS_ODL: NEUTRON_OVS_ODL_PLUGIN,
53 },
54 }
55
56
57=== modified file 'hooks/neutron_utils.py'
58--- hooks/neutron_utils.py 2015-07-09 11:02:45 +0000
59+++ hooks/neutron_utils.py 2015-07-20 12:31:15 +0000
60@@ -62,7 +62,7 @@
61 import charmhelpers.contrib.openstack.templating as templating
62 from charmhelpers.contrib.openstack.neutron import headers_package
63 from neutron_contexts import (
64- CORE_PLUGIN, OVS, NVP, NSX, N1KV,
65+ CORE_PLUGIN, OVS, NVP, NSX, N1KV, OVS_ODL,
66 NEUTRON, QUANTUM,
67 networking_name,
68 NeutronGatewayContext,
69@@ -153,7 +153,15 @@
70 "nova-api-metadata",
71 "neutron-common",
72 "neutron-l3-agent"
73- ]
74+ ],
75+ OVS_ODL: [
76+ "openvswitch-switch",
77+ "neutron-l3-agent",
78+ "neutron-dhcp-agent",
79+ "nova-api-metadata",
80+ "neutron-plugin-metering-agent",
81+ "neutron-lbaas-agent",
82+ ],
83 }
84 NEUTRON_GATEWAY_PKGS[NSX] = NEUTRON_GATEWAY_PKGS[NVP]
85
86@@ -165,7 +173,8 @@
87 EARLY_PACKAGES = {
88 OVS: ['openvswitch-datapath-dkms'],
89 NVP: [],
90- N1KV: []
91+ N1KV: [],
92+ OVS_ODL: [],
93 }
94
95 LEGACY_HA_TEMPLATE_FILES = 'files'
96@@ -434,6 +443,58 @@
97 }
98 NEUTRON_OVS_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES)
99
100+NEUTRON_OVS_ODL_CONFIG_FILES = {
101+ NEUTRON_CONF: {
102+ 'hook_contexts': [context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
103+ NeutronGatewayContext(),
104+ SyslogContext(),
105+ context.ZeroMQContext(),
106+ context.NotificationDriverContext()],
107+ 'services': ['neutron-l3-agent',
108+ 'neutron-dhcp-agent',
109+ 'neutron-metadata-agent',
110+ 'neutron-plugin-metering-agent',
111+ 'neutron-metering-agent',
112+ 'neutron-lbaas-agent',
113+ 'neutron-plugin-vpn-agent',
114+ 'neutron-vpn-agent']
115+ },
116+ NEUTRON_L3_AGENT_CONF: {
117+ 'hook_contexts': [NetworkServiceContext(),
118+ L3AgentContext(),
119+ NeutronGatewayContext()],
120+ 'services': ['neutron-l3-agent', 'neutron-vpn-agent']
121+ },
122+ NEUTRON_METERING_AGENT_CONF: {
123+ 'hook_contexts': [NeutronGatewayContext()],
124+ 'services': ['neutron-plugin-metering-agent',
125+ 'neutron-metering-agent']
126+ },
127+ NEUTRON_LBAAS_AGENT_CONF: {
128+ 'hook_contexts': [NeutronGatewayContext()],
129+ 'services': ['neutron-lbaas-agent']
130+ },
131+ NEUTRON_VPNAAS_AGENT_CONF: {
132+ 'hook_contexts': [NeutronGatewayContext()],
133+ 'services': ['neutron-plugin-vpn-agent',
134+ 'neutron-vpn-agent']
135+ },
136+ NEUTRON_FWAAS_CONF: {
137+ 'hook_contexts': [NeutronGatewayContext()],
138+ 'services': ['neutron-l3-agent', 'neutron-vpn-agent']
139+ },
140+ EXT_PORT_CONF: {
141+ 'hook_contexts': [ExternalPortContext()],
142+ 'services': ['ext-port']
143+ },
144+ PHY_NIC_MTU_CONF: {
145+ 'hook_contexts': [PhyNICMTUContext()],
146+ 'services': ['os-charm-phy-nic-mtu']
147+ }
148+}
149+NEUTRON_OVS_ODL_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES)
150+
151+
152 QUANTUM_NVP_CONFIG_FILES = {
153 QUANTUM_CONF: {
154 'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR),
155@@ -482,6 +543,7 @@
156 NVP: NEUTRON_NVP_CONFIG_FILES,
157 OVS: NEUTRON_OVS_CONFIG_FILES,
158 N1KV: NEUTRON_N1KV_CONFIG_FILES,
159+ OVS_ODL: NEUTRON_OVS_ODL_CONFIG_FILES
160 },
161 }
162
163@@ -668,7 +730,7 @@
164
165
166 def configure_ovs():
167- if config('plugin') == OVS:
168+ if config('plugin') in [OVS, OVS_ODL]:
169 if not service_running('openvswitch-switch'):
170 full_restart()
171 add_bridge(INT_BRIDGE)
172
173=== modified file 'unit_tests/test_neutron_utils.py'
174--- unit_tests/test_neutron_utils.py 2015-07-09 11:02:45 +0000
175+++ unit_tests/test_neutron_utils.py 2015-07-20 12:31:15 +0000
176@@ -265,6 +265,26 @@
177 ['hook_contexts']
178 )
179
180+ def test_register_configs_ovs_odl(self):
181+ self.config.side_effect = self.test_config.get
182+ self.test_config.set('plugin', 'ovs-odl')
183+ self.is_relation_made.return_value = False
184+ self.get_os_codename_install_source.return_value = 'icehouse'
185+ configs = neutron_utils.register_configs()
186+ confs = [neutron_utils.NEUTRON_DHCP_AGENT_CONF,
187+ neutron_utils.NEUTRON_METADATA_AGENT_CONF,
188+ neutron_utils.NOVA_CONF,
189+ neutron_utils.NEUTRON_CONF,
190+ neutron_utils.NEUTRON_L3_AGENT_CONF,
191+ neutron_utils.EXT_PORT_CONF]
192+ for conf in confs:
193+ configs.register.assert_any_call(
194+ conf,
195+ neutron_utils.CONFIG_FILES['neutron']
196+ [neutron_utils.OVS_ODL][conf]
197+ ['hook_contexts']
198+ )
199+
200 def test_register_configs_amqp_nova(self):
201 self.config.return_value = 'ovs'
202 self.is_relation_made.return_value = True
203@@ -320,6 +340,40 @@
204
205 self.assertDictEqual(neutron_utils.restart_map(), ex_map)
206
207+ def test_restart_map_ovs_odl(self):
208+ self.config.return_value = 'ovs-odl'
209+ self.get_os_codename_install_source.return_value = 'icehouse'
210+ ex_map = {
211+ neutron_utils.NEUTRON_CONF: ['neutron-l3-agent',
212+ 'neutron-dhcp-agent',
213+ 'neutron-metadata-agent',
214+ 'neutron-plugin-metering-agent',
215+ 'neutron-metering-agent',
216+ 'neutron-lbaas-agent',
217+ 'neutron-plugin-vpn-agent',
218+ 'neutron-vpn-agent'],
219+ neutron_utils.NEUTRON_DNSMASQ_CONF: ['neutron-dhcp-agent'],
220+ neutron_utils.NEUTRON_LBAAS_AGENT_CONF:
221+ ['neutron-lbaas-agent'],
222+ neutron_utils.NEUTRON_METADATA_AGENT_CONF:
223+ ['neutron-metadata-agent'],
224+ neutron_utils.NEUTRON_VPNAAS_AGENT_CONF: [
225+ 'neutron-plugin-vpn-agent',
226+ 'neutron-vpn-agent'],
227+ neutron_utils.NEUTRON_L3_AGENT_CONF: ['neutron-l3-agent',
228+ 'neutron-vpn-agent'],
229+ neutron_utils.NEUTRON_DHCP_AGENT_CONF: ['neutron-dhcp-agent'],
230+ neutron_utils.NEUTRON_FWAAS_CONF: ['neutron-l3-agent',
231+ 'neutron-vpn-agent'],
232+ neutron_utils.NEUTRON_METERING_AGENT_CONF:
233+ ['neutron-metering-agent', 'neutron-plugin-metering-agent'],
234+ neutron_utils.NOVA_CONF: ['nova-api-metadata'],
235+ neutron_utils.EXT_PORT_CONF: ['ext-port'],
236+ neutron_utils.PHY_NIC_MTU_CONF: ['os-charm-phy-nic-mtu'],
237+ }
238+
239+ self.assertDictEqual(neutron_utils.restart_map(), ex_map)
240+
241 def test_register_configs_nvp(self):
242 self.config.return_value = 'nvp'
243 self.is_relation_made.return_value = False

Subscribers

People subscribed via source and target branches