From 08903197d32609125d325fa68f35c3923021eb64 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Tue, 7 Mar 2017 12:48:51 +0000 Subject: [PATCH] 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 --- config_tempest/config_tempest.py | 13 +++++++++++++ .../remove-network-extension-2baca1416c8103a7.yaml | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 releasenotes/notes/remove-network-extension-2baca1416c8103a7.yaml diff --git a/config_tempest/config_tempest.py b/config_tempest/config_tempest.py index 9803521f..cb007471 100755 --- a/config_tempest/config_tempest.py +++ b/config_tempest/config_tempest.py @@ -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) diff --git a/releasenotes/notes/remove-network-extension-2baca1416c8103a7.yaml b/releasenotes/notes/remove-network-extension-2baca1416c8103a7.yaml new file mode 100644 index 00000000..faa92fd7 --- /dev/null +++ b/releasenotes/notes/remove-network-extension-2baca1416c8103a7.yaml @@ -0,0 +1,4 @@ +--- +features: + - Added network.remove-extension to remove + neutron api extensions.