Merge "Fix KeyError in exception message of manager"
diff --git a/tempest/api/identity/admin/v3/test_domains.py b/tempest/api/identity/admin/v3/test_domains.py
index 15bea28..1729dc9 100644
--- a/tempest/api/identity/admin/v3/test_domains.py
+++ b/tempest/api/identity/admin/v3/test_domains.py
@@ -85,7 +85,7 @@
         self.assertEqual(new_desc, updated_domain['description'])
         self.assertEqual(True, updated_domain['enabled'])
 
-        fetched_domain = self.client.get_domain(domain['id'])['domain']
+        fetched_domain = self.client.show_domain(domain['id'])['domain']
         self.assertEqual(new_name, fetched_domain['name'])
         self.assertEqual(new_desc, fetched_domain['description'])
         self.assertEqual(True, fetched_domain['enabled'])
@@ -124,6 +124,6 @@
     @test.attr(type='smoke')
     @test.idempotent_id('17a5de24-e6a0-4e4a-a9ee-d85b6e5612b5')
     def test_default_domain_exists(self):
-        domain = self.client.get_domain(self.domain_id)['domain']
+        domain = self.client.show_domain(self.domain_id)['domain']
 
         self.assertTrue(domain['enabled'])
diff --git a/tempest/api/identity/admin/v3/test_list_projects.py b/tempest/api/identity/admin/v3/test_list_projects.py
index 5185fea..aaed467 100644
--- a/tempest/api/identity/admin/v3/test_list_projects.py
+++ b/tempest/api/identity/admin/v3/test_list_projects.py
@@ -44,8 +44,8 @@
         list_projects = self.client.list_projects()['projects']
 
         for p in self.project_ids:
-            get_project = self.client.get_project(p)['project']
-            self.assertIn(get_project, list_projects)
+            show_project = self.client.show_project(p)['project']
+            self.assertIn(show_project, list_projects)
 
     @test.idempotent_id('fab13f3c-f6a6-4b9f-829b-d32fd44fdf10')
     def test_list_projects_with_domains(self):
diff --git a/tempest/api/identity/admin/v3/test_projects.py b/tempest/api/identity/admin/v3/test_projects.py
index af9497c..2f4cc51 100644
--- a/tempest/api/identity/admin/v3/test_projects.py
+++ b/tempest/api/identity/admin/v3/test_projects.py
@@ -32,7 +32,7 @@
         desc1 = project['description']
         self.assertEqual(desc1, project_desc, 'Description should have '
                          'been sent in response for create')
-        body = self.client.get_project(project_id)['project']
+        body = self.client.show_project(project_id)['project']
         desc2 = body['description']
         self.assertEqual(desc2, project_desc, 'Description does not appear'
                          'to be set')
@@ -48,7 +48,7 @@
         project_id = project['id']
         self.assertEqual(project_name, project['name'])
         self.assertEqual(self.data.domain['id'], project['domain_id'])
-        body = self.client.get_project(project_id)['project']
+        body = self.client.show_project(project_id)['project']
         self.assertEqual(project_name, body['name'])
         self.assertEqual(self.data.domain['id'], body['domain_id'])
 
@@ -62,7 +62,7 @@
         project_id = project['id']
         en1 = project['enabled']
         self.assertTrue(en1, 'Enable should be True in response')
-        body = self.client.get_project(project_id)['project']
+        body = self.client.show_project(project_id)['project']
         en2 = body['enabled']
         self.assertTrue(en2, 'Enable should be True in lookup')
 
@@ -76,7 +76,7 @@
         en1 = project['enabled']
         self.assertEqual('false', str(en1).lower(),
                          'Enable should be False in response')
-        body = self.client.get_project(project['id'])['project']
+        body = self.client.show_project(project['id'])['project']
         en2 = body['enabled']
         self.assertEqual('false', str(en2).lower(),
                          'Enable should be False in lookup')
@@ -96,7 +96,7 @@
         resp2_name = body['name']
         self.assertNotEqual(resp1_name, resp2_name)
 
-        body = self.client.get_project(project['id'])['project']
+        body = self.client.show_project(project['id'])['project']
         resp3_name = body['name']
 
         self.assertNotEqual(resp1_name, resp3_name)
@@ -119,7 +119,7 @@
         resp2_desc = body['description']
         self.assertNotEqual(resp1_desc, resp2_desc)
 
-        body = self.client.get_project(project['id'])['project']
+        body = self.client.show_project(project['id'])['project']
         resp3_desc = body['description']
 
         self.assertNotEqual(resp1_desc, resp3_desc)
@@ -142,7 +142,7 @@
         resp2_en = body['enabled']
         self.assertNotEqual(resp1_en, resp2_en)
 
-        body = self.client.get_project(project['id'])['project']
+        body = self.client.show_project(project['id'])['project']
         resp3_en = body['enabled']
 
         self.assertNotEqual(resp1_en, resp3_en)
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index 85961b4..2ffc596 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -139,8 +139,8 @@
             self.assertEqual(self.delegated_role, trust['roles'][0]['name'])
             self.assertEqual(1, len(trust['roles']))
 
