Merge "Remove baremetal xml support"
diff --git a/etc/whitelist.yaml b/etc/whitelist.yaml
index 1c12b6c..2d8b741 100644
--- a/etc/whitelist.yaml
+++ b/etc/whitelist.yaml
@@ -78,6 +78,8 @@
 ceilometer-acentral:
     - module: "ceilometer.central.manager"
       message: "403 Forbidden"
+    - module: "ceilometer.central.manager"
+      message: "get_samples\\(\\) got an unexpected keyword argument 'resources'"
 
 ceilometer-alarm-evaluator:
     - module: "ceilometer.alarm.service"
@@ -133,6 +135,8 @@
       message: "but the actual state is deleting to caller"
     - module: "nova.openstack.common.rpc.common"
       message: "Traceback \\(most recent call last"
+    - module: "nova.openstack.common.threadgroup"
+      message: "Service with host .* topic conductor exists."
 
 n-sch:
     - module: "nova.scheduler.filter_scheduler"
diff --git a/run_tempest.sh b/run_tempest.sh
index be9b38a..f6c330d 100755
--- a/run_tempest.sh
+++ b/run_tempest.sh
@@ -13,7 +13,7 @@
   echo "  -t, --serial             Run testr serially"
   echo "  -C, --config             Config file location"
   echo "  -h, --help               Print this usage message"
-  echo "  -d, --debug              Debug this script -- set -o xtrace"
+  echo "  -d, --debug              Run tests with testtools instead of testr. This allows you to use PDB"
   echo "  -l, --logging            Enable logging"
   echo "  -L, --logging-config     Logging config file location.  Default is etc/logging.conf"
   echo "  -- [TESTROPTIONS]        After the first '--' you can pass arbitrary arguments to testr "
@@ -26,6 +26,7 @@
 always_venv=0
 never_venv=0
 no_site_packages=0
+debug=0
 force=0
 wrapper=""
 config_file=""
@@ -50,7 +51,7 @@
     -n|--no-site-packages) no_site_packages=1;;
     -f|--force) force=1;;
     -u|--update) update=1;;
-    -d|--debug) set -o xtrace;;
+    -d|--debug) debug=1;;
     -C|--config) config_file=$2; shift;;
     -s|--smoke) testrargs+="smoke"; noseargs+="--attr=type=smoke";;
     -t|--serial) serial=1;;
@@ -94,6 +95,14 @@
   testr_init
   ${wrapper} find . -type f -name "*.pyc" -delete
   export OS_TEST_PATH=./tempest/test_discover
+  if [ $debug -eq 1 ]; then
+      if [ "$testrargs" = "" ]; then
+           testrargs="discover ./tempest/test_discover"
+      fi
+      ${wrapper} python -m testtools.run $testrargs
+      return $?
+  fi
+
   if [ $serial -eq 1 ]; then
       ${wrapper} testr run --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
   else
diff --git a/run_tests.sh b/run_tests.sh
index 3f00453..eaa7fd7 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -13,7 +13,7 @@
   echo "  -p, --pep8               Just run pep8"
   echo "  -c, --coverage           Generate coverage report"
   echo "  -h, --help               Print this usage message"
-  echo "  -d, --debug              Debug this script -- set -o xtrace"
+  echo "  -d, --debug              Run tests with testtools instead of testr. This allows you to use PDB"
   echo "  -- [TESTROPTIONS]        After the first '--' you can pass arbitrary arguments to testr "
 }
 
@@ -25,6 +25,7 @@
 always_venv=0
 never_venv=0
 no_site_packages=0
+debug=0
 force=0
 coverage=0
 wrapper=""
@@ -48,7 +49,7 @@
     -n|--no-site-packages) no_site_packages=1;;
     -f|--force) force=1;;
     -u|--update) update=1;;
-    -d|--debug) set -o xtrace;;
+    -d|--debug) debug=1;;
     -p|--pep8) let just_pep8=1;;
     -c|--coverage) coverage=1;;
     -t|--serial) serial=1;;
@@ -75,6 +76,14 @@
   testr_init
   ${wrapper} find . -type f -name "*.pyc" -delete
   export OS_TEST_PATH=./tempest/tests
+  if [ $debug -eq 1 ]; then
+      if [ "$testrargs" = "" ]; then
+          testrargs="discover ./tempest/tests"
+      fi
+      ${wrapper} python -m testtools.run $testrargs
+      return $?
+  fi
+
   if [ $serial -eq 1 ]; then
       ${wrapper} testr run --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
   else
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions.py b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
index 2c89391..56bd291 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
@@ -96,9 +96,7 @@
         # to specific server should change the association of the Floating IP
         # Create server so as to use for Multiple association
         new_name = rand_name('floating_server')
-        resp, body = self.servers_client.create_server(new_name,
-                                                       self.image_ref,
-                                                       self.flavor_ref)
+        resp, body = self.create_test_server(name=new_name)
         self.servers_client.wait_for_server_status(body['id'], 'ACTIVE')
         self.new_server_id = body['id']
 
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index bff6e14..2c67581 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -121,9 +121,7 @@
         # Create server and add the security group created
         # above to the server we just created
         server_name = data_utils.rand_name('server')
