Merge "Wait for VM ACTIVE state is added for fixed network case"
diff --git a/tempest/config.py b/tempest/config.py
index e7442ea..36f0152 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1354,9 +1354,9 @@
 
 The best use case is investigating used resources of one test.
 A test can be run as follows:
- $ stestr run --pdb TEST_ID
+$ stestr run --pdb TEST_ID
 or
- $ python -m testtools.run TEST_ID"""),
+$ python -m testtools.run TEST_ID"""),
     cfg.StrOpt('resource_name_prefix',
                default='tempest',
                help="Define the prefix name for the resources created by "
diff --git a/tempest/lib/common/rest_client.py b/tempest/lib/common/rest_client.py
index b656b7a..b360569 100644
--- a/tempest/lib/common/rest_client.py
+++ b/tempest/lib/common/rest_client.py
@@ -881,6 +881,11 @@
                 resp_body = self._parse_resp(resp_body)
             raise exceptions.Gone(resp_body, resp=resp)
 
+        if resp.status == 406:
+            if parse_resp:
+                resp_body = self._parse_resp(resp_body)
+            raise exceptions.NotAcceptable(resp_body, resp=resp)
+
         if resp.status == 409:
             if parse_resp:
                 resp_body = self._parse_resp(resp_body)
diff --git a/tempest/lib/exceptions.py b/tempest/lib/exceptions.py
index dd7885e..0242de2 100644
--- a/tempest/lib/exceptions.py
+++ b/tempest/lib/exceptions.py
@@ -94,6 +94,11 @@
     message = "Object not found"
 
 
+class NotAcceptable(ClientRestClientException):
+    status_code = 406
+    message = "Not Acceptable"
+
+
 class Conflict(ClientRestClientException):
     status_code = 409
     message = "Conflict with state of target resource"
diff --git a/tempest/scenario/test_unified_limits.py b/tempest/scenario/test_unified_limits.py
index 6e194f9..7e8f8b2 100644
--- a/tempest/scenario/test_unified_limits.py
+++ b/tempest/scenario/test_unified_limits.py
@@ -32,6 +32,13 @@
     credentials = ['primary', 'system_admin']
 
     @classmethod
+    def skip_checks(cls):
+        super(ImageQuotaTest, cls).skip_checks()
+        if not CONF.service_available.glance:
+            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+    @classmethod
     def resource_setup(cls):
         super(ImageQuotaTest, cls).resource_setup()