Merge lp:~sdn-charmers/charms/trusty/neutron-gateway/ovs-odl into lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next
- Trusty Tahr (14.04)
- ovs-odl
- Merge into next
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenStack Charmers | Pending | ||
Review via email: mp+265237@code.launchpad.net |
Commit message
Description of the change
uosci-testing-bot (uosci-testing-bot) wrote : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #6135 neutron-
UNIT OK: passed
Edward Hope-Morley (hopem) : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5225 neutron-
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://
Build: http://
- 129. By James Page
-
Drop surplus packages for ovs-odl
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6506 neutron-
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://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #6138 neutron-
UNIT OK: passed
- 130. By James Page
-
Tidy lint
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5228 neutron-
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://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6507 neutron-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #6139 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5229 neutron-
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://
Build: http://
Preview Diff
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 | 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
6 | 2 | <projectDescription> | 2 | <projectDescription> |
8 | 3 | <name>quantum-gateway</name> | 3 | <name>neutron-gateway</name> |
9 | 4 | <comment></comment> | 4 | <comment></comment> |
10 | 5 | <projects> | 5 | <projects> |
11 | 6 | </projects> | 6 | </projects> |
12 | 7 | 7 | ||
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 | 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> |
18 | 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> |
19 | 5 | <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> | 5 | <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> |
22 | 6 | <path>/quantum-gateway/hooks</path> | 6 | <path>/neutron-gateway/hooks</path> |
23 | 7 | <path>/quantum-gateway/unit_tests</path> | 7 | <path>/neutron-gateway/unit_tests</path> |
24 | 8 | </pydev_pathproperty> | 8 | </pydev_pathproperty> |
25 | 9 | </pydev_project> | 9 | </pydev_project> |
26 | 10 | 10 | ||
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 | 42 | NEUTRON_N1KV_PLUGIN = \ | 42 | NEUTRON_N1KV_PLUGIN = \ |
32 | 43 | "neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2" | 43 | "neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2" |
33 | 44 | NEUTRON_NSX_PLUGIN = "vmware" | 44 | NEUTRON_NSX_PLUGIN = "vmware" |
34 | 45 | NEUTRON_OVS_ODL_PLUGIN = "ml2" | ||
35 | 45 | 46 | ||
36 | 46 | NEUTRON = 'neutron' | 47 | NEUTRON = 'neutron' |
37 | 47 | QUANTUM = 'quantum' | 48 | QUANTUM = 'quantum' |
38 | @@ -58,6 +59,7 @@ | |||
39 | 58 | NVP = 'nvp' | 59 | NVP = 'nvp' |
40 | 59 | N1KV = 'n1kv' | 60 | N1KV = 'n1kv' |
41 | 60 | NSX = 'nsx' | 61 | NSX = 'nsx' |
42 | 62 | OVS_ODL = 'ovs-odl' | ||
43 | 61 | 63 | ||
44 | 62 | CORE_PLUGIN = { | 64 | CORE_PLUGIN = { |
45 | 63 | QUANTUM: { | 65 | QUANTUM: { |
46 | @@ -68,7 +70,8 @@ | |||
47 | 68 | OVS: NEUTRON_OVS_PLUGIN, | 70 | OVS: NEUTRON_OVS_PLUGIN, |
48 | 69 | NVP: NEUTRON_NVP_PLUGIN, | 71 | NVP: NEUTRON_NVP_PLUGIN, |
49 | 70 | N1KV: NEUTRON_N1KV_PLUGIN, | 72 | N1KV: NEUTRON_N1KV_PLUGIN, |
51 | 71 | NSX: NEUTRON_NSX_PLUGIN | 73 | NSX: NEUTRON_NSX_PLUGIN, |
52 | 74 | OVS_ODL: NEUTRON_OVS_ODL_PLUGIN, | ||
53 | 72 | }, | 75 | }, |
54 | 73 | } | 76 | } |
55 | 74 | 77 | ||
56 | 75 | 78 | ||
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 | 62 | import charmhelpers.contrib.openstack.templating as templating | 62 | import charmhelpers.contrib.openstack.templating as templating |
62 | 63 | from charmhelpers.contrib.openstack.neutron import headers_package | 63 | from charmhelpers.contrib.openstack.neutron import headers_package |
63 | 64 | from neutron_contexts import ( | 64 | from neutron_contexts import ( |
65 | 65 | CORE_PLUGIN, OVS, NVP, NSX, N1KV, | 65 | CORE_PLUGIN, OVS, NVP, NSX, N1KV, OVS_ODL, |
66 | 66 | NEUTRON, QUANTUM, | 66 | NEUTRON, QUANTUM, |
67 | 67 | networking_name, | 67 | networking_name, |
68 | 68 | NeutronGatewayContext, | 68 | NeutronGatewayContext, |
69 | @@ -153,7 +153,15 @@ | |||
70 | 153 | "nova-api-metadata", | 153 | "nova-api-metadata", |
71 | 154 | "neutron-common", | 154 | "neutron-common", |
72 | 155 | "neutron-l3-agent" | 155 | "neutron-l3-agent" |
74 | 156 | ] | 156 | ], |
75 | 157 | OVS_ODL: [ | ||
76 | 158 | "openvswitch-switch", | ||
77 | 159 | "neutron-l3-agent", | ||
78 | 160 | "neutron-dhcp-agent", | ||
79 | 161 | "nova-api-metadata", | ||
80 | 162 | "neutron-plugin-metering-agent", | ||
81 | 163 | "neutron-lbaas-agent", | ||
82 | 164 | ], | ||
83 | 157 | } | 165 | } |
84 | 158 | NEUTRON_GATEWAY_PKGS[NSX] = NEUTRON_GATEWAY_PKGS[NVP] | 166 | NEUTRON_GATEWAY_PKGS[NSX] = NEUTRON_GATEWAY_PKGS[NVP] |
85 | 159 | 167 | ||
86 | @@ -165,7 +173,8 @@ | |||
87 | 165 | EARLY_PACKAGES = { | 173 | EARLY_PACKAGES = { |
88 | 166 | OVS: ['openvswitch-datapath-dkms'], | 174 | OVS: ['openvswitch-datapath-dkms'], |
89 | 167 | NVP: [], | 175 | NVP: [], |
91 | 168 | N1KV: [] | 176 | N1KV: [], |
92 | 177 | OVS_ODL: [], | ||
93 | 169 | } | 178 | } |
94 | 170 | 179 | ||
95 | 171 | LEGACY_HA_TEMPLATE_FILES = 'files' | 180 | LEGACY_HA_TEMPLATE_FILES = 'files' |
96 | @@ -434,6 +443,58 @@ | |||
97 | 434 | } | 443 | } |
98 | 435 | NEUTRON_OVS_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES) | 444 | NEUTRON_OVS_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES) |
99 | 436 | 445 | ||
100 | 446 | NEUTRON_OVS_ODL_CONFIG_FILES = { | ||
101 | 447 | NEUTRON_CONF: { | ||
102 | 448 | 'hook_contexts': [context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR), | ||
103 | 449 | NeutronGatewayContext(), | ||
104 | 450 | SyslogContext(), | ||
105 | 451 | context.ZeroMQContext(), | ||
106 | 452 | context.NotificationDriverContext()], | ||
107 | 453 | 'services': ['neutron-l3-agent', | ||
108 | 454 | 'neutron-dhcp-agent', | ||
109 | 455 | 'neutron-metadata-agent', | ||
110 | 456 | 'neutron-plugin-metering-agent', | ||
111 | 457 | 'neutron-metering-agent', | ||
112 | 458 | 'neutron-lbaas-agent', | ||
113 | 459 | 'neutron-plugin-vpn-agent', | ||
114 | 460 | 'neutron-vpn-agent'] | ||
115 | 461 | }, | ||
116 | 462 | NEUTRON_L3_AGENT_CONF: { | ||
117 | 463 | 'hook_contexts': [NetworkServiceContext(), | ||
118 | 464 | L3AgentContext(), | ||
119 | 465 | NeutronGatewayContext()], | ||
120 | 466 | 'services': ['neutron-l3-agent', 'neutron-vpn-agent'] | ||
121 | 467 | }, | ||
122 | 468 | NEUTRON_METERING_AGENT_CONF: { | ||
123 | 469 | 'hook_contexts': [NeutronGatewayContext()], | ||
124 | 470 | 'services': ['neutron-plugin-metering-agent', | ||
125 | 471 | 'neutron-metering-agent'] | ||
126 | 472 | }, | ||
127 | 473 | NEUTRON_LBAAS_AGENT_CONF: { | ||
128 | 474 | 'hook_contexts': [NeutronGatewayContext()], | ||
129 | 475 | 'services': ['neutron-lbaas-agent'] | ||
130 | 476 | }, | ||
131 | 477 | NEUTRON_VPNAAS_AGENT_CONF: { | ||
132 | 478 | 'hook_contexts': [NeutronGatewayContext()], | ||
133 | 479 | 'services': ['neutron-plugin-vpn-agent', | ||
134 | 480 | 'neutron-vpn-agent'] | ||
135 | 481 | }, | ||
136 | 482 | NEUTRON_FWAAS_CONF: { | ||
137 | 483 | 'hook_contexts': [NeutronGatewayContext()], | ||
138 | 484 | 'services': ['neutron-l3-agent', 'neutron-vpn-agent'] | ||
139 | 485 | }, | ||
140 | 486 | EXT_PORT_CONF: { | ||
141 | 487 | 'hook_contexts': [ExternalPortContext()], | ||
142 | 488 | 'services': ['ext-port'] | ||
143 | 489 | }, | ||
144 | 490 | PHY_NIC_MTU_CONF: { | ||
145 | 491 | 'hook_contexts': [PhyNICMTUContext()], | ||
146 | 492 | 'services': ['os-charm-phy-nic-mtu'] | ||
147 | 493 | } | ||
148 | 494 | } | ||
149 | 495 | NEUTRON_OVS_ODL_CONFIG_FILES.update(NEUTRON_SHARED_CONFIG_FILES) | ||
150 | 496 | |||
151 | 497 | |||
152 | 437 | QUANTUM_NVP_CONFIG_FILES = { | 498 | QUANTUM_NVP_CONFIG_FILES = { |
153 | 438 | QUANTUM_CONF: { | 499 | QUANTUM_CONF: { |
154 | 439 | 'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR), | 500 | 'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR), |
155 | @@ -482,6 +543,7 @@ | |||
156 | 482 | NVP: NEUTRON_NVP_CONFIG_FILES, | 543 | NVP: NEUTRON_NVP_CONFIG_FILES, |
157 | 483 | OVS: NEUTRON_OVS_CONFIG_FILES, | 544 | OVS: NEUTRON_OVS_CONFIG_FILES, |
158 | 484 | N1KV: NEUTRON_N1KV_CONFIG_FILES, | 545 | N1KV: NEUTRON_N1KV_CONFIG_FILES, |
159 | 546 | OVS_ODL: NEUTRON_OVS_ODL_CONFIG_FILES | ||
160 | 485 | }, | 547 | }, |
161 | 486 | } | 548 | } |
162 | 487 | 549 | ||
163 | @@ -668,7 +730,7 @@ | |||
164 | 668 | 730 | ||
165 | 669 | 731 | ||
166 | 670 | def configure_ovs(): | 732 | def configure_ovs(): |
168 | 671 | if config('plugin') == OVS: | 733 | if config('plugin') in [OVS, OVS_ODL]: |
169 | 672 | if not service_running('openvswitch-switch'): | 734 | if not service_running('openvswitch-switch'): |
170 | 673 | full_restart() | 735 | full_restart() |
171 | 674 | add_bridge(INT_BRIDGE) | 736 | add_bridge(INT_BRIDGE) |
172 | 675 | 737 | ||
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 | 265 | ['hook_contexts'] | 265 | ['hook_contexts'] |
178 | 266 | ) | 266 | ) |
179 | 267 | 267 | ||
180 | 268 | def test_register_configs_ovs_odl(self): | ||
181 | 269 | self.config.side_effect = self.test_config.get | ||
182 | 270 | self.test_config.set('plugin', 'ovs-odl') | ||
183 | 271 | self.is_relation_made.return_value = False | ||
184 | 272 | self.get_os_codename_install_source.return_value = 'icehouse' | ||
185 | 273 | configs = neutron_utils.register_configs() | ||
186 | 274 | confs = [neutron_utils.NEUTRON_DHCP_AGENT_CONF, | ||
187 | 275 | neutron_utils.NEUTRON_METADATA_AGENT_CONF, | ||
188 | 276 | neutron_utils.NOVA_CONF, | ||
189 | 277 | neutron_utils.NEUTRON_CONF, | ||
190 | 278 | neutron_utils.NEUTRON_L3_AGENT_CONF, | ||
191 | 279 | neutron_utils.EXT_PORT_CONF] | ||
192 | 280 | for conf in confs: | ||
193 | 281 | configs.register.assert_any_call( | ||
194 | 282 | conf, | ||
195 | 283 | neutron_utils.CONFIG_FILES['neutron'] | ||
196 | 284 | [neutron_utils.OVS_ODL][conf] | ||
197 | 285 | ['hook_contexts'] | ||
198 | 286 | ) | ||
199 | 287 | |||
200 | 268 | def test_register_configs_amqp_nova(self): | 288 | def test_register_configs_amqp_nova(self): |
201 | 269 | self.config.return_value = 'ovs' | 289 | self.config.return_value = 'ovs' |
202 | 270 | self.is_relation_made.return_value = True | 290 | self.is_relation_made.return_value = True |
203 | @@ -320,6 +340,40 @@ | |||
204 | 320 | 340 | ||
205 | 321 | self.assertDictEqual(neutron_utils.restart_map(), ex_map) | 341 | self.assertDictEqual(neutron_utils.restart_map(), ex_map) |
206 | 322 | 342 | ||
207 | 343 | def test_restart_map_ovs_odl(self): | ||
208 | 344 | self.config.return_value = 'ovs-odl' | ||
209 | 345 | self.get_os_codename_install_source.return_value = 'icehouse' | ||
210 | 346 | ex_map = { | ||
211 | 347 | neutron_utils.NEUTRON_CONF: ['neutron-l3-agent', | ||
212 | 348 | 'neutron-dhcp-agent', | ||
213 | 349 | 'neutron-metadata-agent', | ||
214 | 350 | 'neutron-plugin-metering-agent', | ||
215 | 351 | 'neutron-metering-agent', | ||
216 | 352 | 'neutron-lbaas-agent', | ||
217 | 353 | 'neutron-plugin-vpn-agent', | ||
218 | 354 | 'neutron-vpn-agent'], | ||
219 | 355 | neutron_utils.NEUTRON_DNSMASQ_CONF: ['neutron-dhcp-agent'], | ||
220 | 356 | neutron_utils.NEUTRON_LBAAS_AGENT_CONF: | ||
221 | 357 | ['neutron-lbaas-agent'], | ||
222 | 358 | neutron_utils.NEUTRON_METADATA_AGENT_CONF: | ||
223 | 359 | ['neutron-metadata-agent'], | ||
224 | 360 | neutron_utils.NEUTRON_VPNAAS_AGENT_CONF: [ | ||
225 | 361 | 'neutron-plugin-vpn-agent', | ||
226 | 362 | 'neutron-vpn-agent'], | ||
227 | 363 | neutron_utils.NEUTRON_L3_AGENT_CONF: ['neutron-l3-agent', | ||
228 | 364 | 'neutron-vpn-agent'], | ||
229 | 365 | neutron_utils.NEUTRON_DHCP_AGENT_CONF: ['neutron-dhcp-agent'], | ||
230 | 366 | neutron_utils.NEUTRON_FWAAS_CONF: ['neutron-l3-agent', | ||
231 | 367 | 'neutron-vpn-agent'], | ||
232 | 368 | neutron_utils.NEUTRON_METERING_AGENT_CONF: | ||
233 | 369 | ['neutron-metering-agent', 'neutron-plugin-metering-agent'], | ||
234 | 370 | neutron_utils.NOVA_CONF: ['nova-api-metadata'], | ||
235 | 371 | neutron_utils.EXT_PORT_CONF: ['ext-port'], | ||
236 | 372 | neutron_utils.PHY_NIC_MTU_CONF: ['os-charm-phy-nic-mtu'], | ||
237 | 373 | } | ||
238 | 374 | |||
239 | 375 | self.assertDictEqual(neutron_utils.restart_map(), ex_map) | ||
240 | 376 | |||
241 | 323 | def test_register_configs_nvp(self): | 377 | def test_register_configs_nvp(self): |
242 | 324 | self.config.return_value = 'nvp' | 378 | self.config.return_value = 'nvp' |
243 | 325 | self.is_relation_made.return_value = False | 379 | self.is_relation_made.return_value = False |
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/ 10.245. 162.77: 8080/job/ charm_lint_ check/6503/
Build: http://