-        resp, server = self.servers_client.create_server(server_name,
-                                                         self.image_ref,
-                                                         self.flavor_ref)
+        resp, server = self.create_test_server(name=server_name)
         server_id = server['id']
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
         resp, body = self.servers_client.add_security_group(server_id,
diff --git a/tempest/api/compute/servers/test_server_metadata.py b/tempest/api/compute/servers/test_server_metadata.py
index 80ac4da..ad4931c 100644
--- a/tempest/api/compute/servers/test_server_metadata.py
+++ b/tempest/api/compute/servers/test_server_metadata.py
@@ -14,8 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ServerMetadataTestJSON(base.BaseV2ComputeTest):
@@ -28,8 +27,6 @@
         cls.quotas = cls.quotas_client
         cls.admin_client = cls._get_identity_admin_client()
         resp, tenants = cls.admin_client.list_tenants()
-        cls.tenant_id = [tnt['id'] for tnt in tenants if tnt['name'] ==
-                         cls.client.tenant_name][0]
         resp, server = cls.create_test_server(meta={}, wait_until='ACTIVE')
 
         cls.server_id = server['id']
@@ -40,7 +37,7 @@
         resp, _ = self.client.set_server_metadata(self.server_id, meta)
         self.assertEqual(resp.status, 200)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_server_metadata(self):
         # All metadata key/value pairs for a server should be returned
         resp, resp_metadata = self.client.list_server_metadata(self.server_id)
@@ -50,7 +47,7 @@
         expected = {'key1': 'value1', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_server_metadata(self):
         # The server's metadata should be replaced with the provided values
         # Create a new set of metadata for the server
@@ -64,22 +61,7 @@
         resp, resp_metadata = self.client.list_server_metadata(self.server_id)
         self.assertEqual(resp_metadata, req_metadata)
 
-    @attr(type='gate')
-    def test_server_create_metadata_key_too_long(self):
-        # Attempt to start a server with a meta-data key that is > 255
-        # characters
-
-        # Try a few values
-        for sz in [256, 257, 511, 1023]:
-            key = "k" * sz
-            meta = {key: 'data1'}
-            self.assertRaises(exceptions.OverLimit,
-                              self.create_test_server,
-                              meta=meta)
-
-        # no teardown - all creates should fail
-
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_server_metadata(self):
         # The server's metadata values should be updated to the
         # provided values
@@ -93,7 +75,7 @@
         expected = {'key1': 'alt1', 'key2': 'value2', 'key3': 'value3'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_metadata_empty_body(self):
         # The original metadata should not be lost if empty metadata body is
         # passed
@@ -103,14 +85,14 @@
         expected = {'key1': 'value1', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_server_metadata_item(self):
         # The value for a specific metadata key should be returned
         resp, meta = self.client.get_server_metadata_item(self.server_id,
                                                           'key2')
         self.assertEqual('value2', meta['key2'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_server_metadata_item(self):
         # The item's value should be updated to the provided value
         # Update the metadata value
@@ -124,7 +106,7 @@
         expected = {'key1': 'value1', 'key2': 'value2', 'nova': 'alt'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_server_metadata_item(self):
         # The metadata value/key pair should be deleted from the server
         resp, meta = self.client.delete_server_metadata_item(self.server_id,
@@ -136,80 +118,6 @@
         expected = {'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type=['negative', 'gate'])
-    def test_server_metadata_negative(self):
-        # Blank key should trigger an error.
-        meta = {'': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
-                          self.create_test_server,
-                          meta=meta)
-
-        # GET on a non-existent server should not succeed
-        self.assertRaises(exceptions.NotFound,
-                          self.client.get_server_metadata_item, 999, 'test2')
-
-        # List metadata on a non-existent server should not succeed
-        self.assertRaises(exceptions.NotFound,
-                          self.client.list_server_metadata, 999)
-
-        # Raise BadRequest if key in uri does not match
-        # the key passed in body.
-        meta = {'testkey': 'testvalue'}
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.set_server_metadata_item,
-                          self.server_id, 'key', meta)
-
-        # Set metadata on a non-existent server should not succeed
-        meta = {'meta1': 'data1'}
-        self.assertRaises(exceptions.NotFound,
-                          self.client.set_server_metadata, 999, meta)
-
-        # An update should not happen for a non-existent image
-        meta = {'key1': 'value1', 'key2': 'value2'}
-        self.assertRaises(exceptions.NotFound,
-                          self.client.update_server_metadata, 999, meta)
-
-        # Blank key should trigger an error
-        meta = {'': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.update_server_metadata,
-                          self.server_id, meta=meta)
-
-        # Should not be able to delete metadata item from a non-existent server
-        self.assertRaises(exceptions.NotFound,
-                          self.client.delete_server_metadata_item, 999, 'd')
-
-        # Raise a 413 OverLimit exception while exceeding metadata items limit
-        # for tenant.
-        _, quota_set = self.quotas.get_quota_set(self.tenant_id)
-        quota_metadata = quota_set['metadata_items']
-        req_metadata = {}
-        for num in range(1, quota_metadata + 2):
-            req_metadata['key' + str(num)] = 'val' + str(num)
-        self.assertRaises(exceptions.OverLimit,
-                          self.client.set_server_metadata,
-                          self.server_id, req_metadata)
-
-        # Raise a 413 OverLimit exception while exceeding metadata items limit
-        # for tenant (update).
-        self.assertRaises(exceptions.OverLimit,
-                          self.client.update_server_metadata,
-                          self.server_id, req_metadata)
-
-        # Raise a bad request error for blank key.
-        # set_server_metadata will replace all metadata with new value
-        meta = {'': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.set_server_metadata,
-                          self.server_id, meta=meta)
-
-        # Raise a bad request error for a missing metadata field
-        # set_server_metadata will replace all metadata with new value
-        meta = {'meta1': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.set_server_metadata,
-                          self.server_id, meta=meta, no_metadata_field=True)
-
 
 class ServerMetadataTestXML(ServerMetadataTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/servers/test_server_metadata_negative.py b/tempest/api/compute/servers/test_server_metadata_negative.py
new file mode 100644
index 0000000..d12f91c
--- /dev/null
+++ b/tempest/api/compute/servers/test_server_metadata_negative.py
@@ -0,0 +1,165 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack Foundation
+# 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.api.compute import base
+from tempest.common.utils import data_utils
+from tempest import exceptions
+from tempest import test
+
+
+class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(ServerMetadataNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.servers_client
+        cls.quotas = cls.quotas_client
+        cls.admin_client = cls._get_identity_admin_client()
+        resp, tenants = cls.admin_client.list_tenants()
+        cls.tenant_id = [tnt['id'] for tnt in tenants if tnt['name'] ==
+                         cls.client.tenant_name][0]
+        resp, server = cls.create_test_server(meta={}, wait_until='ACTIVE')
+
+        cls.server_id = server['id']
+
+    @test.attr(type=['gate', 'negative'])
+    def test_server_create_metadata_key_too_long(self):
+        # Attempt to start a server with a meta-data key that is > 255
+        # characters
+
+        # Tryset_server_metadata_item a few values
+        for sz in [256, 257, 511, 1023]:
+            key = "k" * sz
+            meta = {key: 'data1'}
+            self.assertRaises(exceptions.OverLimit,
+                              self.create_test_server,
+                              meta=meta)
+
+        # no teardown - all creates should fail
+
+    @test.attr(type=['negative', 'gate'])
+    def test_create_server_metadata_blank_key(self):
+        # Blank key should trigger an error.
+        meta = {'': 'data1'}
+        self.assertRaises(exceptions.BadRequest,
+                          self.create_test_server,
+                          meta=meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_server_metadata_non_existent_server(self):
+        # GET on a non-existent server should not succeed
+        non_existent_server_id = data_utils.rand_uuid()
+        self.assertRaises(exceptions.NotFound,
+                          self.client.get_server_metadata_item,
+                          non_existent_server_id,
+                          'test2')
+
+    @test.attr(type=['negative', 'gate'])
+    def test_list_server_metadata_non_existent_server(self):
+        # List metadata on a non-existent server should not succeed
+        non_existent_server_id = data_utils.rand_uuid()
+        self.assertRaises(exceptions.NotFound,
+                          self.client.list_server_metadata,
+                          non_existent_server_id)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_wrong_key_passed_in_body(self):
+        # Raise BadRequest if key in uri does not match
+        # the key passed in body.
+        meta = {'testkey': 'testvalue'}
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.set_server_metadata_item,
+                          self.server_id, 'key', meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_set_metadata_non_existent_server(self):
+        # Set metadata on a non-existent server should not succeed
+        non_existent_server_id = data_utils.rand_uuid()
+        meta = {'meta1': 'data1'}
+        self.assertRaises(exceptions.NotFound,
+                          self.client.set_server_metadata,
+                          non_existent_server_id,
+                          meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_update_metadata_non_existent_server(self):
+        # An update should not happen for a non-existent server
+        non_existent_server_id = data_utils.rand_uuid()
+        meta = {'key1': 'value1', 'key2': 'value2'}
+        self.assertRaises(exceptions.NotFound,
+                          self.client.update_server_metadata,
+                          non_existent_server_id,
+                          meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_update_metadata_with_blank_key(self):
+        # Blank key should trigger an error
+        meta = {'': 'data1'}
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.update_server_metadata,
+                          self.server_id, meta=meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_delete_metadata_non_existent_server(self):
+        # Should not be able to delete metadata item from a non-existent server
+        non_existent_server_id = data_utils.rand_uuid()
+        self.assertRaises(exceptions.NotFound,
+                          self.client.delete_server_metadata_item,
+                          non_existent_server_id,
+                          'd')
+
+    @test.attr(type=['negative', 'gate'])
+    def test_metadata_items_limit(self):
+        # Raise a 413 OverLimit exception while exceeding metadata items limit
+        # for tenant.
+        _, quota_set = self.quotas.get_quota_set(self.tenant_id)
+        quota_metadata = quota_set['metadata_items']
+        req_metadata = {}
+        for num in range(1, quota_metadata + 2):
+            req_metadata['key' + str(num)] = 'val' + str(num)
+        self.assertRaises(exceptions.OverLimit,
+                          self.client.set_server_metadata,
+                          self.server_id, req_metadata)
+
+        # Raise a 413 OverLimit exception while exceeding metadata items limit
+        # for tenant (update).
+        self.assertRaises(exceptions.OverLimit,
+                          self.client.update_server_metadata,
+                          self.server_id, req_metadata)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_set_server_metadata_blank_key(self):
+        # Raise a bad request error for blank key.
+        # set_server_metadata will replace all metadata with new value
+        meta = {'': 'data1'}
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.set_server_metadata,
+                          self.server_id, meta=meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_set_server_metadata_missing_metadata(self):
+        # Raise a bad request error for a missing metadata field
+        # set_server_metadata will replace all metadata with new value
+        meta = {'meta1': 'data1'}
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.set_server_metadata,
+                          self.server_id, meta=meta, no_metadata_field=True)
+
+
+class ServerMetadataNegativeTestXML(ServerMetadataNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/v3/admin/test_servers.py b/tempest/api/compute/v3/admin/test_servers.py
index f6f5673..a8e1a0a 100644
--- a/tempest/api/compute/v3/admin/test_servers.py
+++ b/tempest/api/compute/v3/admin/test_servers.py
@@ -15,6 +15,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
+from tempest import test
 from tempest.test import attr
 from tempest.test import skip_because
 
@@ -62,6 +63,7 @@
         self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
+    @test.skip_because(bug='1265416')
     @attr(type='gate')
     def test_list_servers_by_admin_with_all_tenants(self):
         # Listing servers by admin user with all tenants parameter
diff --git a/tempest/api/compute/v3/images/test_images_oneserver.py b/tempest/api/compute/v3/images/test_images_oneserver.py
index babf452..fb54942 100644
--- a/tempest/api/compute/v3/images/test_images_oneserver.py
+++ b/tempest/api/compute/v3/images/test_images_oneserver.py
@@ -119,10 +119,6 @@
 
     @attr(type=['gate'])
     def test_create_image_specify_multibyte_character_image_name(self):
-        if self.__class__._interface == "xml":
-            # NOTE(sdague): not entirely accurage, but we'd need a ton of work
-            # in our XML client to make this good
-            raise self.skipException("Not testable in XML")
         # prefix character is:
         # http://www.fileformat.info/info/unicode/char/1F4A9/index.htm
         utf8_name = data_utils.rand_name(u'\xF0\x9F\x92\xA9')
diff --git a/tempest/api/compute/v3/images/test_images_oneserver_negative.py b/tempest/api/compute/v3/images/test_images_oneserver_negative.py
index dc628dc..d9e7882 100644
--- a/tempest/api/compute/v3/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/v3/images/test_images_oneserver_negative.py
@@ -85,8 +85,6 @@
     @skip_because(bug="1006725")
     @attr(type=['negative', 'gate'])
     def test_create_image_specify_multibyte_character_image_name(self):
-        if self.__class__._interface == "xml":
-            raise self.skipException("Not testable in XML")
         # invalid multibyte sequence from:
         # http://stackoverflow.com/questions/1301402/
         #     example-invalid-utf8-string
diff --git a/tempest/api/compute/v3/images/test_list_image_filters.py b/tempest/api/compute/v3/images/test_list_image_filters.py
index ad93b3d..f654920 100644
--- a/tempest/api/compute/v3/images/test_list_image_filters.py
+++ b/tempest/api/compute/v3/images/test_list_image_filters.py
@@ -135,8 +135,6 @@
         # Verify only the expected number of results are returned
         params = {'limit': '1'}
         resp, images = self.client.list_images(params)
-        # when _interface='xml', one element for images_links in images
-        # ref: Question #224349
         self.assertEqual(1, len([x for x in images if 'id' in x]))
 
     @attr(type='gate')
diff --git a/tempest/api/compute/v3/servers/test_list_server_filters.py b/tempest/api/compute/v3/servers/test_list_server_filters.py
index 15d6fa2..8698d97 100644
--- a/tempest/api/compute/v3/servers/test_list_server_filters.py
+++ b/tempest/api/compute/v3/servers/test_list_server_filters.py
@@ -123,7 +123,6 @@
         # Verify only the expected number of servers are returned
         params = {'limit': 1}
         resp, servers = self.client.list_servers(params)
-        # when _interface='xml', one element for servers_links in servers
         self.assertEqual(1, len([x for x in servers['servers'] if 'id' in x]))
 
     @utils.skip_unless_attr('multiple_images', 'Only one image found')
diff --git a/tempest/api/compute/v3/servers/test_list_servers_negative.py b/tempest/api/compute/v3/servers/test_list_servers_negative.py
index 10d36bf..23f2bda 100644
--- a/tempest/api/compute/v3/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_list_servers_negative.py
@@ -103,7 +103,6 @@
         # List servers by specifying limits
         resp, body = self.client.list_servers({'limit': 1})
         self.assertEqual('200', resp['status'])
-        # when _interface='xml', one element for servers_links in servers
         self.assertEqual(1, len([x for x in body['servers'] if 'id' in x]))
 
     @attr(type=['negative', 'gate'])
diff --git a/tempest/api/compute/v3/servers/test_servers_negative.py b/tempest/api/compute/v3/servers/test_servers_negative.py
index e58d33d..aadba77 100644
--- a/tempest/api/compute/v3/servers/test_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_servers_negative.py
@@ -155,9 +155,6 @@
     @test.attr(type=['negative', 'gate'])
     def test_create_numeric_server_name(self):
         # Create a server with a numeric name
-        if self.__class__._interface == "xml":
-            raise self.skipException("Not testable in XML")
-
         server_name = 12345
         self.assertRaises(exceptions.BadRequest,
                           self.create_test_server,
diff --git a/tempest/api/data_processing/__init__.py b/tempest/api/data_processing/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/data_processing/__init__.py
diff --git a/tempest/api/data_processing/base.py b/tempest/api/data_processing/base.py
new file mode 100644
index 0000000..ab882cd
--- /dev/null
+++ b/tempest/api/data_processing/base.py
@@ -0,0 +1,91 @@
+# Copyright (c) 2013 Mirantis Inc.
+#
+# 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
+import tempest.test
+
+
+CONF = config.CONF
+
+
+class BaseDataProcessingTest(tempest.test.BaseTestCase):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(BaseDataProcessingTest, cls).setUpClass()
+        os = cls.get_client_manager()
+        if not CONF.service_available.savanna:
+            raise cls.skipException("Savanna support is required")
+        cls.client = os.data_processing_client
+
+        # set some constants
+        cls.flavor_ref = CONF.compute.flavor_ref
+        cls.simple_node_group_template = {
+            'plugin_name': 'vanilla',
+            'hadoop_version': '1.2.1',
+            'node_processes': [
+                "datanode",
+                "tasktracker"
+            ],
+            'flavor_id': cls.flavor_ref,
+            'node_configs': {
+                'HDFS': {
+                    'Data Node Heap Size': 1024
+                },
+                'MapReduce': {
+                    'Task Tracker Heap Size': 1024
+                }
+            }
+        }
+
+        # add lists for watched resources
+        cls._node_group_templates = []
+
+    @classmethod
+    def tearDownClass(cls):
+        # cleanup node group templates
+        for ngt_id in cls._node_group_templates:
+            try:
+                cls.client.delete_node_group_template(ngt_id)
+            except Exception:
+                # ignore errors while auto removing created resource
+                pass
+
+        super(BaseDataProcessingTest, cls).tearDownClass()
+
+    @classmethod
+    def create_node_group_template(cls, name, plugin_name, hadoop_version,
+                                   node_processes, flavor_id,
+                                   node_configs=None, **kwargs):
+        """Creates watched node group template with specified params.
+
+        It supports passing additional params using kwargs and returns created
+        object. All resources created in this method will be automatically
+        removed in tearDownClass method.
+        """
+
+        resp, body = cls.client.create_node_group_template(name, plugin_name,
+                                                           hadoop_version,
+                                                           node_processes,
+                                                           flavor_id,
+                                                           node_configs,
+                                                           **kwargs)
+
+        # store id of created node group template
+        template_id = body['id']
+        cls._node_group_templates.append(template_id)
+
+        return resp, body, template_id
diff --git a/tempest/api/data_processing/test_node_group_templates.py b/tempest/api/data_processing/test_node_group_templates.py
new file mode 100644
index 0000000..ff4fa6a
--- /dev/null
+++ b/tempest/api/data_processing/test_node_group_templates.py
@@ -0,0 +1,83 @@
+# Copyright (c) 2013 Mirantis Inc.
+#
+# 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.api.data_processing import base as dp_base
+from tempest.common.utils import data_utils
+from tempest.test import attr
+
+
+class NodeGroupTemplateTest(dp_base.BaseDataProcessingTest):
+    def _create_simple_node_group_template(self, template_name=None):
+        """Creates simple Node Group Template with optional name specified.
+
+        It creates template and ensures response status and template name.
+        Returns id and name of created template.
+        """
+
+        if template_name is None:
+            # generate random name if it's not specified
+            template_name = data_utils.rand_name('savanna')
+
+        # create simple node group template
+        resp, body, template_id = self.create_node_group_template(
+            template_name, **self.simple_node_group_template)
+
+        # ensure that template created successfully
+        self.assertEqual(202, resp.status)
+        self.assertEqual(template_name, body['name'])
+
+        return template_id, template_name
+
+    @attr(type='smoke')
+    def test_node_group_template_create(self):
+        # just create and ensure template
+        self._create_simple_node_group_template()
+
+    @attr(type='smoke')
+    def test_node_group_template_list(self):
+        template_info = self._create_simple_node_group_template()
+
+        # check for node group template in list
+        resp, templates = self.client.list_node_group_templates()
+
+        self.assertEqual(200, resp.status)
+        templates_info = list([(template['id'], template['name'])
+                               for template in templates])
+        self.assertIn(template_info, templates_info)
+
+    @attr(type='smoke')
+    def test_node_group_template_get(self):
+        template_id, template_name = self._create_simple_node_group_template()
+
+        # check node group template fetch by id
+        resp, template = self.client.get_node_group_template(template_id)
+
+        self.assertEqual(200, resp.status)
+        self.assertEqual(template_name, template['name'])
+        self.assertEqual(self.simple_node_group_template['plugin_name'],
+                         template['plugin_name'])
+        self.assertEqual(self.simple_node_group_template['node_processes'],
+                         template['node_processes'])
+        self.assertEqual(self.simple_node_group_template['flavor_id'],
+                         template['flavor_id'])
+
+    @attr(type='smoke')
+    def test_node_group_template_delete(self):
+        template_id, template_name = self._create_simple_node_group_template()
+
+        # delete the node group template by id
+        resp = self.client.delete_node_group_template(template_id)
+
+        self.assertEqual('204', resp[0]['status'])
diff --git a/tempest/api/network/test_routers.py b/tempest/api/network/test_routers.py
index 426273c..7cabb63 100644
--- a/tempest/api/network/test_routers.py
+++ b/tempest/api/network/test_routers.py
@@ -149,6 +149,7 @@
             {'network_id': self.network_cfg.public_network_id})
         self._verify_gateway_port(router['id'])
 
+    @test.requires_ext(extension='ext-gw-mode', service='network')
     @test.attr(type='smoke')
     def test_update_router_set_gateway_with_snat_explicit(self):
         router = self.create_router(data_utils.rand_name('router-'))
@@ -163,6 +164,7 @@
              'enable_snat': True})
         self._verify_gateway_port(router['id'])
 
+    @test.requires_ext(extension='ext-gw-mode', service='network')
     @test.attr(type='smoke')
     def test_update_router_set_gateway_without_snat(self):
         router = self.create_router(data_utils.rand_name('router-'))
@@ -190,6 +192,7 @@
             device_id=router['id'])
         self.assertFalse(list_body['ports'])
 
+    @test.requires_ext(extension='ext-gw-mode', service='network')
     @test.attr(type='smoke')
     def test_update_router_reset_gateway_without_snat(self):
         router = self.create_router(
diff --git a/tempest/api/object_storage/test_account_services_negative.py b/tempest/api/object_storage/test_account_services_negative.py
index 3b07e17..c8f8096 100644
--- a/tempest/api/object_storage/test_account_services_negative.py
+++ b/tempest/api/object_storage/test_account_services_negative.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
 #
 # Author: Joe H. Rahme <joe.hakim.rahme@enovance.com>
diff --git a/tempest/api/object_storage/test_container_acl_negative.py b/tempest/api/object_storage/test_container_acl_negative.py
index e75f21d..f8f29de 100644
--- a/tempest/api/object_storage/test_container_acl_negative.py
+++ b/tempest/api/object_storage/test_container_acl_negative.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
 #
 # Author: Joe H. Rahme <joe.hakim.rahme@enovance.com>
diff --git a/tempest/api/object_storage/test_container_services.py b/tempest/api/object_storage/test_container_services.py
index 0d477d9..18199ef 100644
--- a/tempest/api/object_storage/test_container_services.py
+++ b/tempest/api/object_storage/test_container_services.py
@@ -43,6 +43,7 @@
         # create a container
         container_name = data_utils.rand_name(name='TestContainer')
         resp, _ = self.container_client.create_container(container_name)
+        self.assertHeaders(resp, 'Container', 'PUT')
         self.containers.append(container_name)
         # delete container
         resp, _ = self.container_client.delete_container(container_name)
@@ -58,12 +59,14 @@
         # create a container
         container_name = data_utils.rand_name(name='TestContainer')
         resp, _ = self.container_client.create_container(container_name)
+        self.assertHeaders(resp, 'Container', 'PUT')
         self.containers.append(container_name)
         # create object
         object_name = data_utils.rand_name(name='TestObject')
         data = data_utils.arbitrary_string()
         resp, _ = self.object_client.create_object(container_name,
                                                    object_name, data)
+        self.assertHeaders(resp, 'Object', 'PUT')
         # set object metadata
         meta_key = data_utils.rand_name(name='Meta-Test-')
         meta_value = data_utils.rand_name(name='MetaValue-')
@@ -71,6 +74,7 @@
         resp, _ = self.object_client.update_object_metadata(container_name,
                                                             object_name,
                                                             orig_metadata)
+        self.assertHeaders(resp, 'Object', 'POST')
         # get container contents list
         params = {'format': 'json'}
         resp, object_list = \
@@ -91,6 +95,7 @@
         # create a container
         container_name = data_utils.rand_name(name='TestContainer')
         resp, _ = self.container_client.create_container(container_name)
+        self.assertHeaders(resp, 'Container', 'PUT')
         self.containers.append(container_name)
         # update container metadata
         metadata = {'name': 'Pictures',
diff --git a/tempest/api/object_storage/test_object_expiry.py b/tempest/api/object_storage/test_object_expiry.py
index 7ca0e51..3aae0a1 100644
--- a/tempest/api/object_storage/test_object_expiry.py
+++ b/tempest/api/object_storage/test_object_expiry.py
@@ -28,30 +28,34 @@
         cls.container_name = data_utils.rand_name(name='TestContainer')
         cls.container_client.create_container(cls.container_name)
 
+    def setUp(self):
+        super(ObjectExpiryTest, self).setUp()
+        # create object
+        self.object_name = data_utils.rand_name(name='TestObject')
+        resp, _ = self.object_client.create_object(self.container_name,
+                                                   self.object_name, '')
+
     @classmethod
     def tearDownClass(cls):
         cls.delete_containers([cls.container_name])
         super(ObjectExpiryTest, cls).tearDownClass()
 
     def _test_object_expiry(self, metadata):
-        # create object
-        object_name = data_utils.rand_name(name='TestObject')
-        resp, _ = self.object_client.create_object(self.container_name,
-                                                   object_name, '')
         # update object metadata
         resp, _ = \
             self.object_client.update_object_metadata(self.container_name,
-                                                      object_name, metadata,
+                                                      self.object_name,
+                                                      metadata,
                                                       metadata_prefix='')
         # verify object metadata
         resp, _ = \
             self.object_client.list_object_metadata(self.container_name,
-                                                    object_name)
+                                                    self.object_name)
         self.assertEqual(resp['status'], '200')
         self.assertHeaders(resp, 'Object', 'HEAD')
         self.assertIn('x-delete-at', resp)
         resp, body = self.object_client.get_object(self.container_name,
-                                                   object_name)
+                                                   self.object_name)
         self.assertEqual(resp['status'], '200')
         self.assertHeaders(resp, 'Object', 'GET')
         self.assertIn('x-delete-at', resp)
@@ -61,7 +65,7 @@
 
         # object should not be there anymore
         self.assertRaises(exceptions.NotFound, self.object_client.get_object,
-                          self.container_name, object_name)
+                          self.container_name, self.object_name)
 
     @attr(type='gate')
     def test_get_object_after_expiry_time(self):
diff --git a/tempest/api/object_storage/test_object_formpost_negative.py b/tempest/api/object_storage/test_object_formpost_negative.py
index a07e277..e02a058 100644
--- a/tempest/api/object_storage/test_object_formpost_negative.py
+++ b/tempest/api/object_storage/test_object_formpost_negative.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
 # Author: Joe H. Rahme <joe.hakim.rahme@enovance.com>
 #
diff --git a/tempest/api/object_storage/test_object_services.py b/tempest/api/object_storage/test_object_services.py
index 13f197b..bca9b93 100644
--- a/tempest/api/object_storage/test_object_services.py
+++ b/tempest/api/object_storage/test_object_services.py
@@ -14,7 +14,6 @@
 #    under the License.
 
 import hashlib
-import re
 
 from tempest.api.object_storage import base
 from tempest.common import custom_matchers
@@ -264,23 +263,15 @@
         resp, _ = self.object_client.list_object_metadata(
             self.container_name, object_name)
 
-        # Check only the existence of common headers with custom matcher
-        self.assertThat(resp, custom_matchers.ExistsAllResponseHeaders(
-                        'Object', 'HEAD'))
-        self.assertIn('x-object-manifest', resp)
-
         # Etag value of a large object is enclosed in double-quotations.
-        # This is a special case, therefore the formats of response headers
-        # are checked without a custom matcher.
+        # After etag quotes are checked they are removed and the response is
+        # checked if all common headers are present and well formatted
         self.assertTrue(resp['etag'].startswith('\"'))
         self.assertTrue(resp['etag'].endswith('\"'))
-        self.assertTrue(resp['etag'].strip('\"').isalnum())
-        self.assertTrue(re.match("^\d+\.?\d*\Z", resp['x-timestamp']))
-        self.assertNotEqual(len(resp['content-type']), 0)
-        self.assertTrue(re.match("^tx[0-9a-f]*-[0-9a-f]*$",
-                                 resp['x-trans-id']))
-        self.assertNotEqual(len(resp['date']), 0)
-        self.assertEqual(resp['accept-ranges'], 'bytes')
+        resp['etag'] = resp['etag'].strip('"')
+        self.assertHeaders(resp, 'Object', 'HEAD')
+
+        self.assertIn('x-object-manifest', resp)
         self.assertEqual(resp['x-object-manifest'],
                          '%s/%s/' % (self.container_name, object_name))
 
diff --git a/tempest/api/object_storage/test_object_slo.py b/tempest/api/object_storage/test_object_slo.py
index ee7f6a4..0443a80 100644
--- a/tempest/api/object_storage/test_object_slo.py
+++ b/tempest/api/object_storage/test_object_slo.py
@@ -14,7 +14,6 @@
 
 import hashlib
 import json
-import re
 
 from tempest.api.object_storage import base
 from tempest.common import custom_matchers
@@ -95,29 +94,19 @@
         return object_name
 
     def _assertHeadersSLO(self, resp, method):
-        # Check the existence of common headers with custom matcher
-        self.assertThat(resp, custom_matchers.ExistsAllResponseHeaders(
-                        'Object', method))
         # When sending GET or HEAD requests to SLO the response contains
         # 'X-Static-Large-Object' header
         if method in ('GET', 'HEAD'):
             self.assertIn('x-static-large-object', resp)
+            self.assertEqual(resp['x-static-large-object'], 'True')
 
-        # Check common headers for all HTTP methods
-        self.assertTrue(re.match("^tx[0-9a-f]*-[0-9a-f]*$",
-                                 resp['x-trans-id']))
-        self.assertTrue(resp['content-length'].isdigit())
-        self.assertNotEqual(len(resp['date']), 0)
         # Etag value of a large object is enclosed in double-quotations.
+        # After etag quotes are checked they are removed and the response is
+        # checked if all common headers are present and well formatted
         self.assertTrue(resp['etag'].startswith('\"'))
         self.assertTrue(resp['etag'].endswith('\"'))
-        self.assertTrue(resp['etag'].strip('\"').isalnum())
-        # Check header formats for a specific method
-        if method in ('GET', 'HEAD'):
-            self.assertTrue(re.match("^\d+\.?\d*\Z", resp['x-timestamp']))
-            self.assertNotEqual(len(resp['content-type']), 0)
-            self.assertEqual(resp['accept-ranges'], 'bytes')
-            self.assertEqual(resp['x-static-large-object'], 'True')
+        resp['etag'] = resp['etag'].strip('"')
+        self.assertHeaders(resp, 'Object', method)
 
     @test.attr(type='gate')
     def test_upload_manifest(self):
diff --git a/tempest/api/object_storage/test_object_temp_url_negative.py b/tempest/api/object_storage/test_object_temp_url_negative.py
index cc507c5..cf24f66 100644
--- a/tempest/api/object_storage/test_object_temp_url_negative.py
+++ b/tempest/api/object_storage/test_object_temp_url_negative.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
 #
 # Author: Joe H. Rahme <joe.hakim.rahme@enovance.com>
diff --git a/tempest/api/orchestration/stacks/test_templates.py b/tempest/api/orchestration/stacks/test_templates.py
index 6cbc872..2da819d 100644
--- a/tempest/api/orchestration/stacks/test_templates.py
+++ b/tempest/api/orchestration/stacks/test_templates.py
@@ -10,17 +10,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import logging
-
 from tempest.api.orchestration import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest.test import attr
 
 
-LOG = logging.getLogger(__name__)
-
-
 class TemplateYAMLTestJSON(base.BaseOrchestrationTest):
     _interface = 'json'
 
@@ -59,14 +53,6 @@
                                                          self.parameters)
         self.assertEqual('200', resp['status'])
 
-    @attr(type=['gate', 'negative'])
-    def test_validate_template_url(self):
-        """Validating template passing url to it."""
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.validate_template_url,
-                          template_url=self.invalid_template_url,
-                          parameters=self.parameters)
-
 
 class TemplateAWSTestJSON(TemplateYAMLTestJSON):
     template = """
diff --git a/tempest/api/orchestration/stacks/test_templates_negative.py b/tempest/api/orchestration/stacks/test_templates_negative.py
new file mode 100644
index 0000000..c55f6ee
--- /dev/null
+++ b/tempest/api/orchestration/stacks/test_templates_negative.py
@@ -0,0 +1,62 @@
+# Copyright 2014 NEC Corporation.  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.api.orchestration import base
+from tempest import exceptions
+from tempest import test
+
+
+class TemplateYAMLNegativeTestJSON(base.BaseOrchestrationTest):
+    _interface = 'json'
+
+    template = """
+HeatTemplateFormatVersion: '2012-12-12'
+Description: |
+  Template which creates only a new user
+Resources:
+  CfnUser:
+    Type: AWS::IAM::User
+"""
+
+    invalid_template_url = 'http://www.example.com/template.yaml'
+
+    @classmethod
+    def setUpClass(cls):
+        super(TemplateYAMLNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.orchestration_client
+        cls.parameters = {}
+
+    @test.attr(type=['gate', 'negative'])
+    def test_validate_template_url(self):
+        """Validating template passing url to it."""
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.validate_template_url,
+                          template_url=self.invalid_template_url,
+                          parameters=self.parameters)
+
+
+class TemplateAWSNegativeTestJSON(TemplateYAMLNegativeTestJSON):
+    template = """
+{
+  "AWSTemplateFormatVersion" : "2010-09-09",
+  "Description" : "Template which creates only a new user",
+  "Resources" : {
+    "CfnUser" : {
+      "Type" : "AWS::IAM::User"
+    }
+  }
+}
+"""
+
+    invalid_template_url = 'http://www.example.com/template.template'
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index 0ea999a..4add2c1 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -15,27 +15,12 @@
 
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
-from tempest.services.volume.json.admin import volume_types_client
 from tempest.test import attr
 
 
-class VolumeTypesTest(base.BaseVolumeV1Test):
+class VolumeTypesTest(base.BaseVolumeV1AdminTest):
     _interface = "json"
 
-    @classmethod
-    def setUpClass(cls):
-        super(VolumeTypesTest, cls).setUpClass()
-        adm_user = cls.config.identity.admin_username
-        adm_pass = cls.config.identity.admin_password
-        adm_tenant = cls.config.identity.admin_tenant_name
-        auth_url = cls.config.identity.uri
-
-        cls.client = volume_types_client.VolumeTypesClientJSON(cls.config,
-                                                               adm_user,
-                                                               adm_pass,
-                                                               auth_url,
-                                                               adm_tenant)
-
     def _delete_volume(self, volume_id):
         resp, _ = self.volumes_client.delete_volume(volume_id)
         self.assertEqual(202, resp.status)
diff --git a/tempest/cli/simple_read_only/test_cinder.py b/tempest/cli/simple_read_only/test_cinder.py
index f71a2de..5dcb708 100644
--- a/tempest/cli/simple_read_only/test_cinder.py
+++ b/tempest/cli/simple_read_only/test_cinder.py
@@ -18,7 +18,10 @@
 import subprocess
 
 import tempest.cli
+from tempest import config
 
+
+CONF = config.CONF
 LOG = logging.getLogger(__name__)
 
 
@@ -30,6 +33,13 @@
     their own. They only verify the structure of output if present.
     """
 
+    @classmethod
+    def setUpClass(cls):
+        if not CONF.service_available.cinder:
+            msg = ("%s skipped as Cinder is not available" % cls.__name__)
+            raise cls.skipException(msg)
+        super(SimpleReadOnlyCinderClientTest, cls).setUpClass()
+
     def test_cinder_fake_action(self):
         self.assertRaises(subprocess.CalledProcessError,
                           self.cinder,
@@ -47,6 +57,12 @@
 
     def test_cinder_volumes_list(self):
         self.cinder('list')
+        self.cinder('list', params='--all-tenants 1')
+        self.cinder('list', params='--all-tenants 0')
+        self.assertRaises(subprocess.CalledProcessError,
+                          self.cinder,
+                          'list',
+                          params='--all-tenants bad')
 
     def test_cinder_quota_class_show(self):
         """This CLI can accept and string as param."""
diff --git a/tempest/cli/simple_read_only/test_glance.py b/tempest/cli/simple_read_only/test_glance.py
index 0e0f995..b558190 100644
--- a/tempest/cli/simple_read_only/test_glance.py
+++ b/tempest/cli/simple_read_only/test_glance.py
@@ -35,6 +35,13 @@
     their own. They only verify the structure of output if present.
     """
 
+    @classmethod
+    def setUpClass(cls):
+        if not CONF.service_available.glance:
+            msg = ("%s skipped as Glance is not available" % cls.__name__)
+            raise cls.skipException(msg)
+        super(SimpleReadOnlyGlanceClientTest, cls).setUpClass()
+
     def test_glance_fake_action(self):
         self.assertRaises(subprocess.CalledProcessError,
                           self.glance,
diff --git a/tempest/cli/simple_read_only/test_nova.py b/tempest/cli/simple_read_only/test_nova.py
index 822e531..f8ba971 100644
--- a/tempest/cli/simple_read_only/test_nova.py
+++ b/tempest/cli/simple_read_only/test_nova.py
@@ -42,6 +42,13 @@
 
     """
 
+    @classmethod
+    def setUpClass(cls):
+        if not CONF.service_available.nova:
+            msg = ("%s skipped as Nova is not available" % cls.__name__)
+            raise cls.skipException(msg)
+        super(SimpleReadOnlyNovaClientTest, cls).setUpClass()
+
     def test_admin_fake_action(self):
         self.assertRaises(subprocess.CalledProcessError,
                           self.nova,
diff --git a/tempest/cli/simple_read_only/test_nova_manage.py b/tempest/cli/simple_read_only/test_nova_manage.py
index a92e8da..13a1589 100644
--- a/tempest/cli/simple_read_only/test_nova_manage.py
+++ b/tempest/cli/simple_read_only/test_nova_manage.py
@@ -16,9 +16,11 @@
 import subprocess
 
 import tempest.cli
+from tempest import config
 from tempest.openstack.common import log as logging
 
 
+CONF = config.CONF
 LOG = logging.getLogger(__name__)
 
 
@@ -34,6 +36,13 @@
 
     """
 
+    @classmethod
+    def setUpClass(cls):
+        if not CONF.service_available.nova:
+            msg = ("%s skipped as Nova is not available" % cls.__name__)
+            raise cls.skipException(msg)
+        super(SimpleReadOnlyNovaManageTest, cls).setUpClass()
+
     def test_admin_fake_action(self):
         self.assertRaises(subprocess.CalledProcessError,
                           self.nova_manage,
diff --git a/tempest/common/glance_http.py b/tempest/common/glance_http.py
index 2ce05ee..d8afab3 100644
--- a/tempest/common/glance_http.py
+++ b/tempest/common/glance_http.py
@@ -354,7 +354,7 @@
             # file. Closing socket too soon will cause response
             # reads to fail with socket IO error 'Bad file descriptor'.
             self.sock = None
-        super(VerifiedHTTPSConnection, self).close()
+        httplib.HTTPSConnection.close(self)
 
 
 class ResponseBodyIterator(object):
diff --git a/tempest/common/isolated_creds.py b/tempest/common/isolated_creds.py
index ea614c3..f2df061 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/isolated_creds.py
@@ -146,18 +146,28 @@
         else:
             self.identity_admin_client.tenants.delete(tenant)
 
-    def _create_creds(self, suffix=None, admin=False):
-        data_utils.rand_name_root = data_utils.rand_name(self.name)
-        if suffix:
-            data_utils.rand_name_root += suffix
-        tenant_name = data_utils.rand_name_root + "-tenant"
+    def _create_creds(self, suffix="", admin=False):
+        """Create random credentials under the following schema.
+
+        If the name contains a '.' is the full class path of something, and
+        we don't really care. If it isn't, it's probably a meaningful name,
+        so use it.
+
+        For logging purposes, -user and -tenant are long and redundant,
+        don't use them. The user# will be sufficient to figure it out.
+        """
+        if '.' in self.name:
+            root = ""
+        else:
+            root = self.name
+
+        tenant_name = data_utils.rand_name(root) + suffix
         tenant_desc = tenant_name + "-desc"
         tenant = self._create_tenant(name=tenant_name,
                                      description=tenant_desc)
-        if suffix:
-            data_utils.rand_name_root += suffix
-        username = data_utils.rand_name_root + "-user"
-        email = data_utils.rand_name_root + "@example.com"
+
+        username = data_utils.rand_name(root) + suffix
+        email = data_utils.rand_name(root) + suffix + "@example.com"
         user = self._create_user(username, self.password,
                                  tenant, email)
         if admin:
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index a90c924..b1fef99 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -126,21 +126,6 @@
 
         return self.token
 
-    def basic_auth(self, user, password, auth_url):
-        """
-        Provides authentication for the target API.
-        """
-
-        params = {}
-        params['headers'] = {'User-Agent': 'Test-Client', 'X-Auth-User': user,
-                             'X-Auth-Key': password}
-
-        resp, body = self.http_obj.request(auth_url, 'GET', **params)
-        try:
-            return resp['x-auth-token'], resp['x-server-management-url']
-        except Exception:
-            raise
-
     def keystone_auth(self, user, password, auth_url, service, tenant_name):
         """
         Provides authentication via Keystone using v2 identity API.
diff --git a/tempest/common/utils/data_utils.py b/tempest/common/utils/data_utils.py
index 2b2963c..cd32720 100644
--- a/tempest/common/utils/data_utils.py
+++ b/tempest/common/utils/data_utils.py
@@ -30,8 +30,12 @@
     return uuid.uuid4().hex
 
 
-def rand_name(name='test'):
-    return name + "-tempest-" + str(random.randint(1, 0x7fffffff))
+def rand_name(name=''):
+    randbits = str(random.randint(1, 0x7fffffff))
+    if name:
+        return name + '-' + randbits
+    else:
+        return randbits
 
 
 def rand_int_id(start=0, end=0x7fffffff):
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index 5276d49..bb2fcfb 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -14,7 +14,6 @@
 import time
 
 from tempest.common.ssh import Client
-from tempest.common import utils
 from tempest import config
 from tempest.exceptions import ServerUnreachable
 
@@ -76,11 +75,10 @@
         return output
 
     def get_boot_time(self):
-        cmd = 'date -d "`cut -f1 -d. /proc/uptime` seconds ago" \
-            "+%Y-%m-%d %H:%M:%S"'
-        boot_time_string = self.ssh_client.exec_command(cmd)
-        boot_time_string = boot_time_string.replace('\n', '')
-        return time.strptime(boot_time_string, utils.LAST_REBOOT_TIME_FORMAT)
+        cmd = 'cut -f1 -d. /proc/uptime'
+        boot_secs = self.ssh_client.exec_command(cmd)
+        boot_time = time.time() - int(boot_secs)
+        return time.localtime(boot_time)
 
     def write_to_console(self, message):
         message = re.sub("([$\\`])", "\\\\\\\\\\1", message)
diff --git a/tempest/openstack/common/fixture/mockpatch.py b/tempest/openstack/common/fixture/mockpatch.py
index 858e77c..d7dcc11 100644
--- a/tempest/openstack/common/fixture/mockpatch.py
+++ b/tempest/openstack/common/fixture/mockpatch.py
@@ -22,14 +22,15 @@
 class PatchObject(fixtures.Fixture):
     """Deal with code around mock."""
 
-    def __init__(self, obj, attr, **kwargs):
+    def __init__(self, obj, attr, new=mock.DEFAULT, **kwargs):
         self.obj = obj
         self.attr = attr
         self.kwargs = kwargs
+        self.new = new
 
     def setUp(self):
         super(PatchObject, self).setUp()
-        _p = mock.patch.object(self.obj, self.attr, **self.kwargs)
+        _p = mock.patch.object(self.obj, self.attr, self.new, **self.kwargs)
         self.mock = _p.start()
         self.addCleanup(_p.stop)
 
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 04882f3..32b9d7e 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -128,15 +128,16 @@
 
     def _get_object_storage_client(self, username, password, tenant_name):
         auth_url = self.config.identity.uri
-        # add current tenant to Member group.
+        # add current tenant to swift operator role group.
         keystone_admin = self._get_identity_client(
             self.config.identity.admin_username,
             self.config.identity.admin_password,
             self.config.identity.admin_tenant_name)
 
-        # enable test user to operate swift by adding Member role to him.
+        # enable test user to operate swift by adding operator role to him.
         roles = keystone_admin.roles.list()
-        member_role = [role for role in roles if role.name == 'Member'][0]
+        operator_role = self.config.object_storage.operator_role
+        member_role = [role for role in roles if role.name == operator_role][0]
         # NOTE(maurosr): This is surrounded in the try-except block cause
         # neutron tests doesn't have tenant isolation.
         try:
@@ -233,7 +234,7 @@
     def setUpClass(cls):
         super(OfficialClientTest, cls).setUpClass()
         cls.isolated_creds = isolated_creds.IsolatedCreds(
-            __name__, tempest_client=False,
+            cls.__name__, tempest_client=False,
             network_resources=cls.network_resources)
 
         username, password, tenant_name = cls.credentials()
diff --git a/tempest/services/telemetry/json/telemetry_client.py b/tempest/services/telemetry/json/telemetry_client.py
index 8d46bf3..d8662e9 100644
--- a/tempest/services/telemetry/json/telemetry_client.py
+++ b/tempest/services/telemetry/json/telemetry_client.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2014 OpenStack Foundation
 # All Rights Reserved.
 #
diff --git a/tempest/services/telemetry/telemetry_client_base.py b/tempest/services/telemetry/telemetry_client_base.py
index 59127b9..883bf33 100644
--- a/tempest/services/telemetry/telemetry_client_base.py
+++ b/tempest/services/telemetry/telemetry_client_base.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2013 OpenStack Foundation
 # All Rights Reserved.
 #
diff --git a/tempest/services/telemetry/xml/telemetry_client.py b/tempest/services/telemetry/xml/telemetry_client.py
index 245ccb5..ac5fa32 100644
--- a/tempest/services/telemetry/xml/telemetry_client.py
+++ b/tempest/services/telemetry/xml/telemetry_client.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2014 OpenStack Foundation
 # All Rights Reserved.
 #
diff --git a/tempest/tests/test_ssh.py b/tempest/tests/test_ssh.py
index 09bb588..429ed56 100644
--- a/tempest/tests/test_ssh.py
+++ b/tempest/tests/test_ssh.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2014 OpenStack Foundation
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may