Merge "Set 3h timeout for tempest-ipv6-only job"
diff --git a/releasenotes/notes/deprecate-spice-rdp-console-config-f2af173552axfb72.yaml b/releasenotes/notes/deprecate-spice-rdp-console-config-f2af173552axfb72.yaml
new file mode 100644
index 0000000..58b161f
--- /dev/null
+++ b/releasenotes/notes/deprecate-spice-rdp-console-config-f2af173552axfb72.yaml
@@ -0,0 +1,6 @@
+---
+deprecations:
+  - |
+    The config options ``CONF.compute.spice_console`` and ``CONF.compute.rdp_console``
+    are deprecated because test cases using them are removed.
+    We can add them back when adding the test cases again.
diff --git a/releasenotes/notes/intermediate-ussuri-release-8aebeca312a6718c.yaml b/releasenotes/notes/intermediate-ussuri-release-8aebeca312a6718c.yaml
index 6caeacd..56f160a 100644
--- a/releasenotes/notes/intermediate-ussuri-release-8aebeca312a6718c.yaml
+++ b/releasenotes/notes/intermediate-ussuri-release-8aebeca312a6718c.yaml
@@ -1,12 +1,12 @@
 ---
-prelude: >
+prelude: |
     This is an intermediate release during the Ussuri development cycle to
     mark the end of support for EM Queens in Tempest.
     After this release, Tempest will support below OpenStack Releases:
 
-      * Train
-      * Stein
-      * Rocky
+    * Train
+    * Stein
+    * Rocky
 
     Current development of Tempest is for OpenStack Ussuri development
     cycle.
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index 7cf26fb..eef2781 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -12,12 +12,14 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import testtools
+
 from tempest.api.compute import base
 from tempest.common import waiters
 from tempest import config
 from tempest.lib.common.utils import data_utils
 from tempest.lib import decorators
-import testtools
+from tempest.lib import exceptions as lib_exceptions
 
 CONF = config.CONF
 
@@ -51,12 +53,23 @@
         # in task_state image_snapshot
         self.addCleanup(waiters.wait_for_server_status, self.servers_client,
                         server['id'], 'ACTIVE')
-        image = self.create_image_from_server(server['id'],
-                                              wait_until='SAVING')
-        self.client.delete_image(image['id'])
-        msg = ('The image with ID {image_id} failed to be deleted'
-               .format(image_id=image['id']))
-        self.assertTrue(self.client.is_resource_deleted(image['id']), msg)
+        snapshot_name = data_utils.rand_name('test-snap')
+        try:
+            image = self.create_image_from_server(server['id'],
+                                                  name=snapshot_name,
+                                                  wait_until='SAVING')
+            self.client.delete_image(image['id'])
+            msg = ('The image with ID {image_id} failed to be deleted'
+                   .format(image_id=image['id']))
+            self.assertTrue(self.client.is_resource_deleted(image['id']),
+                            msg)
+            self.assertEqual(snapshot_name, image['name'])
+        except lib_exceptions.TimeoutException as ex:
+            # If timeout is reached, we don't need to check state,
+            # since, it wouldn't be a 'SAVING' state atleast and apart from
+            # it, this testcase doesn't have scope for other state transition
+            # Hence, skip the test.
+            raise self.skipException("This test is skipped because " + str(ex))
 
     @decorators.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
     def test_create_image_from_stopped_server(self):
diff --git a/tempest/config.py b/tempest/config.py
index 0f888d6..5a2d722 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -499,11 +499,19 @@
     cfg.BoolOpt('spice_console',
                 default=False,
                 help='Enable Spice console. This configuration value should '
-                     'be same as nova.conf: spice.enabled'),
+                     'be same as nova.conf: spice.enabled',
+                deprecated_for_removal=True,
+                deprecated_reason="This config option is not being used "
+                                  "in Tempest, we can add it back when "
+                                  "adding the test cases."),
     cfg.BoolOpt('rdp_console',
                 default=False,
                 help='Enable RDP console. This configuration value should '
-                     'be same as nova.conf: rdp.enabled'),
+                     'be same as nova.conf: rdp.enabled',
+                deprecated_for_removal=True,
+                deprecated_reason="This config option is not being used "
+                                  "in Tempest, we can add it back when "
+                                  "adding the test cases."),
     cfg.BoolOpt('serial_console',
                 default=False,
                 help='Enable serial console. This configuration value '
diff --git a/tempest/tests/lib/services/identity/v3/test_groups_client.py b/tempest/tests/lib/services/identity/v3/test_groups_client.py
index 38cf3ae..e3c9851 100644
--- a/tempest/tests/lib/services/identity/v3/test_groups_client.py
+++ b/tempest/tests/lib/services/identity/v3/test_groups_client.py
@@ -211,3 +211,13 @@
             group_id='6e13e2068cf9466e98950595baf6bb35',
             user_id='642688fa65a84217b86cef3c063de2b9',
         )
