Add swift discoverable_api support to verify_tempest_config

This commit adds support to the verify_tempest_config.py script
for detecting which swift apis are enabled.

Partially implements bp config-verification

Change-Id: I7f4a1fdc41246b3584aa5d3faca5920ca5c2f6e5
diff --git a/tools/verify_tempest_config.py b/tools/verify_tempest_config.py
index 4be812c..79e1fe3 100755
--- a/tools/verify_tempest_config.py
+++ b/tools/verify_tempest_config.py
@@ -63,6 +63,7 @@
         'nova_v3': os.extensions_v3_client,
         'cinder': os.volumes_extension_client,
         'neutron': os.network_client,
+        'swift': os.account_client,
     }
     if service not in extensions_client:
         print('No tempest extensions client for %s' % service)
@@ -76,6 +77,7 @@
         'nova_v3': CONF.compute_feature_enabled.api_v3_extensions,
         'cinder': CONF.volume_feature_enabled.api_extensions,
         'neutron': CONF.network_feature_enabled.api_extensions,
+        'swift': CONF.object_storage_feature_enabled.discoverable_apis,
     }
     if service not in extensions_options:
         print('No supported extensions list option for %s' % service)
@@ -93,6 +95,10 @@
         # instead of name.
         if service == 'neutron':
             extensions = map(lambda x: x['alias'], resp['extensions'])
+        elif service == 'swift':
+            # Remove Swift general information from extensions list
+            resp.pop('swift')
+            extensions = resp.keys()
         else:
             extensions = map(lambda x: x['name'], resp['extensions'])
 
@@ -142,7 +148,7 @@
     print('Running config verification...')
     os = clients.ComputeAdminManager(interface='json')
     results = {}
-    for service in ['nova', 'nova_v3', 'cinder', 'neutron']:
+    for service in ['nova', 'nova_v3', 'cinder', 'neutron', 'swift']:
         # TODO(mtreinish) make this a keystone endpoint check for available
         # services
         if not check_service_availability(service):