Add api_prefix for check capabilities

Change-Id: I22c5ea2567915b872ef3ff6378542d3233407a88
diff --git a/tempest/api/object_storage/base.py b/tempest/api/object_storage/base.py
index ee72163..70e71c3 100644
--- a/tempest/api/object_storage/base.py
+++ b/tempest/api/object_storage/base.py
@@ -95,8 +95,8 @@
         cls.policies = None
 
         if CONF.object_storage_feature_enabled.discoverability:
-            body = cls.capabilities_client.list_capabilities()
-
+            body = cls.capabilities_client.list_capabilities(
+                api_prefix=CONF.object_storage.api_prefix)
             if 'swift' in body and 'policies' in body['swift']:
                 cls.policies = body['swift']['policies']
 
diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py
index d7c85a2..a190769 100644
--- a/tempest/api/object_storage/test_account_services.py
+++ b/tempest/api/object_storage/test_account_services.py
@@ -134,8 +134,8 @@
         not CONF.object_storage_feature_enabled.discoverability,
         'Discoverability function is disabled')
     def test_list_extensions(self):
-        resp = self.capabilities_client.list_capabilities()
-
+        resp = self.capabilities_client.list_capabilities(
+            api_prefix=CONF.object_storage.api_prefix)
         self.assertThat(resp, custom_matchers.AreAllWellFormatted())
 
     @decorators.idempotent_id('5cfa4ab2-4373-48dd-a41f-a532b12b08b2')
diff --git a/tempest/api/object_storage/test_container_services_negative.py b/tempest/api/object_storage/test_container_services_negative.py
index b8c83b7..9b9957f 100644
--- a/tempest/api/object_storage/test_container_services_negative.py
+++ b/tempest/api/object_storage/test_container_services_negative.py
@@ -32,7 +32,8 @@
 
         if CONF.object_storage_feature_enabled.discoverability:
             # use /info to get default constraints
-            body = cls.capabilities_client.list_capabilities()
+            body = cls.capabilities_client.list_capabilities(
+                api_prefix=CONF.object_storage.api_prefix)
             cls.constraints = body['swift']
 
     @decorators.attr(type=["negative"])
diff --git a/tempest/config.py b/tempest/config.py
index dd1a959..ba4d76b 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -904,6 +904,10 @@
                help="One name of cluster which is set in the realm whose name "
                     "is set in 'realm_name' item in this file. Set the "
                     "same cluster name as Swift's container-sync-realms.conf"),
+    cfg.StrOpt('api_prefix',
+               default='',
+               help="Prefix for check capabilities. "
+                    "We need add prefix for testing radosgw by swift tests."),
 ]
 
 object_storage_feature_group = cfg.OptGroup(
diff --git a/tempest/lib/services/object_storage/capabilities_client.py b/tempest/lib/services/object_storage/capabilities_client.py
index d31bbc2..50844f1 100644
--- a/tempest/lib/services/object_storage/capabilities_client.py
+++ b/tempest/lib/services/object_storage/capabilities_client.py
@@ -20,10 +20,10 @@
 
 class CapabilitiesClient(rest_client.RestClient):
 
-    def list_capabilities(self):
+    def list_capabilities(self, api_prefix=''):
         self.skip_path()
         try:
-            resp, body = self.get('info')
+            resp, body = self.get('%sinfo' % api_prefix)
         finally:
             self.reset_path()
         body = json.loads(body)