Merge lp:~james-page/openstack-mojo-specs/ext-net-redux into lp:openstack-mojo-specs
- ext-net-redux
- Merge into mojo-openstack-specs
Proposed by
James Page
Status: | Merged |
---|---|
Approved by: | Ryan Beisner |
Approved revision: | 269 |
Merged at revision: | 264 |
Proposed branch: | lp:~james-page/openstack-mojo-specs/ext-net-redux |
Merge into: | lp:openstack-mojo-specs |
Diff against target: |
341 lines (+67/-19) 14 files modified
helper/bundles/baremetal7-next.yaml (+3/-1) helper/bundles/baremetal7.yaml (+1/-0) helper/bundles/full-dvr-next.yaml (+2/-0) helper/bundles/full-next.yaml (+2/-0) helper/bundles/full-ssl-next.yaml (+2/-0) helper/bundles/full.yaml (+1/-0) helper/bundles/ha-next.yaml (+2/-0) helper/bundles/ha.yaml (+1/-0) helper/bundles/haphase1-next.yaml (+2/-0) helper/bundles/haphase2-next.yaml (+2/-0) helper/bundles/ksv3-full-next.yaml (+2/-0) helper/bundles/minimal-next.yaml (+2/-0) helper/setup/network_setup.py (+1/-2) helper/utils/mojo_os_utils.py (+44/-16) |
To merge this branch: | bzr merge lp:~james-page/openstack-mojo-specs/ext-net-redux |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ryan Beisner | Needs Information | ||
Review via email: mp+297643@code.launchpad.net |
Commit message
Rework mojo specs for next to use new style external network configuration.
Description of the change
To post a comment you must log in.
- 268. By James Page
-
Deal with old and new style networking for stable and next bundles
- 269. By James Page
-
Rework ext net config a bit
Revision history for this message
Ryan Beisner (1chb1n) wrote : | # |
Revision history for this message
Ryan Beisner (1chb1n) wrote : | # |
Exercising this branch against virt and metal specs in automation. Will report back here asap.
review:
Needs Information
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'helper/bundles/baremetal7-next.yaml' | |||
2 | --- helper/bundles/baremetal7-next.yaml 2016-04-18 14:36:47 +0000 | |||
3 | +++ helper/bundles/baremetal7-next.yaml 2016-06-17 15:58:16 +0000 | |||
4 | @@ -90,8 +90,9 @@ | |||
5 | 90 | neutron-gateway: | 90 | neutron-gateway: |
6 | 91 | charm: neutron-gateway | 91 | charm: neutron-gateway |
7 | 92 | options: | 92 | options: |
8 | 93 | ext-port: eth1 | ||
9 | 94 | instance-mtu: 1300 | 93 | instance-mtu: 1300 |
10 | 94 | data-port: br-ex:eth1 | ||
11 | 95 | bridge-mappings: physnet1:br-ex | ||
12 | 95 | to: | 96 | to: |
13 | 96 | - "0" | 97 | - "0" |
14 | 97 | cinder: | 98 | cinder: |
15 | @@ -184,6 +185,7 @@ | |||
16 | 184 | charm: neutron-api | 185 | charm: neutron-api |
17 | 185 | options: | 186 | options: |
18 | 186 | neutron-security-groups: True | 187 | neutron-security-groups: True |
19 | 188 | flat-network-providers: physnet1 | ||
20 | 187 | to: | 189 | to: |
21 | 188 | - "lxc:nova-compute=0" | 190 | - "lxc:nova-compute=0" |
22 | 189 | neutron-openvswitch: | 191 | neutron-openvswitch: |
23 | 190 | 192 | ||
24 | === modified file 'helper/bundles/baremetal7.yaml' | |||
25 | --- helper/bundles/baremetal7.yaml 2016-04-22 13:36:35 +0000 | |||
26 | +++ helper/bundles/baremetal7.yaml 2016-06-17 15:58:16 +0000 | |||
27 | @@ -186,6 +186,7 @@ | |||
28 | 186 | charm: neutron-api | 186 | charm: neutron-api |
29 | 187 | options: | 187 | options: |
30 | 188 | neutron-security-groups: True | 188 | neutron-security-groups: True |
31 | 189 | flat-network-providers: physnet1 | ||
32 | 189 | to: | 190 | to: |
33 | 190 | - "lxc:nova-compute=0" | 191 | - "lxc:nova-compute=0" |
34 | 191 | neutron-openvswitch: | 192 | neutron-openvswitch: |
35 | 192 | 193 | ||
36 | === modified file 'helper/bundles/full-dvr-next.yaml' | |||
37 | --- helper/bundles/full-dvr-next.yaml 2016-04-18 14:36:47 +0000 | |||
38 | +++ helper/bundles/full-dvr-next.yaml 2016-06-17 15:58:16 +0000 | |||
39 | @@ -117,10 +117,12 @@ | |||
40 | 117 | l2-population: True | 117 | l2-population: True |
41 | 118 | neutron-security-groups: True | 118 | neutron-security-groups: True |
42 | 119 | enable-dvr: True | 119 | enable-dvr: True |
43 | 120 | flat-network-providers: physnet1 | ||
44 | 120 | neutron-openvswitch: | 121 | neutron-openvswitch: |
45 | 121 | charm: neutron-openvswitch | 122 | charm: neutron-openvswitch |
46 | 122 | options: | 123 | options: |
47 | 123 | enable-local-dhcp-and-metadata: True | 124 | enable-local-dhcp-and-metadata: True |
48 | 125 | bridge-mappings: physnet1:br-ex | ||
49 | 124 | relations: | 126 | relations: |
50 | 125 | - [ neutron-api, mysql ] | 127 | - [ neutron-api, mysql ] |
51 | 126 | - [ neutron-api, rabbitmq-server ] | 128 | - [ neutron-api, rabbitmq-server ] |
52 | 127 | 129 | ||
53 | === modified file 'helper/bundles/full-next.yaml' | |||
54 | --- helper/bundles/full-next.yaml 2016-04-16 16:41:53 +0000 | |||
55 | +++ helper/bundles/full-next.yaml 2016-06-17 15:58:16 +0000 | |||
56 | @@ -46,6 +46,7 @@ | |||
57 | 46 | constraints: mem=1G | 46 | constraints: mem=1G |
58 | 47 | options: | 47 | options: |
59 | 48 | instance-mtu: 1300 | 48 | instance-mtu: 1300 |
60 | 49 | bridge-mappings: physnet1:br-ex | ||
61 | 49 | cinder: | 50 | cinder: |
62 | 50 | charm: cinder | 51 | charm: cinder |
63 | 51 | options: | 52 | options: |
64 | @@ -135,6 +136,7 @@ | |||
65 | 135 | constraints: mem=1G | 136 | constraints: mem=1G |
66 | 136 | options: | 137 | options: |
67 | 137 | neutron-security-groups: True | 138 | neutron-security-groups: True |
68 | 139 | flat-network-providers: physnet1 | ||
69 | 138 | neutron-openvswitch: | 140 | neutron-openvswitch: |
70 | 139 | charm: neutron-openvswitch | 141 | charm: neutron-openvswitch |
71 | 140 | relations: | 142 | relations: |
72 | 141 | 143 | ||
73 | === modified file 'helper/bundles/full-ssl-next.yaml' | |||
74 | --- helper/bundles/full-ssl-next.yaml 2016-04-18 14:36:47 +0000 | |||
75 | +++ helper/bundles/full-ssl-next.yaml 2016-06-17 15:58:16 +0000 | |||
76 | @@ -50,6 +50,7 @@ | |||
77 | 50 | constraints: mem=1G | 50 | constraints: mem=1G |
78 | 51 | options: | 51 | options: |
79 | 52 | instance-mtu: 1300 | 52 | instance-mtu: 1300 |
80 | 53 | bridge-mappings: physnet1:br-ex | ||
81 | 53 | cinder: | 54 | cinder: |
82 | 54 | charm: cinder | 55 | charm: cinder |
83 | 55 | options: | 56 | options: |
84 | @@ -139,6 +140,7 @@ | |||
85 | 139 | constraints: mem=1G | 140 | constraints: mem=1G |
86 | 140 | options: | 141 | options: |
87 | 141 | neutron-security-groups: True | 142 | neutron-security-groups: True |
88 | 143 | flat-network-providers: physnet1 | ||
89 | 142 | neutron-openvswitch: | 144 | neutron-openvswitch: |
90 | 143 | charm: neutron-openvswitch | 145 | charm: neutron-openvswitch |
91 | 144 | relations: | 146 | relations: |
92 | 145 | 147 | ||
93 | === modified file 'helper/bundles/full.yaml' | |||
94 | --- helper/bundles/full.yaml 2016-04-22 13:36:35 +0000 | |||
95 | +++ helper/bundles/full.yaml 2016-06-17 15:58:16 +0000 | |||
96 | @@ -138,6 +138,7 @@ | |||
97 | 138 | constraints: mem=1G | 138 | constraints: mem=1G |
98 | 139 | options: | 139 | options: |
99 | 140 | neutron-security-groups: True | 140 | neutron-security-groups: True |
100 | 141 | flat-network-providers: physnet1 | ||
101 | 141 | neutron-openvswitch: | 142 | neutron-openvswitch: |
102 | 142 | charm: neutron-openvswitch | 143 | charm: neutron-openvswitch |
103 | 143 | relations: | 144 | relations: |
104 | 144 | 145 | ||
105 | === modified file 'helper/bundles/ha-next.yaml' | |||
106 | --- helper/bundles/ha-next.yaml 2016-04-12 16:42:05 +0000 | |||
107 | +++ helper/bundles/ha-next.yaml 2016-06-17 15:58:16 +0000 | |||
108 | @@ -78,6 +78,7 @@ | |||
109 | 78 | constraints: mem=1G | 78 | constraints: mem=1G |
110 | 79 | options: | 79 | options: |
111 | 80 | instance-mtu: 1300 | 80 | instance-mtu: 1300 |
112 | 81 | bridge-mappings: physnet1:br-ex | ||
113 | 81 | cinder: | 82 | cinder: |
114 | 82 | charm: cinder | 83 | charm: cinder |
115 | 83 | constraints: mem=1G | 84 | constraints: mem=1G |
116 | @@ -164,6 +165,7 @@ | |||
117 | 164 | options: | 165 | options: |
118 | 165 | neutron-security-groups: True | 166 | neutron-security-groups: True |
119 | 166 | vip: 10.5.100.8 | 167 | vip: 10.5.100.8 |
120 | 168 | flat-network-providers: physnet1 | ||
121 | 167 | neutron-hacluster: | 169 | neutron-hacluster: |
122 | 168 | charm: hacluster | 170 | charm: hacluster |
123 | 169 | options: | 171 | options: |
124 | 170 | 172 | ||
125 | === modified file 'helper/bundles/ha.yaml' | |||
126 | --- helper/bundles/ha.yaml 2016-04-12 03:40:52 +0000 | |||
127 | +++ helper/bundles/ha.yaml 2016-06-17 15:58:16 +0000 | |||
128 | @@ -168,6 +168,7 @@ | |||
129 | 168 | options: | 168 | options: |
130 | 169 | neutron-security-groups: True | 169 | neutron-security-groups: True |
131 | 170 | vip: 10.5.100.8 | 170 | vip: 10.5.100.8 |
132 | 171 | flat-network-providers: physnet1 | ||
133 | 171 | neutron-hacluster: | 172 | neutron-hacluster: |
134 | 172 | charm: hacluster | 173 | charm: hacluster |
135 | 173 | options: | 174 | options: |
136 | 174 | 175 | ||
137 | === modified file 'helper/bundles/haphase1-next.yaml' | |||
138 | --- helper/bundles/haphase1-next.yaml 2016-04-12 16:42:05 +0000 | |||
139 | +++ helper/bundles/haphase1-next.yaml 2016-06-17 15:58:16 +0000 | |||
140 | @@ -60,6 +60,7 @@ | |||
141 | 60 | num_units: 2 | 60 | num_units: 2 |
142 | 61 | options: | 61 | options: |
143 | 62 | instance-mtu: 1350 | 62 | instance-mtu: 1350 |
144 | 63 | bridge-mappings: physnet1:br-ex | ||
145 | 63 | cinder: | 64 | cinder: |
146 | 64 | charm: cinder | 65 | charm: cinder |
147 | 65 | num_units: 2 | 66 | num_units: 2 |
148 | @@ -144,6 +145,7 @@ | |||
149 | 144 | options: | 145 | options: |
150 | 145 | neutron-security-groups: True | 146 | neutron-security-groups: True |
151 | 146 | vip: 10.5.108.1 | 147 | vip: 10.5.108.1 |
152 | 148 | flat-network-providers: physnet1 | ||
153 | 147 | neutron-api-hacluster: | 149 | neutron-api-hacluster: |
154 | 148 | charm: hacluster | 150 | charm: hacluster |
155 | 149 | options: | 151 | options: |
156 | 150 | 152 | ||
157 | === modified file 'helper/bundles/haphase2-next.yaml' | |||
158 | --- helper/bundles/haphase2-next.yaml 2016-04-12 16:42:05 +0000 | |||
159 | +++ helper/bundles/haphase2-next.yaml 2016-06-17 15:58:16 +0000 | |||
160 | @@ -60,6 +60,7 @@ | |||
161 | 60 | num_units: 2 | 60 | num_units: 2 |
162 | 61 | options: | 61 | options: |
163 | 62 | instance-mtu: 1350 | 62 | instance-mtu: 1350 |
164 | 63 | bridge-mappings: physnet1:br-ex | ||
165 | 63 | cinder: | 64 | cinder: |
166 | 64 | charm: cinder | 65 | charm: cinder |
167 | 65 | num_units: 2 | 66 | num_units: 2 |
168 | @@ -187,6 +188,7 @@ | |||
169 | 187 | options: | 188 | options: |
170 | 188 | neutron-security-groups: True | 189 | neutron-security-groups: True |
171 | 189 | vip: 10.5.108.1 | 190 | vip: 10.5.108.1 |
172 | 191 | flat-network-providers: physnet1 | ||
173 | 190 | neutron-api-hacluster: | 192 | neutron-api-hacluster: |
174 | 191 | charm: hacluster | 193 | charm: hacluster |
175 | 192 | options: | 194 | options: |
176 | 193 | 195 | ||
177 | === modified file 'helper/bundles/ksv3-full-next.yaml' | |||
178 | --- helper/bundles/ksv3-full-next.yaml 2016-04-18 14:36:47 +0000 | |||
179 | +++ helper/bundles/ksv3-full-next.yaml 2016-06-17 15:58:16 +0000 | |||
180 | @@ -51,6 +51,7 @@ | |||
181 | 51 | constraints: mem=1G | 51 | constraints: mem=1G |
182 | 52 | options: | 52 | options: |
183 | 53 | instance-mtu: 1300 | 53 | instance-mtu: 1300 |
184 | 54 | bridge-mappings: physnet1:br-ex | ||
185 | 54 | cinder: | 55 | cinder: |
186 | 55 | charm: cinder | 56 | charm: cinder |
187 | 56 | options: | 57 | options: |
188 | @@ -149,6 +150,7 @@ | |||
189 | 149 | constraints: mem=1G | 150 | constraints: mem=1G |
190 | 150 | options: | 151 | options: |
191 | 151 | neutron-security-groups: True | 152 | neutron-security-groups: True |
192 | 153 | flat-network-providers: physnet1 | ||
193 | 152 | neutron-openvswitch: | 154 | neutron-openvswitch: |
194 | 153 | charm: neutron-openvswitch | 155 | charm: neutron-openvswitch |
195 | 154 | relations: | 156 | relations: |
196 | 155 | 157 | ||
197 | === modified file 'helper/bundles/minimal-next.yaml' | |||
198 | --- helper/bundles/minimal-next.yaml 2016-04-18 14:36:47 +0000 | |||
199 | +++ helper/bundles/minimal-next.yaml 2016-06-17 15:58:16 +0000 | |||
200 | @@ -33,6 +33,7 @@ | |||
201 | 33 | constraints: mem=1G | 33 | constraints: mem=1G |
202 | 34 | options: | 34 | options: |
203 | 35 | instance-mtu: 1300 | 35 | instance-mtu: 1300 |
204 | 36 | bridge-mappings: physnet1:br-ex | ||
205 | 36 | cinder: | 37 | cinder: |
206 | 37 | charm: cinder | 38 | charm: cinder |
207 | 38 | options: | 39 | options: |
208 | @@ -74,6 +75,7 @@ | |||
209 | 74 | constraints: mem=1G | 75 | constraints: mem=1G |
210 | 75 | options: | 76 | options: |
211 | 76 | neutron-security-groups: True | 77 | neutron-security-groups: True |
212 | 78 | flat-network-providers: physnet1 | ||
213 | 77 | neutron-openvswitch: | 79 | neutron-openvswitch: |
214 | 78 | charm: neutron-openvswitch | 80 | charm: neutron-openvswitch |
215 | 79 | relations: | 81 | relations: |
216 | 80 | 82 | ||
217 | === modified file 'helper/setup/network_setup.py' | |||
218 | --- helper/setup/network_setup.py 2016-04-20 10:43:59 +0000 | |||
219 | +++ helper/setup/network_setup.py 2016-06-17 15:58:16 +0000 | |||
220 | @@ -28,8 +28,7 @@ | |||
221 | 28 | ext_network = mojo_os_utils.create_external_network( | 28 | ext_network = mojo_os_utils.create_external_network( |
222 | 29 | neutronc, | 29 | neutronc, |
223 | 30 | tenant_id, | 30 | tenant_id, |
226 | 31 | net_info['external_net_name'], | 31 | net_info['external_net_name']) |
225 | 32 | net_info['network_type']) | ||
227 | 33 | mojo_os_utils.create_external_subnet( | 32 | mojo_os_utils.create_external_subnet( |
228 | 34 | neutronc, | 33 | neutronc, |
229 | 35 | tenant_id, | 34 | tenant_id, |
230 | 36 | 35 | ||
231 | === modified file 'helper/utils/mojo_os_utils.py' | |||
232 | --- helper/utils/mojo_os_utils.py 2016-04-20 10:43:59 +0000 | |||
233 | +++ helper/utils/mojo_os_utils.py 2016-06-17 15:58:16 +0000 | |||
234 | @@ -290,6 +290,25 @@ | |||
235 | 290 | return uuids | 290 | return uuids |
236 | 291 | 291 | ||
237 | 292 | 292 | ||
238 | 293 | BRIDGE_MAPPINGS = 'bridge-mappings' | ||
239 | 294 | NEW_STYLE_NETWORKING = 'physnet1:br-ex' | ||
240 | 295 | |||
241 | 296 | |||
242 | 297 | def deprecated_external_networking(dvr_mode=False): | ||
243 | 298 | '''Determine whether deprecated external network mode is in use''' | ||
244 | 299 | bridge_mappings = None | ||
245 | 300 | if dvr_mode: | ||
246 | 301 | bridge_mappings = mojo_utils.juju_get('neutron-openvswitch', | ||
247 | 302 | BRIDGE_MAPPINGS) | ||
248 | 303 | else: | ||
249 | 304 | bridge_mappings = mojo_utils.juju_get('neutron-gateway', | ||
250 | 305 | BRIDGE_MAPPINGS) | ||
251 | 306 | |||
252 | 307 | if bridge_mappings == NEW_STYLE_NETWORKING: | ||
253 | 308 | return False | ||
254 | 309 | return True | ||
255 | 310 | |||
256 | 311 | |||
257 | 293 | def get_net_uuid(neutron_client, net_name): | 312 | def get_net_uuid(neutron_client, net_name): |
258 | 294 | network = neutron_client.list_networks(name=net_name)['networks'][0] | 313 | network = neutron_client.list_networks(name=net_name)['networks'][0] |
259 | 295 | return network['id'] | 314 | return network['id'] |
260 | @@ -308,6 +327,12 @@ | |||
261 | 308 | else: | 327 | else: |
262 | 309 | uuids = get_gateway_uuids() | 328 | uuids = get_gateway_uuids() |
263 | 310 | 329 | ||
264 | 330 | deprecated_extnet_mode = deprecated_external_networking(dvr_mode) | ||
265 | 331 | |||
266 | 332 | config_key = 'data-port' | ||
267 | 333 | if deprecated_extnet_mode: | ||
268 | 334 | config_key = 'ext-port' | ||
269 | 335 | |||
270 | 311 | if not net_id: | 336 | if not net_id: |
271 | 312 | net_id = get_admin_net(neutronclient)['id'] | 337 | net_id = get_admin_net(neutronclient)['id'] |
272 | 313 | 338 | ||
273 | @@ -331,12 +356,15 @@ | |||
274 | 331 | port = neutronclient.create_port(body=body_value) | 356 | port = neutronclient.create_port(body=body_value) |
275 | 332 | server.interface_attach(port_id=port['port']['id'], | 357 | server.interface_attach(port_id=port['port']['id'], |
276 | 333 | net_id=None, fixed_ip=None) | 358 | net_id=None, fixed_ip=None) |
278 | 334 | ext_port_macs = [] | 359 | ext_br_macs = [] |
279 | 335 | for port in neutronclient.list_ports(network_id=net_id)['ports']: | 360 | for port in neutronclient.list_ports(network_id=net_id)['ports']: |
280 | 336 | if 'ext-port' in port['name']: | 361 | if 'ext-port' in port['name']: |
284 | 337 | ext_port_macs.append(port['mac_address']) | 362 | if deprecated_extnet_mode: |
285 | 338 | ext_port_macs.sort() | 363 | ext_br_macs.append(port['mac_address']) |
286 | 339 | ext_port_macs_str = ' '.join(ext_port_macs) | 364 | else: |
287 | 365 | ext_br_macs.append('br-ex:{}'.format(port['mac_address'])) | ||
288 | 366 | ext_br_macs.sort() | ||
289 | 367 | ext_br_macs_str = ' '.join(ext_br_macs) | ||
290 | 340 | if dvr_mode: | 368 | if dvr_mode: |
291 | 341 | service_name = 'neutron-openvswitch' | 369 | service_name = 'neutron-openvswitch' |
292 | 342 | else: | 370 | else: |
293 | @@ -345,16 +373,17 @@ | |||
294 | 345 | # the post juju_set check. Try a sleep here to see if some network | 373 | # the post juju_set check. Try a sleep here to see if some network |
295 | 346 | # reconfigureing on the gateway is still in progress and that's | 374 | # reconfigureing on the gateway is still in progress and that's |
296 | 347 | # causing the issue | 375 | # causing the issue |
302 | 348 | if ext_port_macs: | 376 | if ext_br_macs: |
303 | 349 | logging.info('Setting ext-port on {} external port to {}'.format( | 377 | logging.info('Setting {} on {} external port to {}'.format( |
304 | 350 | service_name, ext_port_macs_str)) | 378 | config_key, service_name, ext_br_macs_str)) |
305 | 351 | current_ext_port = mojo_utils.juju_get(service_name, 'ext-port') | 379 | current_data_port = mojo_utils.juju_get(service_name, config_key) |
306 | 352 | if current_ext_port == ext_port_macs_str: | 380 | if current_data_port == ext_br_macs_str: |
307 | 353 | logging.info('Config already set to value') | 381 | logging.info('Config already set to value') |
308 | 354 | return | 382 | return |
309 | 355 | mojo_utils.juju_set( | 383 | mojo_utils.juju_set( |
310 | 356 | service_name, | 384 | service_name, |
312 | 357 | 'ext-port={}'.format(ext_port_macs_str), | 385 | '{}={}'.format(config_key, |
313 | 386 | ext_br_macs_str), | ||
314 | 358 | wait=False | 387 | wait=False |
315 | 359 | ) | 388 | ) |
316 | 360 | time.sleep(240) | 389 | time.sleep(240) |
317 | @@ -384,19 +413,18 @@ | |||
318 | 384 | return network | 413 | return network |
319 | 385 | 414 | ||
320 | 386 | 415 | ||
323 | 387 | def create_external_network(neutron_client, tenant_id, net_name='ext_net', | 416 | def create_external_network(neutron_client, tenant_id, net_name='ext_net'): |
322 | 388 | network_type='gre'): | ||
324 | 389 | networks = neutron_client.list_networks(name=net_name) | 417 | networks = neutron_client.list_networks(name=net_name) |
325 | 390 | if len(networks['networks']) == 0: | 418 | if len(networks['networks']) == 0: |
327 | 391 | logging.info('Configuring external bridge') | 419 | logging.info('Configuring external network') |
328 | 392 | network_msg = { | 420 | network_msg = { |
329 | 393 | 'name': net_name, | 421 | 'name': net_name, |
330 | 394 | 'router:external': True, | 422 | 'router:external': True, |
331 | 395 | 'tenant_id': tenant_id, | 423 | 'tenant_id': tenant_id, |
332 | 396 | } | 424 | } |
336 | 397 | if network_type == 'vxlan': | 425 | if not deprecated_external_networking(): |
337 | 398 | network_msg['provider:segmentation_id'] = 1234 | 426 | network_msg['provider:physical_network'] = 'physnet1' |
338 | 399 | network_msg['provider:network_type'] = network_type | 427 | network_msg['provider:network_type'] = 'flat' |
339 | 400 | 428 | ||
340 | 401 | logging.info('Creating new external network definition: %s', | 429 | logging.info('Creating new external network definition: %s', |
341 | 402 | net_name) | 430 | net_name) |
#recheck