179
180
'nova-api-metadata']],
180
181
'server_packages': ['neutron-server', 'calico-control'],
181
182
'server_services': ['neutron-server']
185
'config': '/etc/neutron/plugins/nuage/nuage_plugin.ini',
186
'driver': 'neutron.plugins.nuage.plugin.NuagePlugin',
188
context.SharedDBContext(user=config('neutron-database-user'),
189
database=config('neutron-database'),
190
relation_prefix='neutron',
191
ssl_dir=NEUTRON_CONF_DIR)],
194
'server_packages': ['neutron-server', 'neutron-plugin-nuage'],
195
'server_services': ['neutron-server']
184
198
if release >= 'icehouse':
238
252
# ensure accurate naming for all releases post-H
256
def parse_mappings(mappings):
259
mappings = mappings.split(' ')
263
parsed[p[0].strip()] = p[2].strip()
268
def parse_bridge_mappings(mappings):
269
"""Parse bridge mappings.
271
Mappings must be a space-delimited list of provider:bridge mappings.
273
Returns dict of the form {provider:bridge}.
275
return parse_mappings(mappings)
278
def parse_data_port_mappings(mappings, default_bridge='br-data'):
279
"""Parse data port mappings.
281
Mappings must be a space-delimited list of bridge:port mappings.
283
Returns dict of the form {bridge:port}.
285
_mappings = parse_mappings(mappings)
290
# For backwards-compatibility we need to support port-only provided in
292
_mappings = {default_bridge: mappings.split(' ')[0]}
294
bridges = _mappings.keys()
295
ports = _mappings.values()
296
if len(set(bridges)) != len(bridges):
297
raise Exception("It is not allowed to have more than one port "
298
"configured on the same bridge")
300
if len(set(ports)) != len(ports):
301
raise Exception("It is not allowed to have the same port configured "
302
"on more than one bridge")
307
def parse_vlan_range_mappings(mappings):
308
"""Parse vlan range mappings.
310
Mappings must be a space-delimited list of provider:start:end mappings.
312
Returns dict of the form {provider: (start, end)}.
314
_mappings = parse_mappings(mappings)
319
for p, r in six.iteritems(_mappings):
320
mappings[p] = tuple(r.split(':'))