Merge lp:~james-page/charms/trusty/neutron-openvswitch/mitaka-neutron-changes into lp:~openstack-charmers-archive/charms/trusty/neutron-openvswitch/next
- Trusty Tahr (14.04)
- mitaka-neutron-changes
- Merge into next
Status: | Merged |
---|---|
Merged at revision: | 110 |
Proposed branch: | lp:~james-page/charms/trusty/neutron-openvswitch/mitaka-neutron-changes |
Merge into: | lp:~openstack-charmers-archive/charms/trusty/neutron-openvswitch/next |
Diff against target: |
268 lines (+122/-8) 4 files modified
hooks/neutron_ovs_utils.py (+24/-0) templates/mitaka/openvswitch_agent.ini (+27/-0) tests/basic_deployment.py (+16/-4) unit_tests/test_neutron_ovs_utils.py (+55/-4) |
To merge this branch: | bzr merge lp:~james-page/charms/trusty/neutron-openvswitch/mitaka-neutron-changes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ryan Beisner (community) | Approve | ||
Review via email: mp+286910@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 #1072 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #472 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_amulet_test #477 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://
Ryan Beisner (1chb1n) wrote : | # |
#recheck
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #1077 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #1310 neutron-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #1078 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #1311 neutron-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #481 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 #1368 neutron-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #1131 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #483 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://
James Page (james-page) wrote : | # |
This won't pas just yet
On Tue, 23 Feb 2016 at 19:01, Ryan Beisner <email address hidden>
wrote:
> #recheck
> --
>
> https:/
> You are the owner of
> lp:~james-page/charms/trusty/neutron-openvswitch/mitaka-neutron-changes.
>
James Page (james-page) wrote : | # |
#recheck
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #1480 neutron-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #1235 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #535 neutron-
AMULET OK: passed
Ryan Beisner (1chb1n) : | # |
Preview Diff
1 | === modified file 'hooks/neutron_ovs_utils.py' | |||
2 | --- hooks/neutron_ovs_utils.py 2015-11-12 09:33:27 +0000 | |||
3 | +++ hooks/neutron_ovs_utils.py 2016-02-23 14:51:17 +0000 | |||
4 | @@ -84,6 +84,7 @@ | |||
5 | 84 | 'neutron-server', | 84 | 'neutron-server', |
6 | 85 | 'neutron-plugin-openvswitch', | 85 | 'neutron-plugin-openvswitch', |
7 | 86 | 'neutron-plugin-openvswitch-agent', | 86 | 'neutron-plugin-openvswitch-agent', |
8 | 87 | 'neutron-openvswitch-agent', | ||
9 | 87 | ] | 88 | ] |
10 | 88 | 89 | ||
11 | 89 | NOVA_CONF_DIR = "/etc/nova" | 90 | NOVA_CONF_DIR = "/etc/nova" |
12 | @@ -94,6 +95,7 @@ | |||
13 | 94 | NEUTRON_L3_AGENT_CONF = "/etc/neutron/l3_agent.ini" | 95 | NEUTRON_L3_AGENT_CONF = "/etc/neutron/l3_agent.ini" |
14 | 95 | NEUTRON_FWAAS_CONF = "/etc/neutron/fwaas_driver.ini" | 96 | NEUTRON_FWAAS_CONF = "/etc/neutron/fwaas_driver.ini" |
15 | 96 | ML2_CONF = '%s/plugins/ml2/ml2_conf.ini' % NEUTRON_CONF_DIR | 97 | ML2_CONF = '%s/plugins/ml2/ml2_conf.ini' % NEUTRON_CONF_DIR |
16 | 98 | OVS_CONF = '%s/plugins/ml2/openvswitch_agent.ini' % NEUTRON_CONF_DIR | ||
17 | 97 | EXT_PORT_CONF = '/etc/init/ext-port.conf' | 99 | EXT_PORT_CONF = '/etc/init/ext-port.conf' |
18 | 98 | NEUTRON_METADATA_AGENT_CONF = "/etc/neutron/metadata_agent.ini" | 100 | NEUTRON_METADATA_AGENT_CONF = "/etc/neutron/metadata_agent.ini" |
19 | 99 | DVR_PACKAGES = ['neutron-l3-agent'] | 101 | DVR_PACKAGES = ['neutron-l3-agent'] |
20 | @@ -114,6 +116,10 @@ | |||
21 | 114 | 'services': ['neutron-plugin-openvswitch-agent'], | 116 | 'services': ['neutron-plugin-openvswitch-agent'], |
22 | 115 | 'contexts': [neutron_ovs_context.OVSPluginContext()], | 117 | 'contexts': [neutron_ovs_context.OVSPluginContext()], |
23 | 116 | }), | 118 | }), |
24 | 119 | (OVS_CONF, { | ||
25 | 120 | 'services': ['neutron-openvswitch-agent'], | ||
26 | 121 | 'contexts': [neutron_ovs_context.OVSPluginContext()], | ||
27 | 122 | }), | ||
28 | 117 | (PHY_NIC_MTU_CONF, { | 123 | (PHY_NIC_MTU_CONF, { |
29 | 118 | 'services': ['os-charm-phy-nic-mtu'], | 124 | 'services': ['os-charm-phy-nic-mtu'], |
30 | 119 | 'contexts': [context.PhyNICMTUContext()], | 125 | 'contexts': [context.PhyNICMTUContext()], |
31 | @@ -193,6 +199,11 @@ | |||
32 | 193 | if p in pkgs: | 199 | if p in pkgs: |
33 | 194 | pkgs.remove(p) | 200 | pkgs.remove(p) |
34 | 195 | 201 | ||
35 | 202 | release = os_release('neutron-common', base='icehouse') | ||
36 | 203 | if release >= 'mitaka' and 'neutron-plugin-openvswitch-agent' in pkgs: | ||
37 | 204 | pkgs.remove('neutron-plugin-openvswitch-agent') | ||
38 | 205 | pkgs.append('neutron-openvswitch-agent') | ||
39 | 206 | |||
40 | 196 | return pkgs | 207 | return pkgs |
41 | 197 | 208 | ||
42 | 198 | 209 | ||
43 | @@ -221,6 +232,19 @@ | |||
44 | 221 | resource_map.update(DHCP_RESOURCE_MAP) | 232 | resource_map.update(DHCP_RESOURCE_MAP) |
45 | 222 | metadata_services = ['neutron-metadata-agent', 'neutron-dhcp-agent'] | 233 | metadata_services = ['neutron-metadata-agent', 'neutron-dhcp-agent'] |
46 | 223 | resource_map[NEUTRON_CONF]['services'] += metadata_services | 234 | resource_map[NEUTRON_CONF]['services'] += metadata_services |
47 | 235 | # Remap any service names as required | ||
48 | 236 | if os_release('neutron-common', base='icehouse') >= 'mitaka': | ||
49 | 237 | # ml2_conf.ini -> openvswitch_agent.ini | ||
50 | 238 | del resource_map[ML2_CONF] | ||
51 | 239 | # drop of -plugin from service name | ||
52 | 240 | resource_map[NEUTRON_CONF]['services'].remove( | ||
53 | 241 | 'neutron-plugin-openvswitch-agent' | ||
54 | 242 | ) | ||
55 | 243 | resource_map[NEUTRON_CONF]['services'].append( | ||
56 | 244 | 'neutron-openvswitch-agent' | ||
57 | 245 | ) | ||
58 | 246 | else: | ||
59 | 247 | del resource_map[OVS_CONF] | ||
60 | 224 | return resource_map | 248 | return resource_map |
61 | 225 | 249 | ||
62 | 226 | 250 | ||
63 | 227 | 251 | ||
64 | === added directory 'templates/mitaka' | |||
65 | === added file 'templates/mitaka/openvswitch_agent.ini' | |||
66 | --- templates/mitaka/openvswitch_agent.ini 1970-01-01 00:00:00 +0000 | |||
67 | +++ templates/mitaka/openvswitch_agent.ini 2016-02-23 14:51:17 +0000 | |||
68 | @@ -0,0 +1,27 @@ | |||
69 | 1 | # mitaka | ||
70 | 2 | ############################################################################### | ||
71 | 3 | # [ WARNING ] | ||
72 | 4 | # Configuration file maintained by Juju. Local changes may be overwritten. | ||
73 | 5 | # Config managed by neutron-openvswitch charm | ||
74 | 6 | ############################################################################### | ||
75 | 7 | [ovs] | ||
76 | 8 | enable_tunneling = True | ||
77 | 9 | local_ip = {{ local_ip }} | ||
78 | 10 | bridge_mappings = {{ bridge_mappings }} | ||
79 | 11 | |||
80 | 12 | [agent] | ||
81 | 13 | tunnel_types = {{ overlay_network_type }} | ||
82 | 14 | l2_population = {{ l2_population }} | ||
83 | 15 | enable_distributed_routing = {{ distributed_routing }} | ||
84 | 16 | prevent_arp_spoofing = {{ prevent_arp_spoofing }} | ||
85 | 17 | {% if veth_mtu -%} | ||
86 | 18 | veth_mtu = {{ veth_mtu }} | ||
87 | 19 | {% endif -%} | ||
88 | 20 | |||
89 | 21 | [securitygroup] | ||
90 | 22 | {% if neutron_security_groups -%} | ||
91 | 23 | enable_security_group = True | ||
92 | 24 | firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver | ||
93 | 25 | {% else -%} | ||
94 | 26 | enable_security_group = False | ||
95 | 27 | {% endif -%} | ||
96 | 0 | 28 | ||
97 | === modified file 'tests/basic_deployment.py' | |||
98 | --- tests/basic_deployment.py 2016-01-20 20:56:33 +0000 | |||
99 | +++ tests/basic_deployment.py 2016-02-23 14:51:17 +0000 | |||
100 | @@ -9,7 +9,7 @@ | |||
101 | 9 | OpenStackAmuletDeployment | 9 | OpenStackAmuletDeployment |
102 | 10 | ) | 10 | ) |
103 | 11 | 11 | ||
105 | 12 | # This file needs de-linted. The (mis)use of n-o q-a below causes all lint | 12 | # This file needs de-linted. The (mis)use of n-o q-a below causes all lint |
106 | 13 | # to go undetected. Remove that & fixme. | 13 | # to go undetected. Remove that & fixme. |
107 | 14 | from charmhelpers.contrib.openstack.amulet.utils import ( | 14 | from charmhelpers.contrib.openstack.amulet.utils import ( |
108 | 15 | OpenStackAmuletUtils, | 15 | OpenStackAmuletUtils, |
109 | @@ -67,7 +67,7 @@ | |||
110 | 67 | def _add_relations(self): | 67 | def _add_relations(self): |
111 | 68 | """Add all of the relations for the services.""" | 68 | """Add all of the relations for the services.""" |
112 | 69 | relations = { | 69 | relations = { |
114 | 70 | 'neutron-openvswitch:amqp': 'rabbitmq-server:amqp', | 70 | 'neutron-openvswitch:amqp': 'rabbitmq-server:amqp', |
115 | 71 | 'neutron-openvswitch:neutron-plugin': | 71 | 'neutron-openvswitch:neutron-plugin': |
116 | 72 | 'nova-compute:neutron-plugin', | 72 | 'nova-compute:neutron-plugin', |
117 | 73 | 'neutron-openvswitch:neutron-plugin-api': | 73 | 'neutron-openvswitch:neutron-plugin-api': |
118 | @@ -160,6 +160,12 @@ | |||
119 | 160 | self.neutron_api_sentry: ['neutron-server'], | 160 | self.neutron_api_sentry: ['neutron-server'], |
120 | 161 | } | 161 | } |
121 | 162 | 162 | ||
122 | 163 | if self._get_openstack_release() >= self.trusty_mitaka: | ||
123 | 164 | services[self.compute_sentry] = [ | ||
124 | 165 | 'nova-compute', | ||
125 | 166 | 'neutron-openvswitch-agent' | ||
126 | 167 | ] | ||
127 | 168 | |||
128 | 163 | ret = u.validate_services_by_name(services) | 169 | ret = u.validate_services_by_name(services) |
129 | 164 | if ret: | 170 | if ret: |
130 | 165 | amulet.raise_status(amulet.FAIL, msg=ret) | 171 | amulet.raise_status(amulet.FAIL, msg=ret) |
131 | @@ -218,7 +224,10 @@ | |||
132 | 218 | 224 | ||
133 | 219 | # Needs love - test actions not clear in log | 225 | # Needs love - test actions not clear in log |
134 | 220 | unit = self.compute_sentry | 226 | unit = self.compute_sentry |
136 | 221 | conf = "/etc/neutron/plugins/ml2/ml2_conf.ini" | 227 | if self._get_openstack_release() >= self.trusty_mitaka: |
137 | 228 | conf = "/etc/neutron/plugins/ml2/openvswitch_agent.ini" | ||
138 | 229 | else: | ||
139 | 230 | conf = "/etc/neutron/plugins/ml2/ml2_conf.ini" | ||
140 | 222 | for value in vpair: | 231 | for value in vpair: |
141 | 223 | self.d.configure(service, {charm_key: value}) | 232 | self.d.configure(service, {charm_key: value}) |
142 | 224 | time.sleep(60) | 233 | time.sleep(60) |
143 | @@ -253,7 +262,10 @@ | |||
144 | 253 | 262 | ||
145 | 254 | # Needs love - not idempotent | 263 | # Needs love - not idempotent |
146 | 255 | unit = self.compute_sentry | 264 | unit = self.compute_sentry |
148 | 256 | conf = "/etc/neutron/plugins/ml2/ml2_conf.ini" | 265 | if self._get_openstack_release() >= self.trusty_mitaka: |
149 | 266 | conf = "/etc/neutron/plugins/ml2/openvswitch_agent.ini" | ||
150 | 267 | else: | ||
151 | 268 | conf = "/etc/neutron/plugins/ml2/ml2_conf.ini" | ||
152 | 257 | self.d.configure('neutron-api', {'neutron-security-groups': 'True'}) | 269 | self.d.configure('neutron-api', {'neutron-security-groups': 'True'}) |
153 | 258 | self.d.configure('neutron-openvswitch', | 270 | self.d.configure('neutron-openvswitch', |
154 | 259 | {'disable-security-groups': 'True'}) | 271 | {'disable-security-groups': 'True'}) |
155 | 260 | 272 | ||
156 | === modified file 'unit_tests/test_neutron_ovs_utils.py' | |||
157 | --- unit_tests/test_neutron_ovs_utils.py 2015-10-07 10:41:12 +0000 | |||
158 | +++ unit_tests/test_neutron_ovs_utils.py 2016-02-23 14:51:17 +0000 | |||
159 | @@ -111,7 +111,8 @@ | |||
160 | 111 | self.test_config.set('enable-local-dhcp-and-metadata', False) | 111 | self.test_config.set('enable-local-dhcp-and-metadata', False) |
161 | 112 | _git_requested.return_value = False | 112 | _git_requested.return_value = False |
162 | 113 | _use_dvr.return_value = False | 113 | _use_dvr.return_value = False |
164 | 114 | _os_rel.return_value = 'trusty' | 114 | _os_rel.return_value = 'icehouse' |
165 | 115 | self.os_release.return_value = 'icehouse' | ||
166 | 115 | _head_pkgs.return_value = head_pkg | 116 | _head_pkgs.return_value = head_pkg |
167 | 116 | pkg_list = nutils.determine_packages() | 117 | pkg_list = nutils.determine_packages() |
168 | 117 | expect = ['neutron-plugin-openvswitch-agent', head_pkg] | 118 | expect = ['neutron-plugin-openvswitch-agent', head_pkg] |
169 | @@ -121,12 +122,29 @@ | |||
170 | 121 | @patch.object(nutils, 'git_install_requested') | 122 | @patch.object(nutils, 'git_install_requested') |
171 | 122 | @patch.object(charmhelpers.contrib.openstack.neutron, 'os_release') | 123 | @patch.object(charmhelpers.contrib.openstack.neutron, 'os_release') |
172 | 123 | @patch.object(charmhelpers.contrib.openstack.neutron, 'headers_package') | 124 | @patch.object(charmhelpers.contrib.openstack.neutron, 'headers_package') |
173 | 125 | def test_determine_packages_mitaka(self, _head_pkgs, _os_rel, | ||
174 | 126 | _git_requested, _use_dvr): | ||
175 | 127 | self.test_config.set('enable-local-dhcp-and-metadata', False) | ||
176 | 128 | _git_requested.return_value = False | ||
177 | 129 | _use_dvr.return_value = False | ||
178 | 130 | _os_rel.return_value = 'mitaka' | ||
179 | 131 | self.os_release.return_value = 'mitaka' | ||
180 | 132 | _head_pkgs.return_value = head_pkg | ||
181 | 133 | pkg_list = nutils.determine_packages() | ||
182 | 134 | expect = ['neutron-openvswitch-agent', head_pkg] | ||
183 | 135 | self.assertItemsEqual(pkg_list, expect) | ||
184 | 136 | |||
185 | 137 | @patch.object(nutils, 'use_dvr') | ||
186 | 138 | @patch.object(nutils, 'git_install_requested') | ||
187 | 139 | @patch.object(charmhelpers.contrib.openstack.neutron, 'os_release') | ||
188 | 140 | @patch.object(charmhelpers.contrib.openstack.neutron, 'headers_package') | ||
189 | 124 | def test_determine_packages_metadata(self, _head_pkgs, _os_rel, | 141 | def test_determine_packages_metadata(self, _head_pkgs, _os_rel, |
190 | 125 | _git_requested, _use_dvr): | 142 | _git_requested, _use_dvr): |
191 | 126 | self.test_config.set('enable-local-dhcp-and-metadata', True) | 143 | self.test_config.set('enable-local-dhcp-and-metadata', True) |
192 | 127 | _git_requested.return_value = False | 144 | _git_requested.return_value = False |
193 | 128 | _use_dvr.return_value = False | 145 | _use_dvr.return_value = False |
195 | 129 | _os_rel.return_value = 'trusty' | 146 | _os_rel.return_value = 'icehouse' |
196 | 147 | self.os_release.return_value = 'icehouse' | ||
197 | 130 | _head_pkgs.return_value = head_pkg | 148 | _head_pkgs.return_value = head_pkg |
198 | 131 | pkg_list = nutils.determine_packages() | 149 | pkg_list = nutils.determine_packages() |
199 | 132 | expect = ['neutron-plugin-openvswitch-agent', head_pkg, | 150 | expect = ['neutron-plugin-openvswitch-agent', head_pkg, |
200 | @@ -142,7 +160,8 @@ | |||
201 | 142 | self.test_config.set('enable-local-dhcp-and-metadata', False) | 160 | self.test_config.set('enable-local-dhcp-and-metadata', False) |
202 | 143 | _git_requested.return_value = True | 161 | _git_requested.return_value = True |
203 | 144 | _use_dvr.return_value = True | 162 | _use_dvr.return_value = True |
205 | 145 | _os_rel.return_value = 'trusty' | 163 | _os_rel.return_value = 'icehouse' |
206 | 164 | self.os_release.return_value = 'icehouse' | ||
207 | 146 | _head_pkgs.return_value = head_pkg | 165 | _head_pkgs.return_value = head_pkg |
208 | 147 | pkg_list = nutils.determine_packages() | 166 | pkg_list = nutils.determine_packages() |
209 | 148 | self.assertFalse('neutron-l3-agent' in pkg_list) | 167 | self.assertFalse('neutron-l3-agent' in pkg_list) |
210 | @@ -159,7 +178,7 @@ | |||
211 | 159 | self.ctxts.append(ctxt) | 178 | self.ctxts.append(ctxt) |
212 | 160 | 179 | ||
213 | 161 | _use_dvr.return_value = False | 180 | _use_dvr.return_value = False |
215 | 162 | self.os_release.return_value = 'trusty' | 181 | self.os_release.return_value = 'icehouse' |
216 | 163 | templating.OSConfigRenderer.side_effect = _mock_OSConfigRenderer | 182 | templating.OSConfigRenderer.side_effect = _mock_OSConfigRenderer |
217 | 164 | _regconfs = nutils.register_configs() | 183 | _regconfs = nutils.register_configs() |
218 | 165 | confs = ['/etc/neutron/neutron.conf', | 184 | confs = ['/etc/neutron/neutron.conf', |
219 | @@ -168,8 +187,29 @@ | |||
220 | 168 | self.assertItemsEqual(_regconfs.configs, confs) | 187 | self.assertItemsEqual(_regconfs.configs, confs) |
221 | 169 | 188 | ||
222 | 170 | @patch.object(nutils, 'use_dvr') | 189 | @patch.object(nutils, 'use_dvr') |
223 | 190 | def test_register_configs_mitaka(self, _use_dvr): | ||
224 | 191 | class _mock_OSConfigRenderer(): | ||
225 | 192 | def __init__(self, templates_dir=None, openstack_release=None): | ||
226 | 193 | self.configs = [] | ||
227 | 194 | self.ctxts = [] | ||
228 | 195 | |||
229 | 196 | def register(self, config, ctxt): | ||
230 | 197 | self.configs.append(config) | ||
231 | 198 | self.ctxts.append(ctxt) | ||
232 | 199 | |||
233 | 200 | _use_dvr.return_value = False | ||
234 | 201 | self.os_release.return_value = 'mitaka' | ||
235 | 202 | templating.OSConfigRenderer.side_effect = _mock_OSConfigRenderer | ||
236 | 203 | _regconfs = nutils.register_configs() | ||
237 | 204 | confs = ['/etc/neutron/neutron.conf', | ||
238 | 205 | '/etc/neutron/plugins/ml2/openvswitch_agent.ini', | ||
239 | 206 | '/etc/init/os-charm-phy-nic-mtu.conf'] | ||
240 | 207 | self.assertItemsEqual(_regconfs.configs, confs) | ||
241 | 208 | |||
242 | 209 | @patch.object(nutils, 'use_dvr') | ||
243 | 171 | def test_resource_map(self, _use_dvr): | 210 | def test_resource_map(self, _use_dvr): |
244 | 172 | _use_dvr.return_value = False | 211 | _use_dvr.return_value = False |
245 | 212 | self.os_release.return_value = 'icehouse' | ||
246 | 173 | _map = nutils.resource_map() | 213 | _map = nutils.resource_map() |
247 | 174 | svcs = ['neutron-plugin-openvswitch-agent'] | 214 | svcs = ['neutron-plugin-openvswitch-agent'] |
248 | 175 | confs = [nutils.NEUTRON_CONF] | 215 | confs = [nutils.NEUTRON_CONF] |
249 | @@ -177,8 +217,19 @@ | |||
250 | 177 | self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs) | 217 | self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs) |
251 | 178 | 218 | ||
252 | 179 | @patch.object(nutils, 'use_dvr') | 219 | @patch.object(nutils, 'use_dvr') |
253 | 220 | def test_resource_map_mitaka(self, _use_dvr): | ||
254 | 221 | _use_dvr.return_value = False | ||
255 | 222 | self.os_release.return_value = 'mitaka' | ||
256 | 223 | _map = nutils.resource_map() | ||
257 | 224 | svcs = ['neutron-openvswitch-agent'] | ||
258 | 225 | confs = [nutils.NEUTRON_CONF] | ||
259 | 226 | [self.assertIn(q_conf, _map.keys()) for q_conf in confs] | ||
260 | 227 | self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs) | ||
261 | 228 | |||
262 | 229 | @patch.object(nutils, 'use_dvr') | ||
263 | 180 | def test_resource_map_dvr(self, _use_dvr): | 230 | def test_resource_map_dvr(self, _use_dvr): |
264 | 181 | _use_dvr.return_value = True | 231 | _use_dvr.return_value = True |
265 | 232 | self.os_release.return_value = 'icehouse' | ||
266 | 182 | _map = nutils.resource_map() | 233 | _map = nutils.resource_map() |
267 | 183 | svcs = ['neutron-plugin-openvswitch-agent', 'neutron-metadata-agent', | 234 | svcs = ['neutron-plugin-openvswitch-agent', 'neutron-metadata-agent', |
268 | 184 | 'neutron-l3-agent'] | 235 | 'neutron-l3-agent'] |
charm_lint_check #1295 neutron- openvswitch- next for james-page mp286910
LINT OK: passed
Build: http:// 10.245. 162.36: 8080/job/ charm_lint_ check/1295/