diff --git a/tempest/api/compute/admin/test_security_group_default_rules.py b/tempest/api/compute/admin/test_security_group_default_rules.py
index c1fe18c..13d6cc0 100644
--- a/tempest/api/compute/admin/test_security_group_default_rules.py
+++ b/tempest/api/compute/admin/test_security_group_default_rules.py
@@ -64,7 +64,7 @@
             # Delete Security Group default rule
             self.adm_client.delete_security_group_default_rule(rule['id'])
             self.assertRaises(lib_exc.NotFound,
-                              self.adm_client.get_security_group_default_rule,
+                              self.adm_client.show_security_group_default_rule,
                               rule['id'])
 
     @test.idempotent_id('4d752e0a-33a1-4c3a-b498-ff8667ca22e5')
@@ -125,6 +125,6 @@
                                                          cidr)
         self.addCleanup(self.adm_client.delete_security_group_default_rule,
                         rule['id'])
-        fetched_rule = self.adm_client.get_security_group_default_rule(
+        fetched_rule = self.adm_client.show_security_group_default_rule(
             rule['id'])
         self.assertEqual(rule, fetched_rule)
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 0ce26a3..821065c 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -75,7 +75,7 @@
                          "not equal to the requested name")
         # Now fetch the created Security Group by its 'id'
         fetched_group = \
-            self.client.get_security_group(securitygroup['id'])
+            self.client.show_security_group(securitygroup['id'])
         self.assertEqual(securitygroup, fetched_group,
                          "The fetched Security Group is different "
                          "from the created Group")
@@ -141,6 +141,6 @@
                                           description=s_new_des)
         # get the security group
         fetched_group = \
-            self.client.get_security_group(securitygroup_id)
+            self.client.show_security_group(securitygroup_id)
         self.assertEqual(s_new_name, fetched_group['name'])
         self.assertEqual(s_new_des, fetched_group['description'])
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index 06e073d..27a6670 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -58,7 +58,7 @@
         # Negative test:Should not be able to GET the details
         # of non-existent Security Group
         non_exist_id = self._generate_a_non_existent_security_group_id()
-        self.assertRaises(lib_exc.NotFound, self.client.get_security_group,
+        self.assertRaises(lib_exc.NotFound, self.client.show_security_group,
                           non_exist_id)
 
     @decorators.skip_because(bug="1161411",
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index af29425..4933ce2 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -271,7 +271,7 @@
     def test_get_security_group_of_alt_account_fails(self):
         # A GET request for another user's security group should fail
         self.assertRaises(lib_exc.NotFound,
-                          self.alt_security_client.get_security_group,
+                          self.alt_security_client.show_security_group,
                           self.security_group['id'])
 
     @test.idempotent_id('155387a5-2bbc-4acf-ab06-698dae537ea5')
diff --git a/tempest/services/compute/json/security_group_default_rules_client.py b/tempest/services/compute/json/security_group_default_rules_client.py
index 3bf3263..6853c03 100644
--- a/tempest/services/compute/json/security_group_default_rules_client.py
+++ b/tempest/services/compute/json/security_group_default_rules_client.py
@@ -49,7 +49,7 @@
     def delete_security_group_default_rule(self,
                                            security_group_default_rule_id):
         """Deletes the provided Security Group default rule."""
-        resp, body = self.delete('os-security-group-default-rules/%s' % str(
+        resp, body = self.delete('os-security-group-default-rules/%s' % (
             security_group_default_rule_id))
         self.validate_response(schema.delete_security_group_default_rule,
                                resp, body)
@@ -64,10 +64,10 @@
         rules = body['security_group_default_rules']
         return service_client.ResponseBodyList(resp, rules)
 
-    def get_security_group_default_rule(self, security_group_default_rule_id):
+    def show_security_group_default_rule(self, security_group_default_rule_id):
         """Return the details of provided Security Group default rule."""
-        resp, body = self.get('os-security-group-default-rules/%s' % str(
-            security_group_default_rule_id))
+        resp, body = self.get('os-security-group-default-rules/%s' %
+                              security_group_default_rule_id)
         body = json.loads(body)
         self.validate_response(schema.create_get_security_group_default_rule,
                                resp, body)
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index 2855e13..5f1656c 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -36,9 +36,9 @@
         self.validate_response(schema.list_security_groups, resp, body)
         return service_client.ResponseBodyList(resp, body['security_groups'])
 
-    def get_security_group(self, security_group_id):
+    def show_security_group(self, security_group_id):
         """Get the details of a Security Group."""
-        url = "os-security-groups/%s" % str(security_group_id)
+        url = "os-security-groups/%s" % security_group_id
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.get_security_group, resp, body)
@@ -74,7 +74,7 @@
         if description:
             post_body['description'] = description
         post_body = json.dumps({'security_group': post_body})
-        resp, body = self.put('os-security-groups/%s' % str(security_group_id),
+        resp, body = self.put('os-security-groups/%s' % security_group_id,
                               post_body)
         body = json.loads(body)
         self.validate_response(schema.update_security_group, resp, body)
@@ -83,7 +83,7 @@
     def delete_security_group(self, security_group_id):
         """Deletes the provided Security Group."""
         resp, body = self.delete(
-            'os-security-groups/%s' % str(security_group_id))
+            'os-security-groups/%s' % security_group_id)
         self.validate_response(schema.delete_security_group, resp, body)
         return service_client.ResponseBody(resp, body)
 
@@ -117,7 +117,7 @@
     def delete_security_group_rule(self, group_rule_id):
         """Deletes the provided Security Group rule."""
         resp, body = self.delete('os-security-group-rules/%s' %
-                                 str(group_rule_id))
+                                 group_rule_id)
         self.validate_response(schema.delete_security_group_rule, resp, body)
         return service_client.ResponseBody(resp, body)
 
@@ -133,7 +133,7 @@
 
     def is_resource_deleted(self, id):
         try:
-            self.get_security_group(id)
+            self.show_security_group(id)
         except lib_exc.NotFound:
             return True
         return False