-    def get_trust(self):
-        trust_get = self.trustor_client.get_trust(self.trust_id)['trust']
+    def show_trust(self):
+        trust_get = self.trustor_client.show_trust(self.trust_id)['trust']
         return trust_get
 
     def validate_role(self, role):
@@ -155,12 +155,12 @@
 
     def check_trust_roles(self):
         # Check we find the delegated role
-        roles_get = self.trustor_client.get_trust_roles(
+        roles_get = self.trustor_client.list_trust_roles(
             self.trust_id)['roles']
         self.assertEqual(1, len(roles_get))
         self.validate_role(roles_get[0])
 
-        role_get = self.trustor_client.get_trust_role(
+        role_get = self.trustor_client.show_trust_role(
             self.trust_id, self.delegated_role_id)['role']
         self.validate_role(role_get)
 
@@ -169,7 +169,7 @@
 
         # And that we don't find not_delegated_role
         self.assertRaises(lib_exc.NotFound,
-                          self.trustor_client.get_trust_role,
+                          self.trustor_client.show_trust_role,
                           self.trust_id,
                           self.not_delegated_role_id)
 
@@ -181,7 +181,7 @@
     def delete_trust(self):
         self.trustor_client.delete_trust(self.trust_id)
         self.assertRaises(lib_exc.NotFound,
-                          self.trustor_client.get_trust,
+                          self.trustor_client.show_trust,
                           self.trust_id)
         self.trust_id = None
 
@@ -200,7 +200,7 @@
         trust = self.create_trust()
         self.validate_trust(trust)
 
-        trust_get = self.get_trust()
+        trust_get = self.show_trust()
         self.validate_trust(trust_get)
 
         self.check_trust_roles()
@@ -212,7 +212,7 @@
         trust = self.create_trust(impersonate=False)
         self.validate_trust(trust, impersonate=False)
 
-        trust_get = self.get_trust()
+        trust_get = self.show_trust()
         self.validate_trust(trust_get, impersonate=False)
 
         self.check_trust_roles()
@@ -236,7 +236,7 @@
         trust = self.create_trust(expires=expires_str)
         self.validate_trust(trust, expires=expires_str)
 
-        trust_get = self.get_trust()
+        trust_get = self.show_trust()
 
         self.validate_trust(trust_get, expires=expires_str)
 
@@ -255,7 +255,7 @@
     @test.idempotent_id('6268b345-87ca-47c0-9ce3-37792b43403a')
     def test_get_trusts_query(self):
         self.create_trust()
-        trusts_get = self.trustor_client.get_trusts(
+        trusts_get = self.trustor_client.list_trusts(
             trustor_user_id=self.trustor_user_id)['trusts']
         self.assertEqual(1, len(trusts_get))
         self.validate_trust(trusts_get[0], summary=True)
@@ -264,7 +264,7 @@
     @test.idempotent_id('4773ebd5-ecbf-4255-b8d8-b63e6f72b65d')
     def test_get_trusts_all(self):
         self.create_trust()
-        trusts_get = self.client.get_trusts()['trusts']
+        trusts_get = self.client.list_trusts()['trusts']
         trusts = [t for t in trusts_get
                   if t['id'] == self.trust_id]
         self.assertEqual(1, len(trusts))
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index 894a7a9..7c0c223 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -128,7 +128,7 @@
             project_body = self.client.create_project(
                 data_utils.rand_name('project'),
                 description=data_utils.rand_name('project-desc'))['project']
-            project = self.client.get_project(project_body['id'])['project']
+            project = self.client.show_project(project_body['id'])['project']
             # Delete the Project at the end of this method
             self.addCleanup(self.client.delete_project, project_body['id'])
             # Assigning roles to user on project
diff --git a/tempest/config.py b/tempest/config.py
index 6942172..14a6ad2 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1189,6 +1189,11 @@
                                     'live_migration, pause, rescue, resize '
                                     'shelve, snapshot, and suspend')
 
+
+# NOTE(deva): Ironic tests have been ported to tempest-lib. New config options
+#             should be added to ironic/ironic_tempest_plugin/config.py.
+#             However, these options need to remain here for testing stable
+#             branches until Liberty release reaches EOL.
 BaremetalGroup = [
     cfg.StrOpt('catalog_type',
                default='baremetal',
diff --git a/tempest/hacking/ignored_list_T110.txt b/tempest/hacking/ignored_list_T110.txt
index ce69931..f1f21d1 100644
--- a/tempest/hacking/ignored_list_T110.txt
+++ b/tempest/hacking/ignored_list_T110.txt
@@ -1,4 +1,3 @@
-./tempest/services/identity/v3/json/identity_client.py
 ./tempest/services/messaging/json/messaging_client.py
 ./tempest/services/object_storage/object_client.py
 ./tempest/services/telemetry/json/alarming_client.py
diff --git a/tempest/scenario/test_rebuild_instance_with_volume.py b/tempest/scenario/test_rebuild_instance_with_volume.py
deleted file mode 100644
index 7764425..0000000
--- a/tempest/scenario/test_rebuild_instance_with_volume.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 2016 Mirantis Inc.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest import config
-from tempest.scenario import manager
-from tempest import test
-
-CONF = config.CONF
-
-
-class TestRebuildInstanceWithVolume(manager.ScenarioTest):
-    """Verifying functionality of rebuilding instance with attached volume
-
-    The following is the scenario outline:
-    1. Boot an instance
-    2. Create a volume
-    3. Attach the volume to the instance
-    4. Create a file with timestamp on the volume
-    5. Rebuild the instance
-    6. Check existence of the file which was created at step #4
-    7. Detach the volume
-    """
-
-    @test.idempotent_id('36c3d492-f5bd-11e4-b9b2-1697f925ec7b')
-    @test.services('compute', 'volume', 'image', 'network')
-    def test_rebuild_instance_with_volume(self):
-        # create key pair and security group
-        keypair = self.create_keypair()
-        security_group = self._create_security_group()
-
-        # boot an instance
-        server = self.create_server(
-            image_id=CONF.compute.image_ref,
-            key_name=keypair['name'],
-            security_groups=[{'name': security_group['name']}],
-            wait_until='ACTIVE')
-
-        # get instance IP
-        server_ip = self.get_server_ip(server)
-
-        # create volume, attach it and create timestamp file on it
-        volume = self.create_volume()
-        attached_volume = self.nova_volume_attach(server, volume)
-        timestamp = self.create_timestamp(
-            server_ip,
-            dev_name=CONF.compute.volume_device_name,
-            private_key=keypair['private_key'])
-
-        # NOTE: for rebuild we use the same image,
-        # so we should verify that VM was actually rebuilt
-        ssh_client = self.get_remote_client(server_ip,
-                                            private_key=keypair['private_key'])
-        cmd_addstamp = 'sudo sh -c "echo \'#check_rebuild\' >> /etc/fstab"'
-        fstab = ssh_client.exec_command('%s; cat /etc/fstab' % cmd_addstamp)
-
-        # rebuild instance
-        self.rebuild_server(server['id'])
-
-        # verify that instance was actually rebuilt
-        actual_fstab = ssh_client.exec_command('cat /etc/fstab')
-        self.assertNotEqual(fstab, actual_fstab, 'Server was not rebuilt')
-
-        # check existence of the timestamp file in the volume
-        timestamp2 = self.get_timestamp(
-            server_ip,
-            dev_name=CONF.compute.volume_device_name,
-            private_key=keypair['private_key'])
-        self.assertEqual(timestamp, timestamp2)
-
-        # detach volume
-        self.nova_volume_detach(server, attached_volume)
diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index fba26d4..15f0577 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -149,7 +149,7 @@
         return service_client.ResponseBody(resp, body)
 
     def update_project(self, project_id, **kwargs):
-        body = self.get_project(project_id)['project']
+        body = self.show_project(project_id)['project']
         name = kwargs.get('name', body['name'])
         desc = kwargs.get('description', body['description'])
         en = kwargs.get('enabled', body['enabled'])
@@ -167,7 +167,7 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_project(self, project_id):
+    def show_project(self, project_id):
         """GET a Project."""
         resp, body = self.get("projects/%s" % project_id)
         self.expected_success(200, resp.status)
@@ -264,7 +264,7 @@
 
     def update_domain(self, domain_id, **kwargs):
         """Updates a domain."""
-        body = self.get_domain(domain_id)['domain']
+        body = self.show_domain(domain_id)['domain']
         description = kwargs.get('description', body['description'])
         en = kwargs.get('enabled', body['enabled'])
         name = kwargs.get('name', body['name'])
@@ -279,7 +279,7 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_domain(self, domain_id):
+    def show_domain(self, domain_id):
         """Get Domain details."""
         resp, body = self.get('domains/%s' % domain_id)
         self.expected_success(200, resp.status)
@@ -446,7 +446,7 @@
         self.expected_success(204, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def get_trusts(self, trustor_user_id=None, trustee_user_id=None):
+    def list_trusts(self, trustor_user_id=None, trustee_user_id=None):
         """GET trusts."""
         if trustor_user_id:
             resp, body = self.get("OS-TRUST/trusts?trustor_user_id=%s"
@@ -460,21 +460,21 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_trust(self, trust_id):
+    def show_trust(self, trust_id):
         """GET trust."""
         resp, body = self.get("OS-TRUST/trusts/%s" % trust_id)
         self.expected_success(200, resp.status)
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_trust_roles(self, trust_id):
+    def list_trust_roles(self, trust_id):
         """GET roles delegated by a trust."""
         resp, body = self.get("OS-TRUST/trusts/%s/roles" % trust_id)
         self.expected_success(200, resp.status)
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def get_trust_role(self, trust_id, role_id):
+    def show_trust_role(self, trust_id, role_id):
         """GET role delegated by a trust."""
         resp, body = self.get("OS-TRUST/trusts/%s/roles/%s"
                               % (trust_id, role_id))