Merge "Apply a naming rule of GET to orchestration client"
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 59fdec0..d4b107e 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -199,5 +199,5 @@
                     for r in resources)
 
     def get_stack_output(self, stack_identifier, output_key):
-        body = self.client.get_stack(stack_identifier)
+        body = self.client.show_stack(stack_identifier)
         return self.stack_output(body, output_key)
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index bcf091a..81e6e82 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -81,8 +81,8 @@
                 # attempt to log the server console to help with debugging
                 # the cause of the server not signalling the waitcondition
                 # to heat.
-                body = cls.client.get_resource(cls.stack_identifier,
-                                               'Server')
+                body = cls.client.show_resource(cls.stack_identifier,
+                                                'Server')
                 server_id = body['physical_resource_id']
                 LOG.debug('Console output for %s', server_id)
                 output = cls.servers_client.get_console_output(
diff --git a/tempest/api/orchestration/stacks/test_non_empty_stack.py b/tempest/api/orchestration/stacks/test_non_empty_stack.py
index 9c5a6d5..5f96de3 100644
--- a/tempest/api/orchestration/stacks/test_non_empty_stack.py
+++ b/tempest/api/orchestration/stacks/test_non_empty_stack.py
@@ -66,7 +66,7 @@
     @test.idempotent_id('992f96e3-41ee-4ff6-91c7-bcfb670c0919')
     def test_stack_show(self):
         """Getting details about created stack should be possible."""
-        stack = self.client.get_stack(self.stack_name)
+        stack = self.client.show_stack(self.stack_name)
         self.assertIsInstance(stack, dict)
         self.assert_fields_in_dict(stack, 'stack_name', 'id', 'links',
                                    'parameters', 'outputs', 'disable_rollback',
@@ -105,8 +105,8 @@
     @test.idempotent_id('2aba03b3-392f-4237-900b-1f5a5e9bd962')
     def test_show_resource(self):
         """Getting details about created resource should be possible."""
-        resource = self.client.get_resource(self.stack_identifier,
-                                            self.resource_name)
+        resource = self.client.show_resource(self.stack_identifier,
+                                             self.resource_name)
         self.assertIsInstance(resource, dict)
         self.assert_fields_in_dict(resource, 'resource_name', 'description',
                                    'links', 'logical_resource_id',
diff --git a/tempest/api/orchestration/stacks/test_nova_keypair_resources.py b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
index 28ef5a5..acdd4c7 100644
--- a/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
+++ b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
@@ -73,7 +73,7 @@
     @test.attr(type='gate')
     @test.idempotent_id('8d77dec7-91fd-45a6-943d-5abd45e338a4')
     def test_stack_keypairs_output(self):
-        stack = self.client.get_stack(self.stack_name)
+        stack = self.client.show_stack(self.stack_name)
         self.assertIsInstance(stack, dict)
 
         output_map = {}
diff --git a/tempest/api/orchestration/stacks/test_resource_types.py b/tempest/api/orchestration/stacks/test_resource_types.py
index 32b0b8e..8f15f9c 100644
--- a/tempest/api/orchestration/stacks/test_resource_types.py
+++ b/tempest/api/orchestration/stacks/test_resource_types.py
@@ -32,7 +32,7 @@
         self.assertNotEmpty(resource_types)
 
         for resource_type in resource_types:
-            type_schema = self.client.get_resource_type(resource_type)
+            type_schema = self.client.show_resource_type(resource_type)
             self.assert_fields_in_dict(type_schema, 'properties',
                                        'attributes', 'resource_type')
             self.assertEqual(resource_type, type_schema['resource_type'])
@@ -41,7 +41,7 @@
     @test.idempotent_id('8401821d-65fe-4d43-9fa3-57d5ce3a35c7')
     def test_resource_type_template(self):
         """Verify it is possible to get template about resource types."""
-        type_template = self.client.get_resource_type_template(
+        type_template = self.client.show_resource_type_template(
             'OS::Nova::Server')
         self.assert_fields_in_dict(
             type_template,
diff --git a/tempest/api/orchestration/stacks/test_soft_conf.py b/tempest/api/orchestration/stacks/test_soft_conf.py
index 649bf47..13f0a6c 100644
--- a/tempest/api/orchestration/stacks/test_soft_conf.py
+++ b/tempest/api/orchestration/stacks/test_soft_conf.py
@@ -71,28 +71,28 @@
         self.client.delete_software_deploy(deploy_id)
         # Testing that it is really gone
         self.assertRaises(
-            lib_exc.NotFound, self.client.get_software_deploy,
+            lib_exc.NotFound, self.client.show_software_deployment,
             self.deployment_id)
 
     def _config_delete(self, config_id):
         self.client.delete_software_config(config_id)
         # Testing that it is really gone
         self.assertRaises(
-            lib_exc.NotFound, self.client.get_software_config, config_id)
+            lib_exc.NotFound, self.client.show_software_config, config_id)
 
     @test.attr(type='smoke')
     @test.idempotent_id('136162ed-9445-4b9c-b7fc-306af8b5da99')
     def test_get_software_config(self):
         """Testing software config get."""
         for conf in self.configs:
-            api_config = self.client.get_software_config(conf['id'])
+            api_config = self.client.show_software_config(conf['id'])
             self._validate_config(conf, api_config)
 
     @test.attr(type='smoke')
     @test.idempotent_id('1275c835-c967-4a2c-8d5d-ad533447ed91')
     def test_get_deployment_list(self):
         """Getting a list of all deployments"""
-        deploy_list = self.client.get_software_deploy_list()
+        deploy_list = self.client.list_software_deployments()
         deploy_ids = [deploy['id'] for deploy in
                       deploy_list['software_deployments']]
         self.assertIn(self.deployment_id, deploy_ids)
@@ -101,12 +101,13 @@
     @test.idempotent_id('fe7cd9f9-54b1-429c-a3b7-7df8451db913')
     def test_get_deployment_metadata(self):
         """Testing deployment metadata get"""
-        metadata = self.client.get_software_deploy_meta(self.server_id)
+        metadata = self.client.show_software_deployment_metadata(
+            self.server_id)
         conf_ids = [conf['id'] for conf in metadata['metadata']]
         self.assertIn(self.configs[0]['id'], conf_ids)
 
     def _validate_deployment(self, action, status, reason, config_id):
-        deployment = self.client.get_software_deploy(self.deployment_id)
+        deployment = self.client.show_software_deployment(self.deployment_id)
         self.assertEqual(action, deployment['software_deployment']['action'])
         self.assertEqual(status, deployment['software_deployment']['status'])
         self.assertEqual(reason,
@@ -131,7 +132,8 @@
     @test.idempotent_id('2ac43ab3-34f2-415d-be2e-eabb4d14ee32')
     def test_software_deployment_update_no_metadata_change(self):
         """Testing software deployment update without metadata change."""
-        metadata = self.client.get_software_deploy_meta(self.server_id)
+        metadata = self.client.show_software_deployment_metadata(
+            self.server_id)
         # Updating values without changing the configuration ID
         new_action = 'ACTION_1'
         new_status = 'STATUS_1'
@@ -145,7 +147,8 @@
                                   new_reason, self.configs[0]['id'])
 
         # Metadata should not be changed at this point
-        test_metadata = self.client.get_software_deploy_meta(self.server_id)
+        test_metadata = self.client.show_software_deployment_metadata(
+            self.server_id)
         for key in metadata['metadata'][0]:
             self.assertEqual(
                 metadata['metadata'][0][key],
@@ -155,7 +158,8 @@
     @test.idempotent_id('92c48944-d79d-4595-a840-8e1a581c1a72')
     def test_software_deployment_update_with_metadata_change(self):
         """Testing software deployment update with metadata change."""
-        metadata = self.client.get_software_deploy_meta(self.server_id)
+        metadata = self.client.show_software_deployment_metadata(
+            self.server_id)
         self.client.update_software_deploy(
             self.deployment_id, self.server_id, self.configs[1]['id'],
             self.action, self.status, self.input_values,
@@ -163,7 +167,8 @@
         self._validate_deployment(self.action, self.status,
                                   self.status_reason, self.configs[1]['id'])
         # Metadata should now be changed
-        new_metadata = self.client.get_software_deploy_meta(self.server_id)
+        new_metadata = self.client.show_software_deployment_metadata(
+            self.server_id)
         # Its enough to test the ID in this case
         meta_id = metadata['metadata'][0]['id']
         test_id = new_metadata['metadata'][0]['id']
diff --git a/tempest/api/orchestration/stacks/test_stacks.py b/tempest/api/orchestration/stacks/test_stacks.py
index 147f456..9ce8ebeb 100644
--- a/tempest/api/orchestration/stacks/test_stacks.py
+++ b/tempest/api/orchestration/stacks/test_stacks.py
@@ -52,15 +52,15 @@
         self.assertIn(stack_id, list_ids)
 
         # fetch the stack
-        stack = self.client.get_stack(stack_identifier)
+        stack = self.client.show_stack(stack_identifier)
         self.assertEqual('CREATE_COMPLETE', stack['stack_status'])
 
         # fetch the stack by name
-        stack = self.client.get_stack(stack_name)
+        stack = self.client.show_stack(stack_name)
         self.assertEqual('CREATE_COMPLETE', stack['stack_status'])
 
         # fetch the stack by id
-        stack = self.client.get_stack(stack_id)
+        stack = self.client.show_stack(stack_id)
         self.assertEqual('CREATE_COMPLETE', stack['stack_status'])
 
         # delete the stack
diff --git a/tempest/services/orchestration/json/orchestration_client.py b/tempest/services/orchestration/json/orchestration_client.py
index 1a4c5d9..debf39b 100644
--- a/tempest/services/orchestration/json/orchestration_client.py
+++ b/tempest/services/orchestration/json/orchestration_client.py
@@ -105,7 +105,7 @@
         headers['X-Auth-User'] = self.user
         return headers, body
 
-    def get_stack(self, stack_identifier):
+    def show_stack(self, stack_identifier):
         """Returns the details of a single stack."""
         url = "stacks/%s" % stack_identifier
         resp, body = self.get(url)
@@ -137,7 +137,7 @@
         body = json.loads(body)
         return service_client.ResponseBodyList(resp, body['resources'])
 
-    def get_resource(self, stack_identifier, resource_name):
+    def show_resource(self, stack_identifier, resource_name):
         """Returns the details of a single resource."""
         url = "stacks/%s/resources/%s" % (stack_identifier, resource_name)
         resp, body = self.get(url)
@@ -159,7 +159,7 @@
 
         while True:
             try:
-                body = self.get_resource(
+                body = self.show_resource(
                     stack_identifier, resource_name)
             except lib_exc.NotFound:
                 # ignore this, as the resource may not have
@@ -195,7 +195,7 @@
 
         while True:
             try:
-                body = self.get_stack(stack_identifier)
+                body = self.show_stack(stack_identifier)
             except lib_exc.NotFound:
                 if status == 'DELETE_COMPLETE':
                     return
@@ -295,14 +295,14 @@
         body = json.loads(body)
         return service_client.ResponseBodyList(resp, body['resource_types'])
 
-    def get_resource_type(self, resource_type_name):
+    def show_resource_type(self, resource_type_name):
         """Return the schema of a resource type."""
         url = 'resource_types/%s' % resource_type_name
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
         return service_client.ResponseBody(resp, json.loads(body))
 
-    def get_resource_type_template(self, resource_type_name):
+    def show_resource_type_template(self, resource_type_name):
         """Return the template of a resource type."""
         url = 'resource_types/%s/template' % resource_type_name
         resp, body = self.get(url)
@@ -320,7 +320,7 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_software_config(self, conf_id):
+    def show_software_config(self, conf_id):
         """Returns a software configuration resource."""
         url = 'software_configs/%s' % str(conf_id)
         resp, body = self.get(url)
@@ -365,7 +365,7 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_software_deploy_list(self):
+    def list_software_deployments(self):
         """Returns a list of all deployments."""
         url = 'software_deployments'
         resp, body = self.get(url)
@@ -373,7 +373,7 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_software_deploy(self, deploy_id):
+    def show_software_deployment(self, deploy_id):
         """Returns a specific software deployment."""
         url = 'software_deployments/%s' % str(deploy_id)
         resp, body = self.get(url)
@@ -381,7 +381,7 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_software_deploy_meta(self, server_id):
+    def show_software_deployment_metadata(self, server_id):
         """Return a config metadata for a specific server."""
         url = 'software_deployments/metadata/%s' % server_id
         resp, body = self.get(url)