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
=== modified file '.project'
--- .project 2012-12-06 10:22:24 +0000
+++ .project 2015-07-20 12:31:15 +0000
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?>1<?xml version="1.0" encoding="UTF-8"?>
2<projectDescription>2<projectDescription>
3 <name>quantum-gateway</name>3 <name>neutron-gateway</name>
4 <comment></comment>4 <comment></comment>
5 <projects>5 <projects>
6 </projects>6 </projects>
77
=== modified file '.pydevproject'
--- .pydevproject 2013-07-19 09:46:25 +0000
+++ .pydevproject 2015-07-20 12:31:15 +0000
@@ -3,7 +3,7 @@
3<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>3<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
4<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>4<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
5<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">5<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
6<path>/quantum-gateway/hooks</path>6<path>/neutron-gateway/hooks</path>
7<path>/quantum-gateway/unit_tests</path>7<path>/neutron-gateway/unit_tests</path>
8</pydev_pathproperty>8</pydev_pathproperty>
9</pydev_project>9</pydev_project>
1010
=== modified file 'hooks/neutron_contexts.py'
--- hooks/neutron_contexts.py 2015-05-07 09:33:38 +0000
+++ hooks/neutron_contexts.py 2015-07-20 12:31:15 +0000
@@ -42,6 +42,7 @@
42NEUTRON_N1KV_PLUGIN = \42NEUTRON_N1KV_PLUGIN = \
43 "neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2"43 "neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2"
44NEUTRON_NSX_PLUGIN = "vmware"44NEUTRON_NSX_PLUGIN = "vmware"
45NEUTRON_OVS_ODL_PLUGIN = "ml2"
4546
46NEUTRON = 'neutron'47NEUTRON = 'neutron'
47QUANTUM = 'quantum'48QUANTUM = 'quantum'
@@ -58,6 +59,7 @@
58NVP = 'nvp'59NVP = 'nvp'
59N1KV = 'n1kv'60N1KV = 'n1kv'
60NSX = 'nsx'61NSX = 'nsx'
62OVS_ODL = 'ovs-odl'
6163
62CORE_PLUGIN = {64CORE_PLUGIN = {
63 QUANTUM: {65 QUANTUM: {
@@ -68,7 +70,8 @@
68 OVS: NEUTRON_OVS_PLUGIN,70 OVS: NEUTRON_OVS_PLUGIN,
69 NVP: NEUTRON_NVP_PLUGIN,71 NVP: NEUTRON_NVP_PLUGIN,
70 N1KV: NEUTRON_N1KV_PLUGIN,72 N1KV: NEUTRON_N1KV_PLUGIN,
71 NSX: NEUTRON_NSX_PLUGIN73 NSX: NEUTRON_NSX_PLUGIN,
74 OVS_ODL: NEUTRON_OVS_ODL_PLUGIN,
72 },75 },
73}76}
7477
7578
=== modified file 'hooks/neutron_utils.py'
--- hooks/neutron_utils.py 2015-07-09 11:02:45 +0000
+++ hooks/neutron_utils.py 2015-07-20 12:31:15 +0000
@@ -62,7 +62,7 @@
62import charmhelpers.contrib.openstack.templating as templating62import charmhelpers.contrib.openstack.templating as templating
63from charmhelpers.contrib.openstack.neutron import headers_package63from charmhelpers.contrib.openstack.neutron import headers_package
64from neutron_contexts import (64from neutron_contexts import (
65 CORE_PLUGIN, OVS, NVP, NSX, N1KV,65 CORE_PLUGIN, OVS, NVP, NSX, N1KV, OVS_ODL,
66 NEUTRON, QUANTUM,66 NEUTRON, QUANTUM,
67 networking_name,67 networking_name,
68 NeutronGatewayContext,68 NeutronGatewayContext,
@@ -153,7 +153,15 @@
153 "nova-api-metadata",153 "nova-api-metadata",
154 "neutron-common",154 "neutron-common",
155 "neutron-l3-agent"155 "neutron-l3-agent"
156 ]156 ],
157 OVS_ODL: [
158 "openvswitch-switch",
159 "neutron-l3-agent",
160 "neutron-dhcp-agent",
161 "nova-api-metadata",
162 "neutron-plugin-metering-agent",
163 "neutron-lbaas-agent",
164 ],
157}165}
158NEUTRON_GATEWAY_PKGS[NSX] = NEUTRON_GATEWAY_PKGS[NVP]166NEUTRON_GATEWAY_PKGS[NSX] = NEUTRON_GATEWAY_PKGS[NVP]
159167
@@ -165,7 +173,8 @@
165EARLY_PACKAGES = {173EARLY_PACKAGES = {
166 OVS: ['openvswitch-datapath-dkms'],174 OVS: ['openvswitch-datapath-dkms'],
167 NVP: [],175 NVP: [],
168 N1KV: []176 N1KV: [],
177 OVS_ODL: [],
169}178}
170179
171LEGACY_HA_TEMPLATE_FILES = 'files'180LEGACY_HA_TEMPLATE_FILES = 'files'
@@ -434,6 +443,58 @@
434}443}
435NEUTRON_OVS_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES)444NEUTRON_OVS_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES)
436445
446NEUTRON_OVS_ODL_CONFIG_FILES = {
447 NEUTRON_CONF: {
448 'hook_contexts': [context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
449 NeutronGatewayContext(),
450 SyslogContext(),
451 context.ZeroMQContext(),
452 context.NotificationDriverContext()],
453 'services': ['neutron-l3-agent',
454 'neutron-dhcp-agent',
455 'neutron-metadata-agent',
456 'neutron-plugin-metering-agent',
457 'neutron-metering-agent',
458 'neutron-lbaas-agent',
459 'neutron-plugin-vpn-agent',
460 'neutron-vpn-agent']
461 },
462 NEUTRON_L3_AGENT_CONF: {
463 'hook_contexts': [NetworkServiceContext(),
464 L3AgentContext(),
465 NeutronGatewayContext()],
466 'services': ['neutron-l3-agent', 'neutron-vpn-agent']
467 },
468 NEUTRON_METERING_AGENT_CONF: {
469 'hook_contexts': [NeutronGatewayContext()],
470 'services': ['neutron-plugin-metering-agent',
471 'neutron-metering-agent']
472 },
473 NEUTRON_LBAAS_AGENT_CONF: {
474 'hook_contexts': [NeutronGatewayContext()],
475 'services': ['neutron-lbaas-agent']
476 },
477 NEUTRON_VPNAAS_AGENT_CONF: {
478 'hook_contexts': [NeutronGatewayContext()],
479 'services': ['neutron-plugin-vpn-agent',
480 'neutron-vpn-agent']
481 },
482 NEUTRON_FWAAS_CONF: {
483 'hook_contexts': [NeutronGatewayContext()],
484 'services': ['neutron-l3-agent', 'neutron-vpn-agent']
485 },
486 EXT_PORT_CONF: {
487 'hook_contexts': [ExternalPortContext()],
488 'services': ['ext-port']
489 },
490 PHY_NIC_MTU_CONF: {
491 'hook_contexts': [PhyNICMTUContext()],
492 'services': ['os-charm-phy-nic-mtu']
493 }
494}
495NEUTRON_OVS_ODL_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES)
496
497
437QUANTUM_NVP_CONFIG_FILES = {498QUANTUM_NVP_CONFIG_FILES = {
438 QUANTUM_CONF: {499 QUANTUM_CONF: {
439 'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR),500 'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR),
@@ -482,6 +543,7 @@
482 NVP: NEUTRON_NVP_CONFIG_FILES,543 NVP: NEUTRON_NVP_CONFIG_FILES,
483 OVS: NEUTRON_OVS_CONFIG_FILES,544 OVS: NEUTRON_OVS_CONFIG_FILES,
484 N1KV: NEUTRON_N1KV_CONFIG_FILES,545 N1KV: NEUTRON_N1KV_CONFIG_FILES,
546 OVS_ODL: NEUTRON_OVS_ODL_CONFIG_FILES
485 },547 },
486}548}
487549
@@ -668,7 +730,7 @@
668730
669731
670def configure_ovs():732def configure_ovs():
671 if config('plugin') == OVS:733 if config('plugin') in [OVS, OVS_ODL]:
672 if not service_running('openvswitch-switch'):734 if not service_running('openvswitch-switch'):
673 full_restart()735 full_restart()
674 add_bridge(INT_BRIDGE)736 add_bridge(INT_BRIDGE)
675737
=== modified file 'unit_tests/test_neutron_utils.py'
--- unit_tests/test_neutron_utils.py 2015-07-09 11:02:45 +0000
+++ unit_tests/test_neutron_utils.py 2015-07-20 12:31:15 +0000
@@ -265,6 +265,26 @@
265 ['hook_contexts']265 ['hook_contexts']
266 )266 )
267267
268 def test_register_configs_ovs_odl(self):
269 self.config.side_effect = self.test_config.get
270 self.test_config.set('plugin', 'ovs-odl')
271 self.is_relation_made.return_value = False
272 self.get_os_codename_install_source.return_value = 'icehouse'
273 configs = neutron_utils.register_configs()
274 confs = [neutron_utils.NEUTRON_DHCP_AGENT_CONF,
275 neutron_utils.NEUTRON_METADATA_AGENT_CONF,
276 neutron_utils.NOVA_CONF,
277 neutron_utils.NEUTRON_CONF,
278 neutron_utils.NEUTRON_L3_AGENT_CONF,
279 neutron_utils.EXT_PORT_CONF]
280 for conf in confs:
281 configs.register.assert_any_call(
282 conf,
283 neutron_utils.CONFIG_FILES['neutron']
284 [neutron_utils.OVS_ODL][conf]
285 ['hook_contexts']
286 )
287
268 def test_register_configs_amqp_nova(self):288 def test_register_configs_amqp_nova(self):
269 self.config.return_value = 'ovs'289 self.config.return_value = 'ovs'
270 self.is_relation_made.return_value = True290 self.is_relation_made.return_value = True
@@ -320,6 +340,40 @@
320340
321 self.assertDictEqual(neutron_utils.restart_map(), ex_map)341 self.assertDictEqual(neutron_utils.restart_map(), ex_map)
322342
343 def test_restart_map_ovs_odl(self):
344 self.config.return_value = 'ovs-odl'
345 self.get_os_codename_install_source.return_value = 'icehouse'
346 ex_map = {
347 neutron_utils.NEUTRON_CONF: ['neutron-l3-agent',
348 'neutron-dhcp-agent',
349 'neutron-metadata-agent',
350 'neutron-plugin-metering-agent',
351 'neutron-metering-agent',
352 'neutron-lbaas-agent',
353 'neutron-plugin-vpn-agent',
354 'neutron-vpn-agent'],
355 neutron_utils.NEUTRON_DNSMASQ_CONF: ['neutron-dhcp-agent'],
356 neutron_utils.NEUTRON_LBAAS_AGENT_CONF:
357 ['neutron-lbaas-agent'],
358 neutron_utils.NEUTRON_METADATA_AGENT_CONF:
359 ['neutron-metadata-agent'],
360 neutron_utils.NEUTRON_VPNAAS_AGENT_CONF: [
361 'neutron-plugin-vpn-agent',
362 'neutron-vpn-agent'],
363 neutron_utils.NEUTRON_L3_AGENT_CONF: ['neutron-l3-agent',
364 'neutron-vpn-agent'],
365 neutron_utils.NEUTRON_DHCP_AGENT_CONF: ['neutron-dhcp-agent'],
366 neutron_utils.NEUTRON_FWAAS_CONF: ['neutron-l3-agent',
367 'neutron-vpn-agent'],
368 neutron_utils.NEUTRON_METERING_AGENT_CONF:
369 ['neutron-metering-agent', 'neutron-plugin-metering-agent'],
370 neutron_utils.NOVA_CONF: ['nova-api-metadata'],
371 neutron_utils.EXT_PORT_CONF: ['ext-port'],
372 neutron_utils.PHY_NIC_MTU_CONF: ['os-charm-phy-nic-mtu'],
373 }
374
375 self.assertDictEqual(neutron_utils.restart_map(), ex_map)
376
323 def test_register_configs_nvp(self):377 def test_register_configs_nvp(self):
324 self.config.return_value = 'nvp'378 self.config.return_value = 'nvp'
325 self.is_relation_made.return_value = False379 self.is_relation_made.return_value = False

Subscribers

People subscribed via source and target branches