Added network.remove-extension option
* It will remove a list of api-extension from network-api-extension * If this argument is not passed, it will not remove anything. * Currently neutron ext-list provides available extensions but it doesnot lists enabled extensions. So we have added an option to remove extension based on need. As there is a neutron for the same: https://bugs.launchpad.net/neutron/+bug/1450067 Change-Id: Id205e972bee406ae30e44d3d7cdda619ecb1f5c6
This commit is contained in:
parent
08be15ab94
commit
08903197d3
@ -786,6 +786,14 @@ def configure_discovered_services(conf, services):
|
||||
|
||||
# set service extensions
|
||||
keystone_v3_support = conf.get('identity-feature-enabled', 'api_v3')
|
||||
# Currently neutron ext-list provides available api-extension but
|
||||
# does not provide enabled extension due to bug in dvr.
|
||||
# So we are removing dvr from neutron api-extension list.
|
||||
# We can remove dvr from extension list using network.remove-extension dvr
|
||||
# https://bugs.launchpad.net/neutron/+bug/1450067
|
||||
if not conf.has_option('network', 'remove-extension'):
|
||||
conf.set('network', 'remove-extension', '')
|
||||
network_extension = conf.get('network', 'remove-extension')
|
||||
for service, ext_key in SERVICE_EXTENSION_KEY.iteritems():
|
||||
if service in services:
|
||||
extensions = ','.join(services[service].get('extensions', ""))
|
||||
@ -798,6 +806,11 @@ def configure_discovered_services(conf, services):
|
||||
conf.get("identity", "uri_v3"))
|
||||
extensions = list(set(extensions.split(',') + identity_v3_ext))
|
||||
extensions = ','.join(extensions)
|
||||
elif service == 'network' and network_extension:
|
||||
extensions = set(str(extensions).split(','))
|
||||
remove_ext = set(network_extension.split(','))
|
||||
extensions = list(extensions.difference(remove_ext))
|
||||
extensions = ','.join(extensions)
|
||||
conf.set(service + '-feature-enabled', ext_key, extensions)
|
||||
|
||||
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Added network.remove-extension <extension names followed by comma> to remove
|
||||
neutron api extensions.
|
Loading…
Reference in New Issue
Block a user