+
+    def test_delete_group_user(self):
+        self.check_service_client_function(
+            self.client.delete_group_user,
+            'tempest.lib.common.rest_client.RestClient.delete',
+            {},
+            status=204,
+            group_id='6e13e2068cf9466e98950595baf6bb35',
+            user_id='642688fa65a84217b86cef3c063de2b9',
+        )
diff --git a/tempest/tests/lib/services/image/v2/test_namespace_tags_client.py b/tempest/tests/lib/services/image/v2/test_namespace_tags_client.py
index 2faa5be..894e178 100644
--- a/tempest/tests/lib/services/image/v2/test_namespace_tags_client.py
+++ b/tempest/tests/lib/services/image/v2/test_namespace_tags_client.py
@@ -118,6 +118,14 @@
     def test_show_namespace_tag_with_bytes_body(self):
         self._test_show_namespace_tag_definition(bytes_body=True)
 
+    def test_delete_namespace_tag_definition(self):
+        self.check_service_client_function(
+            self.client.delete_namespace_tag,
+            'tempest.lib.common.rest_client.RestClient.delete',
+            {}, status=204,
+            namespace="OS::Compute::Hypervisor",
+            tag_name="added-sample-tag")
+
     def test_delete_all_namespace_tags(self):
         self.check_service_client_function(
             self.client.delete_namespace_tags,
diff --git a/tempest/tests/lib/services/network/test_routers_client.py b/tempest/tests/lib/services/network/test_routers_client.py
index 2fa5993..f5dcc7d 100644
--- a/tempest/tests/lib/services/network/test_routers_client.py
+++ b/tempest/tests/lib/services/network/test_routers_client.py
@@ -20,37 +20,78 @@
 class TestRoutersClient(base.BaseServiceTest):
     FAKE_CREATE_ROUTER = {
         "router": {
-            "name": u'\u2740(*\xb4\u25e1`*)\u2740',
+            "admin_state_up": True,
+            "availability_zone_hints": [],
+            "availability_zones": [
+                "nova"
+            ],
+            "created_at": "2018-03-19T19:17:04Z",
+            "description": "",
+            "distributed": False,
             "external_gateway_info": {
-                "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b",
                 "enable_snat": True,
                 "external_fixed_ips": [
                     {
-                        "subnet_id": "255.255.255.0",
-                        "ip": "192.168.10.1"
+                        "ip_address": "172.24.4.6",
+                        "subnet_id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf"
                     }
-                ]
+                ],
+                "network_id": "ae34051f-aa6c-4c75-abf5-50dc9ac99ef3"
             },
-            "admin_state_up": True,
-            "id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e"
+            "flavor_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0",
+            "ha": False,
+            "id": "f8a44de0-fc8e-45df-93c7-f79bf3b01c95",
+            "name": "router1",
+            "routes": [],
+            "revision_number": 1,
+            "status": "ACTIVE",
+            "updated_at": "2018-03-19T19:17:22Z",
+            "project_id": "0bd18306d801447bb457a46252d82d13",
+            "tenant_id": "0bd18306d801447bb457a46252d82d13",
+            "service_type_id": None,
+            "tags": ["tag1,tag2"],
+            "conntrack_helpers": []
         }
     }
 
     FAKE_UPDATE_ROUTER = {
         "router": {
-            "name": u'\u2740(*\xb4\u25e1`*)\u2740',
+            "admin_state_up": True,
+            "availability_zone_hints": [],
+            "availability_zones": [
+                "nova"
+            ],
+            "created_at": "2018-03-19T19:17:04Z",
+            "description": "",
+            "distributed": False,
             "external_gateway_info": {
-                "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b",
                 "enable_snat": True,
                 "external_fixed_ips": [
                     {
-                        "subnet_id": "255.255.255.0",
-                        "ip": "192.168.10.1"
+                        "ip_address": "172.24.4.6",
+                        "subnet_id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf"
                     }
-                ]
+                ],
+                "network_id": "ae34051f-aa6c-4c75-abf5-50dc9ac99ef3"
             },
-            "admin_state_up": False,
-            "id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e"
+            "flavor_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0",
+            "ha": False,
+            "id": "f8a44de0-fc8e-45df-93c7-f79bf3b01c95",
+            "name": "router1",
+            "revision_number": 3,
+            "routes": [
+                {
+                    "destination": "179.24.1.0/24",
+                    "nexthop": "172.24.3.99"
+                }
+            ],
+            "status": "ACTIVE",
+            "updated_at": "2018-03-19T19:17:22Z",
+            "project_id": "0bd18306d801447bb457a46252d82d13",
+            "tenant_id": "0bd18306d801447bb457a46252d82d13",
+            "service_type_id": None,
+            "tags": ["tag1,tag2"],
+            "conntrack_helpers": []
         }
     }