quota testcases use tenant_name should use tenant_id

Test case related to quota usage (test_show_quota_usage,
test_cinder_quota_defaults and test_cinder_quota_show)
uses tenant name, ideally it should use tenant id as quota
requires UUID of tenant and not tenant name.

Cinder quota-show ideally requires tenant_id to show quota.
As there is bug in cinder (BUG: 1307475) , that if we give
non-existent tenant_id still cinder show the quota and
returns 200 (OK). Hence, these testcases should use
tenant_id and not tenant_name.

Change-Id: Icab25afd482b34290bc74be2ba420f6b016dde18
Closes-Bug: #1321617
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index ece4299..f937b49 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -72,7 +72,7 @@
     @test.attr(type='gate')
     def test_show_quota_usage(self):
         _, quota_usage = self.quotas_client.get_quota_usage(
-            self.os_adm.credentials.tenant_name)
+            self.os_adm.credentials.tenant_id)
         for key in QUOTA_KEYS:
             self.assertIn(key, quota_usage)
             for usage_key in QUOTA_USAGE_KEYS:
diff --git a/tempest/cli/simple_read_only/volume/test_cinder.py b/tempest/cli/simple_read_only/volume/test_cinder.py
index 6e1e7d3..9a7f866 100644
--- a/tempest/cli/simple_read_only/volume/test_cinder.py
+++ b/tempest/cli/simple_read_only/volume/test_cinder.py
@@ -20,6 +20,7 @@
 import testtools
 
 from tempest import cli
+from tempest import clients
 from tempest import config
 
 
@@ -41,6 +42,9 @@
             msg = ("%s skipped as Cinder is not available" % cls.__name__)
             raise cls.skipException(msg)
         super(SimpleReadOnlyCinderClientTest, cls).resource_setup()
+        id_cl = clients.AdminManager().identity_client
+        tenant = id_cl.get_tenant_by_name(CONF.identity.admin_tenant_name)
+        cls.admin_tenant_id = tenant['id']
 
     def cinder(self, *args, **kwargs):
         return self.clients.cinder(*args,
@@ -87,15 +91,13 @@
     def test_cinder_quota_defaults(self):
         """This CLI can accept and string as param."""
         roles = self.parser.listing(self.cinder('quota-defaults',
-                                                params=CONF.identity.
-                                                admin_tenant_name))
+                                                params=self.admin_tenant_id))
         self.assertTableStruct(roles, ['Property', 'Value'])
 
     def test_cinder_quota_show(self):
         """This CLI can accept and string as param."""
         roles = self.parser.listing(self.cinder('quota-show',
-                                                params=CONF.identity.
-                                                admin_tenant_name))
+                                                params=self.admin_tenant_id))
         self.assertTableStruct(roles, ['Property', 'Value'])
 
     def test_cinder_rate_limits(self):