Merge "Remove unused CONF variable and import statement"
diff --git a/HACKING.rst b/HACKING.rst
index 499b436..7871f60 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -8,16 +8,6 @@
 Tempest Specific Commandments
 ------------------------------
 
-[T101] If a test is broken because of a bug it is appropriate to skip the test until
-bug has been fixed. However, the skip message should be formatted so that
-Tempest's skip tracking tool can watch the bug status. The skip message should
-contain the string 'Bug' immediately followed by a space. Then the bug number
-should be included in the message '#' in front of the number.
-
-Example::
-
-  @testtools.skip("Skipped until the Bug #980688 is resolved")
-
 - [T102] Cannot import OpenStack python clients in tempest/api tests
 - [T103] tempest/tests is deprecated
 - [T104] Scenario tests require a services decorator
@@ -115,6 +105,19 @@
 in tempest.api.compute would require a service tag for those services, however
 they do not need to be tagged as compute.
 
+Test skips because of Known Bugs
+--------------------------------
+
+If a test is broken because of a bug it is appropriate to skip the test until
+bug has been fixed. You should use the skip_because decorator so that
+Tempest's skip tracking tool can watch the bug status.
+
+Example::
+
+  @skip_because(bug="980688")
+  def test_this_and_that(self):
+    ...
+
 Guidelines
 ----------
 - Do not submit changesets with only testcases which are skipped as
diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
index 3ef75ba..004268e 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -15,14 +15,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest.api import compute
 from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_int_id
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class FlavorsAdminTestJSON(base.BaseComputeAdminTest):
@@ -195,7 +194,7 @@
                 flag = True
         self.assertTrue(flag)
 
-    @testtools.skip("Skipped until the Bug #1209101 is resolved")
+    @skip_because(bug="1209101")
     @attr(type='gate')
     def test_list_non_public_flavor(self):
         # Create a flavor with os-flavor-access:is_public false should
diff --git a/tempest/api/compute/admin/test_flavors_access.py b/tempest/api/compute/admin/test_flavors_access.py
index 107b23d..8213839 100644
--- a/tempest/api/compute/admin/test_flavors_access.py
+++ b/tempest/api/compute/admin/test_flavors_access.py
@@ -15,6 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import uuid
+
 from tempest.api import compute
 from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_int_id
@@ -123,6 +125,48 @@
                           new_flavor['id'],
                           self.tenant_id)
 
+    @attr(type=['negative', 'gate'])
+    def test_add_flavor_access_duplicate(self):
+        # Create a new flavor.
+        flavor_name = rand_name(self.flavor_name_prefix)
+        new_flavor_id = rand_int_id(start=1000)
+        resp, new_flavor = self.client.create_flavor(flavor_name,
+                                                     self.ram, self.vcpus,
+                                                     self.disk,
+                                                     new_flavor_id,
+                                                     is_public='False')
+        self.addCleanup(self.client.delete_flavor, new_flavor['id'])
+
+        # Add flavor access to a tenant.
+        self.client.add_flavor_access(new_flavor['id'], self.tenant_id)
+        self.addCleanup(self.client.remove_flavor_access,
+                        new_flavor['id'], self.tenant_id)
+
+        # An exception should be raised when adding flavor access to the same
+        # tenant
+        self.assertRaises(exceptions.Duplicate,
+                          self.client.add_flavor_access,
+                          new_flavor['id'],
+                          self.tenant_id)
+
+    @attr(type=['negative', 'gate'])
+    def test_remove_flavor_access_not_found(self):
+        # Create a new flavor.
+        flavor_name = rand_name(self.flavor_name_prefix)
+        new_flavor_id = rand_int_id(start=1000)
+        resp, new_flavor = self.client.create_flavor(flavor_name,
+                                                     self.ram, self.vcpus,
+                                                     self.disk,
+                                                     new_flavor_id,
+                                                     is_public='False')
+        self.addCleanup(self.client.delete_flavor, new_flavor['id'])
+
+        # An exception should be raised when flavor access is not found
+        self.assertRaises(exceptions.NotFound,
+                          self.client.remove_flavor_access,
+                          new_flavor['id'],
+                          str(uuid.uuid4()))
+
 
 class FlavorsAdminTestXML(FlavorsAccessTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/images/test_images_oneserver.py b/tempest/api/compute/images/test_images_oneserver.py
index 7df9010..800b2de 100644
--- a/tempest/api/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -24,6 +24,7 @@
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class ImagesOneServerTestJSON(base.BaseComputeTest):
@@ -64,7 +65,7 @@
                 cls.alt_manager = clients.AltManager()
             cls.alt_client = cls.alt_manager.images_client
 
-    @testtools.skip("Skipped until the Bug #1006725 is resolved.")
+    @skip_because(bug="1006725")
     @attr(type=['negative', 'gate'])
     def test_create_image_specify_multibyte_character_image_name(self):
         # Return an error if the image name has multi-byte characters
diff --git a/tempest/api/compute/security_groups/test_security_group_rules.py b/tempest/api/compute/security_groups/test_security_group_rules.py
index 61db61d..cbc0080 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules.py
@@ -15,13 +15,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import config
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class SecurityGroupRulesTestJSON(base.BaseComputeTest):
@@ -94,8 +93,8 @@
         self.addCleanup(self.client.delete_security_group_rule, rule['id'])
         self.assertEqual(200, resp.status)
 
-    @testtools.skipIf(config.TempestConfig().service_available.neutron,
-                      "Skipped until the Bug #1182384 is resolved")
+    @skip_because(bug="1182384",
+                  condition=config.TempestConfig().service_available.neutron)
     @attr(type=['negative', 'gate'])
     def test_security_group_rules_create_with_invalid_id(self):
         # Negative test: Creation of Security Group rule should FAIL
@@ -186,8 +185,8 @@
                           self.client.create_security_group_rule,
                           secgroup_id, ip_protocol, from_port, to_port)
 
-    @testtools.skipIf(config.TempestConfig().service_available.neutron,
-                      "Skipped until the Bug #1182384 is resolved")
+    @skip_because(bug="1182384",
+                  condition=config.TempestConfig().service_available.neutron)
     @attr(type=['negative', 'gate'])
     def test_security_group_rules_delete_with_invalid_id(self):
         # Negative test: Deletion of Security Group rule should be FAIL
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 5cca3b2..fba2f53 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -22,6 +22,7 @@
 from tempest import config
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class SecurityGroupsTestJSON(base.BaseComputeTest):
@@ -107,8 +108,8 @@
                          "The fetched Security Group is different "
                          "from the created Group")
 
-    @testtools.skipIf(config.TempestConfig().service_available.neutron,
-                      "Skipped until the Bug #1182384 is resolved")
+    @skip_because(bug="1182384",
+                  condition=config.TempestConfig().service_available.neutron)
     @attr(type=['negative', 'gate'])
     def test_security_group_get_nonexistant_group(self):
         # Negative test:Should not be able to GET the details
@@ -125,8 +126,8 @@
         self.assertRaises(exceptions.NotFound, self.client.get_security_group,
                           non_exist_id)
 
-    @testtools.skipIf(config.TempestConfig().service_available.neutron,
-                      "Skipped until the Bug #1161411 is resolved")
+    @skip_because(bug="1161411",
+                  condition=config.TempestConfig().service_available.neutron)
     @attr(type=['negative', 'gate'])
     def test_security_group_create_with_invalid_group_name(self):
         # Negative test: Security Group should not be created with group name
@@ -145,8 +146,8 @@
                           self.client.create_security_group, s_name,
                           s_description)
 
-    @testtools.skipIf(config.TempestConfig().service_available.neutron,
-                      "Skipped until the Bug #1161411 is resolved")
+    @skip_because(bug="1161411",
+                  condition=config.TempestConfig().service_available.neutron)
     @attr(type=['negative', 'gate'])
     def test_security_group_create_with_invalid_group_description(self):
         # Negative test:Security Group should not be created with description
@@ -197,8 +198,8 @@
                           self.client.delete_security_group,
                           default_security_group_id)
 
-    @testtools.skipIf(config.TempestConfig().service_available.neutron,
-                      "Skipped until the Bug #1182384 is resolved")
+    @skip_because(bug="1182384",
+                  condition=config.TempestConfig().service_available.neutron)
     @attr(type=['negative', 'gate'])
     def test_delete_nonexistant_security_group(self):
         # Negative test:Deletion of a non-existent Security Group should Fail
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index a56bdf3..8e95671 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -15,14 +15,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest.api.compute import base
 from tempest.api import utils
 from tempest.common.utils.data_utils import rand_name
 from tempest import config
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class ListServerFiltersTestJSON(base.BaseComputeTest):
@@ -58,32 +57,26 @@
             raise RuntimeError("Image %s (image_ref_alt) was not found!" %
                                cls.image_ref_alt)
 
-        cls.s1_name = rand_name('server')
-        resp, cls.s1 = cls.client.create_server(cls.s1_name, cls.image_ref,
-                                                cls.flavor_ref)
-        cls.s2_name = rand_name('server')
-        resp, cls.s2 = cls.client.create_server(cls.s2_name, cls.image_ref_alt,
-                                                cls.flavor_ref)
-        cls.s3_name = rand_name('server')
-        resp, cls.s3 = cls.client.create_server(cls.s3_name, cls.image_ref,
-                                                cls.flavor_ref_alt)
+        cls.s1_name = rand_name(cls.__name__ + '-instance')
+        resp, cls.s1 = cls.create_server(name=cls.s1_name,
+                                         image_id=cls.image_ref,
+                                         flavor=cls.flavor_ref,
+                                         wait_until='ACTIVE')
 
-        cls.client.wait_for_server_status(cls.s1['id'], 'ACTIVE')
-        resp, cls.s1 = cls.client.get_server(cls.s1['id'])
-        cls.client.wait_for_server_status(cls.s2['id'], 'ACTIVE')
-        resp, cls.s2 = cls.client.get_server(cls.s2['id'])
-        cls.client.wait_for_server_status(cls.s3['id'], 'ACTIVE')
-        resp, cls.s3 = cls.client.get_server(cls.s3['id'])
+        cls.s2_name = rand_name(cls.__name__ + '-instance')
+        resp, cls.s2 = cls.create_server(name=cls.s2_name,
+                                         image_id=cls.image_ref_alt,
+                                         flavor=cls.flavor_ref,
+                                         wait_until='ACTIVE')
+
+        cls.s3_name = rand_name(cls.__name__ + '-instance')
+        resp, cls.s3 = cls.create_server(name=cls.s3_name,
+                                         image_id=cls.image_ref,
+                                         flavor=cls.flavor_ref_alt,
+                                         wait_until='ACTIVE')
 
         cls.fixed_network_name = cls.config.compute.fixed_network_name
 
-    @classmethod
-    def tearDownClass(cls):
-        cls.client.delete_server(cls.s1['id'])
-        cls.client.delete_server(cls.s2['id'])
-        cls.client.delete_server(cls.s3['id'])
-        super(ListServerFiltersTestJSON, cls).tearDownClass()
-
     @utils.skip_unless_attr('multiple_images', 'Only one image found')
     @attr(type='gate')
     def test_list_servers_filter_by_image(self):
@@ -185,8 +178,8 @@
 
     @attr(type='gate')
     def test_list_servers_filtered_by_name_wildcard(self):
-        # List all servers that contains 'server' in name
-        params = {'name': 'server'}
+        # List all servers that contains '-instance' in name
+        params = {'name': '-instance'}
         resp, body = self.client.list_servers(params)
         servers = body['servers']
 
@@ -205,11 +198,12 @@
         self.assertNotIn(self.s2_name, map(lambda x: x['name'], servers))
         self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
 
-    @testtools.skip('Skipped until the Bug #1170718 is resolved.')
+    @skip_because(bug="1170718")
     @attr(type='gate')
     def test_list_servers_filtered_by_ip(self):
         # Filter servers by ip
         # Here should be listed 1 server
+        resp, self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr']
         params = {'ip': ip}
         resp, body = self.client.list_servers(params)
@@ -219,13 +213,14 @@
         self.assertNotIn(self.s2_name, map(lambda x: x['name'], servers))
         self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
 
-    @testtools.skipIf(config.TempestConfig().service_available.neutron,
-                      "Skipped until the Bug #1182883 is resolved")
+    @skip_because(bug="1182883",
+                  condition=config.TempestConfig().service_available.neutron)
     @attr(type='gate')
     def test_list_servers_filtered_by_ip_regex(self):
         # Filter servers by regex ip
         # List all servers filtered by part of ip address.
         # Here should be listed all servers
+        resp, self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr'][0:-3]
         params = {'ip': ip}
         resp, body = self.client.list_servers(params)
diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
index 7f5ccf9..9dd2e27 100644
--- a/tempest/api/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -28,6 +28,26 @@
     _interface = 'json'
 
     @classmethod
+    def _ensure_no_servers(cls, servers, username, tenant_name):
+        """
+        If there are servers and there is tenant isolation then a
+        skipException is raised to skip the test since it requires no servers
+        to already exist for the given user/tenant.
+        If there are servers and there is not tenant isolation then the test
+        blocks while the servers are being deleted.
+        """
+        if len(servers):
+            if not cls.config.compute.allow_tenant_isolation:
+                for srv in servers:
+                    cls.client.wait_for_server_termination(srv['id'],
+                                                           ignore_error=True)
+            else:
+                msg = ("User/tenant %(u)s/%(t)s already have "
+                       "existing server instances. Skipping test." %
+                       {'u': username, 't': tenant_name})
+                raise cls.skipException(msg)
+
+    @classmethod
     def setUpClass(cls):
         super(ListServersNegativeTestJSON, cls).setUpClass()
         cls.client = cls.servers_client
@@ -54,26 +74,14 @@
         # start of the test instead of destroying any existing
         # servers.
         resp, body = cls.client.list_servers()
-        servers = body['servers']
-        num_servers = len(servers)
-        if num_servers > 0:
-            username = cls.os.username
-            tenant_name = cls.os.tenant_name
-            msg = ("User/tenant %(u)s/%(t)s already have "
-                   "existing server instances. Skipping test." %
-                   {'u': username, 't': tenant_name})
-            raise cls.skipException(msg)
+        cls._ensure_no_servers(body['servers'],
+                               cls.os.username,
+                               cls.os.tenant_name)
 
         resp, body = cls.alt_client.list_servers()
-        servers = body['servers']
-        num_servers = len(servers)
-        if num_servers > 0:
-            username = cls.alt_manager.username
-            tenant_name = cls.alt_manager.tenant_name
-            msg = ("Alt User/tenant %(u)s/%(t)s already have "
-                   "existing server instances. Skipping test." %
-                   {'u': username, 't': tenant_name})
-            raise cls.skipException(msg)
+        cls._ensure_no_servers(body['servers'],
+                               cls.alt_manager.username,
+                               cls.alt_manager.tenant_name)
 
         # The following servers are created for use
         # by the test methods in this class. These
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 0d5a8fa..6f646b2 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -27,6 +27,7 @@
 import tempest.config
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class ServerActionsTestJSON(base.BaseComputeTest):
@@ -86,7 +87,7 @@
             new_boot_time = linux_client.get_boot_time()
             self.assertGreater(new_boot_time, boot_time)
 
-    @testtools.skip('Skipped until the Bug #1014647 is resolved.')
+    @skip_because(bug="1014647")
     @attr(type='smoke')
     def test_reboot_server_soft(self):
         # The server should be signaled to reboot gracefully
@@ -117,7 +118,8 @@
         password = 'rebuildPassw0rd'
         resp, rebuilt_server = self.client.rebuild(self.server_id,
                                                    self.image_ref_alt,
-                                                   name=new_name, meta=meta,
+                                                   name=new_name,
+                                                   metadata=meta,
                                                    personality=personality,
                                                    adminPass=password)
 
@@ -225,7 +227,8 @@
         self.assertRaises(exceptions.NotFound,
                           self.client.rebuild,
                           999, self.image_ref_alt,
-                          name=new_name, meta=meta,
+                          name=new_name,
+                          metadata=meta,
                           personality=personality,
                           adminPass='rebuild')
 
@@ -250,7 +253,7 @@
                           self.servers_client.get_console_output,
                           '!@#$%^&*()', 10)
 
-    @testtools.skip('Skipped until the Bug #1014683 is resolved.')
+    @skip_because(bug="1014683")
     @attr(type='gate')
     def test_get_console_output_server_id_in_reboot_status(self):
         # Positive test:Should be able to GET the console output
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index b743a85..2c7ff32 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -16,13 +16,13 @@
 #    under the License.
 
 import netaddr
-import testtools
 
 from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import config
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class VirtualInterfacesTestJSON(base.BaseComputeTest):
@@ -37,8 +37,8 @@
         resp, server = cls.create_server(wait_until='ACTIVE')
         cls.server_id = server['id']
 
-    @testtools.skipIf(CONF.service_available.neutron, "Not implemented by " +
-                      "Neutron. Skipped until the Bug #1183436 is resolved.")
+    @skip_because(bug="1183436",
+                  condition=CONF.service_available.neutron)
     @attr(type='gate')
     def test_list_virtual_interfaces(self):
         # Positive test:Should be able to GET the virtual interfaces list
diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py
index 017864f..ca2c879 100644
--- a/tempest/api/network/test_floating_ips.py
+++ b/tempest/api/network/test_floating_ips.py
@@ -20,7 +20,7 @@
 from tempest.test import attr
 
 
-class FloatingIPTest(base.BaseNetworkTest):
+class FloatingIPTestJSON(base.BaseNetworkTest):
     _interface = 'json'
 
     """
@@ -41,7 +41,7 @@
 
     @classmethod
     def setUpClass(cls):
-        super(FloatingIPTest, cls).setUpClass()
+        super(FloatingIPTestJSON, cls).setUpClass()
         cls.ext_net_id = cls.config.network.public_network_id
 
         # Create network, subnet, router and add interface
@@ -67,7 +67,7 @@
         for i in range(2):
             cls.client.delete_port(cls.port[i]['id'])
         cls.client.delete_router(cls.router['id'])
-        super(FloatingIPTest, cls).tearDownClass()
+        super(FloatingIPTestJSON, cls).tearDownClass()
 
     def _delete_floating_ip(self, floating_ip_id):
         # Deletes a floating IP and verifies if it is deleted or not
@@ -133,3 +133,7 @@
         self.assertIsNone(update_floating_ip['port_id'])
         self.assertIsNone(update_floating_ip['fixed_ip_address'])
         self.assertIsNone(update_floating_ip['router_id'])
+
+
+class FloatingIPTestXML(FloatingIPTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py
index a43b2b5..ff9f7bf 100644
--- a/tempest/api/object_storage/test_container_sync.py
+++ b/tempest/api/object_storage/test_container_sync.py
@@ -17,11 +17,10 @@
 
 import time
 
-import testtools
-
 from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class ContainerSyncTest(base.BaseObjectTest):
@@ -52,7 +51,7 @@
             cls.delete_containers(cls.containers, client[0], client[1])
         super(ContainerSyncTest, cls).tearDownClass()
 
-    @testtools.skip('Skipped until the Bug #1093743 is resolved.')
+    @skip_because(bug="1093743")
     @attr(type='gate')
     def test_container_synchronization(self):
         # container to container synchronization
diff --git a/tempest/api/object_storage/test_object_expiry.py b/tempest/api/object_storage/test_object_expiry.py
index db38401..cb52d88 100644
--- a/tempest/api/object_storage/test_object_expiry.py
+++ b/tempest/api/object_storage/test_object_expiry.py
@@ -17,13 +17,12 @@
 
 import time
 
-import testtools
-
 from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import arbitrary_string
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
+from tempest.test import skip_because
 
 
 class ObjectExpiryTest(base.BaseObjectTest):
@@ -43,7 +42,7 @@
         cls.delete_containers([cls.container_name])
         super(ObjectExpiryTest, cls).tearDownClass()
 
-    @testtools.skip('Skipped until the Bug #1069849 is resolved.')
+    @skip_because(bug="1069849")
     @attr(type='gate')
     def test_get_object_after_expiry_time(self):
         # TODO(harika-vakadi): similar test case has to be created for
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index 19e3fc6..09131e2 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -32,8 +32,8 @@
         cls.image_client = cls.os.image_client
 
         # Create a test shared instance and volume for attach/detach tests
-        srv_name = rand_name('Instance-')
-        vol_name = rand_name('Volume-')
+        srv_name = rand_name(cls.__name__ + '-Instance-')
+        vol_name = rand_name(cls.__name__ + '-Volume-')
         resp, cls.server = cls.servers_client.create_server(srv_name,
                                                             cls.image_ref,
                                                             cls.flavor_ref)
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index 32eecfb..2aaa71d 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -1,6 +1,7 @@
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 
 # Copyright 2012 OpenStack Foundation
+# Copyright 2013 IBM Corp.
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -16,6 +17,7 @@
 #    under the License.
 
 from tempest.api.volume import base
+from tempest.common.utils.data_utils import rand_int_id
 from tempest.common.utils.data_utils import rand_name
 from tempest.openstack.common import log as logging
 from tempest.test import attr
@@ -103,6 +105,66 @@
         self.assertEqual(200, resp.status)
         self.assertVolumesIn(fetched_list, self.volume_list)
 
+    @attr(type='gate')
+    def test_volume_list_by_name(self):
+        volume = self.volume_list[rand_int_id(0, 2)]
+        params = {'display_name': volume['display_name']}
+        resp, fetched_vol = self.client.list_volumes(params)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(1, len(fetched_vol), str(fetched_vol))
+        self.assertEqual(fetched_vol[0]['display_name'],
+                         volume['display_name'])
+
+    @attr(type='gate')
+    def test_volume_list_details_by_name(self):
+        volume = self.volume_list[rand_int_id(0, 2)]
+        params = {'display_name': volume['display_name']}
+        resp, fetched_vol = self.client.list_volumes_with_detail(params)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(1, len(fetched_vol), str(fetched_vol))
+        self.assertEqual(fetched_vol[0]['display_name'],
+                         volume['display_name'])
+
+    @attr(type='gate')
+    def test_volumes_list_by_status(self):
+        params = {'status': 'available'}
+        resp, fetched_list = self.client.list_volumes(params)
+        self.assertEqual(200, resp.status)
+        for volume in fetched_list:
+            self.assertEqual('available', volume['status'])
+        self.assertVolumesIn(fetched_list, self.volume_list)
+
+    @attr(type='gate')
+    def test_volumes_list_details_by_status(self):
+        params = {'status': 'available'}
+        resp, fetched_list = self.client.list_volumes_with_detail(params)
+        self.assertEqual(200, resp.status)
+        for volume in fetched_list:
+            self.assertEqual('available', volume['status'])
+        self.assertVolumesIn(fetched_list, self.volume_list)
+
+    @attr(type='gate')
+    def test_volumes_list_by_availability_zone(self):
+        volume = self.volume_list[rand_int_id(0, 2)]
+        zone = volume['availability_zone']
+        params = {'availability_zone': zone}
+        resp, fetched_list = self.client.list_volumes(params)
+        self.assertEqual(200, resp.status)
+        for volume in fetched_list:
+            self.assertEqual(zone, volume['availability_zone'])
+        self.assertVolumesIn(fetched_list, self.volume_list)
+
+    @attr(type='gate')
+    def test_volumes_list_details_by_availability_zone(self):
+        volume = self.volume_list[rand_int_id(0, 2)]
+        zone = volume['availability_zone']
+        params = {'availability_zone': zone}
+        resp, fetched_list = self.client.list_volumes_with_detail(params)
+        self.assertEqual(200, resp.status)
+        for volume in fetched_list:
+            self.assertEqual(zone, volume['availability_zone'])
+        self.assertVolumesIn(fetched_list, self.volume_list)
+
 
 class VolumeListTestXML(VolumesListTest):
     _interface = 'xml'
diff --git a/tempest/config.py b/tempest/config.py
index eadbe9a..ff0cddb 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -27,6 +27,12 @@
 from tempest.openstack.common import log as logging
 
 
+def register_opt_group(conf, opt_group, options):
+    conf.register_group(opt_group)
+    for opt in options:
+        conf.register_opt(opt, group=opt_group.name)
+
+
 identity_group = cfg.OptGroup(name='identity',
                               title="Keystone Configuration Options")
 
@@ -87,13 +93,6 @@
                secret=True),
 ]
 
-
-def register_identity_opts(conf):
-    conf.register_group(identity_group)
-    for opt in IdentityGroup:
-        conf.register_opt(opt, group='identity')
-
-
 compute_group = cfg.OptGroup(name='compute',
                              title='Compute Service Options')
 
@@ -225,12 +224,6 @@
                     "an instance")
 ]
 
-
-def register_compute_opts(conf):
-    conf.register_group(compute_group)
-    for opt in ComputeGroup:
-        conf.register_opt(opt, group='compute')
-
 compute_admin_group = cfg.OptGroup(name='compute-admin',
                                    title="Compute Admin Options")
 
@@ -248,12 +241,6 @@
                secret=True),
 ]
 
-
-def register_compute_admin_opts(conf):
-    conf.register_group(compute_admin_group)
-    for opt in ComputeAdminGroup:
-        conf.register_opt(opt, group='compute-admin')
-
 image_group = cfg.OptGroup(name='image',
                            title="Image Service Options")
 
@@ -277,12 +264,6 @@
 ]
 
 
-def register_image_opts(conf):
-    conf.register_group(image_group)
-    for opt in ImageGroup:
-        conf.register_opt(opt, group='image')
-
-
 network_group = cfg.OptGroup(name='network',
                              title='Network Service Options')
 
@@ -316,12 +297,6 @@
                     "connectivity"),
 ]
 
-
-def register_network_opts(conf):
-    conf.register_group(network_group)
-    for opt in NetworkGroup:
-        conf.register_opt(opt, group='network')
-
 volume_group = cfg.OptGroup(name='volume',
                             title='Block Storage Options')
 
@@ -363,16 +338,10 @@
 ]
 
 
-def register_volume_opts(conf):
-    conf.register_group(volume_group)
-    for opt in VolumeGroup:
-        conf.register_opt(opt, group='volume')
-
-
 object_storage_group = cfg.OptGroup(name='object-storage',
                                     title='Object Storage Service Options')
 
-ObjectStoreConfig = [
+ObjectStoreGroup = [
     cfg.StrOpt('catalog_type',
                default='object-store',
                help="Catalog type of the Object-Storage service."),
@@ -404,12 +373,6 @@
 ]
 
 
-def register_object_storage_opts(conf):
-    conf.register_group(object_storage_group)
-    for opt in ObjectStoreConfig:
-        conf.register_opt(opt, group='object-storage')
-
-
 orchestration_group = cfg.OptGroup(name='orchestration',
                                    title='Orchestration Service Options')
 
@@ -452,12 +415,6 @@
 ]
 
 
-def register_orchestration_opts(conf):
-    conf.register_group(orchestration_group)
-    for opt in OrchestrationGroup:
-        conf.register_opt(opt, group='orchestration')
-
-
 dashboard_group = cfg.OptGroup(name="dashboard",
                                title="Dashboard options")
 
@@ -471,15 +428,9 @@
 ]
 
 
-def register_dashboard_opts(conf):
-    conf.register_group(scenario_group)
-    for opt in DashboardGroup:
-        conf.register_opt(opt, group='dashboard')
-
-
 boto_group = cfg.OptGroup(name='boto',
                           title='EC2/S3 options')
-BotoConfig = [
+BotoGroup = [
     cfg.StrOpt('ec2_url',
                default="http://localhost:8773/services/Cloud",
                help="EC2 URL"),
@@ -523,12 +474,6 @@
                help="Status Change Test Interval"),
 ]
 
-
-def register_boto_opts(conf):
-    conf.register_group(boto_group)
-    for opt in BotoConfig:
-        conf.register_opt(opt, group='boto')
-
 stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
 
 StressGroup = [
@@ -563,12 +508,6 @@
 ]
 
 
-def register_stress_opts(conf):
-    conf.register_group(stress_group)
-    for opt in StressGroup:
-        conf.register_opt(opt, group='stress')
-
-
 scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
 
 ScenarioGroup = [
@@ -596,12 +535,6 @@
 ]
 
 
-def register_scenario_opts(conf):
-    conf.register_group(scenario_group)
-    for opt in ScenarioGroup:
-        conf.register_opt(opt, group='scenario')
-
-
 service_available_group = cfg.OptGroup(name="service_available",
                                        title="Available OpenStack Services")
 
@@ -629,12 +562,6 @@
                 help="Whether or not Horizon is expected to be available"),
 ]
 
-
-def register_service_available_opts(conf):
-    conf.register_group(scenario_group)
-    for opt in ServiceAvailableGroup:
-        conf.register_opt(opt, group='service_available')
-
 debug_group = cfg.OptGroup(name="debug",
                            title="Debug System")
 
@@ -645,12 +572,6 @@
 ]
 
 
-def register_debug_opts(conf):
-    conf.register_group(debug_group)
-    for opt in DebugGroup:
-        conf.register_opt(opt, group='debug')
-
-
 @singleton
 class TempestConfig:
     """Provides OpenStack configuration information."""
@@ -689,20 +610,21 @@
         LOG = logging.getLogger('tempest')
         LOG.info("Using tempest config file %s" % path)
 
-        register_compute_opts(cfg.CONF)
-        register_identity_opts(cfg.CONF)
-        register_image_opts(cfg.CONF)
-        register_network_opts(cfg.CONF)
-        register_volume_opts(cfg.CONF)
-        register_object_storage_opts(cfg.CONF)
-        register_orchestration_opts(cfg.CONF)
-        register_dashboard_opts(cfg.CONF)
-        register_boto_opts(cfg.CONF)
-        register_compute_admin_opts(cfg.CONF)
-        register_stress_opts(cfg.CONF)
-        register_scenario_opts(cfg.CONF)
-        register_service_available_opts(cfg.CONF)
-        register_debug_opts(cfg.CONF)
+        register_opt_group(cfg.CONF, compute_group, ComputeGroup)
+        register_opt_group(cfg.CONF, identity_group, IdentityGroup)
+        register_opt_group(cfg.CONF, image_group, ImageGroup)
+        register_opt_group(cfg.CONF, network_group, NetworkGroup)
+        register_opt_group(cfg.CONF, volume_group, VolumeGroup)
+        register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
+        register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
+        register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
+        register_opt_group(cfg.CONF, boto_group, BotoGroup)
+        register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
+        register_opt_group(cfg.CONF, stress_group, StressGroup)
+        register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
+        register_opt_group(cfg.CONF, service_available_group,
+                           ServiceAvailableGroup)
+        register_opt_group(cfg.CONF, debug_group, DebugGroup)
         self.compute = cfg.CONF.compute
         self.identity = cfg.CONF.identity
         self.images = cfg.CONF.image
diff --git a/tempest/hacking/checks.py b/tempest/hacking/checks.py
index aa97211..4c1c107 100644
--- a/tempest/hacking/checks.py
+++ b/tempest/hacking/checks.py
@@ -19,28 +19,11 @@
 
 PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron']
 
-SKIP_DECORATOR_RE = re.compile(r'\s*@testtools.skip\((.*)\)')
-SKIP_STR_RE = re.compile(r'.*Bug #\d+.*')
 PYTHON_CLIENT_RE = re.compile('import (%s)client' % '|'.join(PYTHON_CLIENTS))
 TEST_DEFINITION = re.compile(r'^\s*def test.*')
 SCENARIO_DECORATOR = re.compile(r'\s*@.*services\(')
 
 
-def skip_bugs(physical_line):
-    """Check skip lines for proper bug entries
-
-    T101: skips must contain "Bug #<bug_number>"
-    """
-
-    res = SKIP_DECORATOR_RE.match(physical_line)
-    if res:
-        content = res.group(1)
-        res = SKIP_STR_RE.match(content)
-        if not res:
-            return (physical_line.find(content),
-                    'T101: skips must contain "Bug #<bug_number>"')
-
-
 def import_no_clients_in_api(physical_line, filename):
     """Check for client imports from tempest/api tests
 
@@ -70,6 +53,5 @@
 
 
 def factory(register):
-    register(skip_bugs)
     register(import_no_clients_in_api)
     register(scenario_tests_need_service_tags)
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index c4b98d5..8ccc899 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -280,16 +280,23 @@
         cls.os_resources.remove(thing)
         del cls.resource_keys[key]
 
-    def status_timeout(self, things, thing_id, expected_status):
+    def status_timeout(self, things, thing_id, expected_status,
+                       error_status='ERROR',
+                       not_found_exception=nova_exceptions.NotFound):
         """
         Given a thing and an expected status, do a loop, sleeping
         for a configurable amount of time, checking for the
         expected status to show. At any time, if the returned
         status of the thing is ERROR, fail out.
         """
-        self._status_timeout(things, thing_id, expected_status=expected_status)
+        self._status_timeout(things, thing_id,
+                             expected_status=expected_status,
+                             error_status=error_status,
+                             not_found_exception=not_found_exception)
 
-    def delete_timeout(self, things, thing_id):
+    def delete_timeout(self, things, thing_id,
+                       error_status='ERROR',
+                       not_found_exception=nova_exceptions.NotFound):
         """
         Given a thing, do a loop, sleeping
         for a configurable amount of time, checking for the
@@ -298,13 +305,17 @@
         """
         self._status_timeout(things,
                              thing_id,
-                             allow_notfound=True)
+                             allow_notfound=True,
+                             error_status=error_status,
+                             not_found_exception=not_found_exception)
 
     def _status_timeout(self,
                         things,
                         thing_id,
                         expected_status=None,
-                        allow_notfound=False):
+                        allow_notfound=False,
+                        error_status='ERROR',
+                        not_found_exception=nova_exceptions.NotFound):
 
         log_status = expected_status if expected_status else ''
         if allow_notfound:
@@ -316,16 +327,16 @@
             # for the singular resource to retrieve.
             try:
                 thing = things.get(thing_id)
-            except nova_exceptions.NotFound:
+            except not_found_exception:
                 if allow_notfound:
                     return True
                 else:
                     raise
 
             new_status = thing.status
-            if new_status == 'ERROR':
+            if new_status == error_status:
                 message = "%s failed to get to expected status. \
-                          In ERROR state." % (thing)
+                          In %s state." % (thing, new_status)
                 raise exceptions.BuildErrorException(message)
             elif new_status == expected_status and expected_status is not None:
                 return True  # All good.
diff --git a/tempest/services/compute/xml/common.py b/tempest/services/compute/xml/common.py
index cb24917..84b56c2 100644
--- a/tempest/services/compute/xml/common.py
+++ b/tempest/services/compute/xml/common.py
@@ -15,6 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import collections
+
 XMLNS_11 = "http://docs.openstack.org/compute/api/v1.1"
 
 
@@ -110,3 +112,19 @@
             ns, tag = tag.split("}", 1)
         json[tag] = xml_to_json(child)
     return json
+
+
+def deep_dict_to_xml(dest, source):
+    """Populates the ``dest`` xml element with the ``source`` ``Mapping``
+       elements, if the source Mapping's value is also a ``Mapping``
+       they will be recursively added as a child elements.
+       :param source: A python ``Mapping`` (dict)
+       :param dest: XML child element will be added to the ``dest``
+    """
+    for element, content in source.iteritems():
+        if isinstance(content, collections.Mapping):
+            xml_element = Element(element)
+            deep_dict_to_xml(xml_element, content)
+            dest.append(xml_element)
+        else:
+            dest.append(Element(element, content))
diff --git a/tempest/services/network/xml/network_client.py b/tempest/services/network/xml/network_client.py
index 1523ed0..cf8154a 100755
--- a/tempest/services/network/xml/network_client.py
+++ b/tempest/services/network/xml/network_client.py
@@ -16,6 +16,7 @@
 import xml.etree.ElementTree as ET
 
 from tempest.common.rest_client import RestClientXML
+from tempest.services.compute.xml.common import deep_dict_to_xml
 from tempest.services.compute.xml.common import Document
 from tempest.services.compute.xml.common import Element
 from tempest.services.compute.xml.common import xml_to_json
@@ -441,6 +442,111 @@
         body = _root_tag_fetcher_and_xml_to_json_parse(body)
         return resp, body
 
+    def create_router(self, name, **kwargs):
+        uri = '%s/routers' % (self.uri_prefix)
+        router = Element("router")
+        router.append(Element("name", name))
+        deep_dict_to_xml(router, kwargs)
+        resp, body = self.post(uri, str(Document(router)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def delete_router(self, router_id):
+        uri = '%s/routers/%s' % (self.uri_prefix, router_id)
+        resp, body = self.delete(uri, self.headers)
+        return resp, body
+
+    def show_router(self, router_id):
+        uri = '%s/routers/%s' % (self.uri_prefix, router_id)
+        resp, body = self.get(uri, self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def update_router(self, router_id, **kwargs):
+        uri = '%s/routers/%s' % (self.uri_prefix, router_id)
+        router = Element("router")
+        for element, content in kwargs.iteritems():
+            router.append(Element(element, content))
+        resp, body = self.put(uri, str(Document(router)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def add_router_interface_with_subnet_id(self, router_id, subnet_id):
+        uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
+              router_id)
+        subnet = Element("subnet_id", subnet_id)
+        resp, body = self.put(uri, str(Document(subnet)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def add_router_interface_with_port_id(self, router_id, port_id):
+        uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
+              router_id)
+        port = Element("port_id", port_id)
+        resp, body = self.put(uri, str(Document(port)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def remove_router_interface_with_subnet_id(self, router_id, subnet_id):
+        uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
+              router_id)
+        subnet = Element("subnet_id", subnet_id)
+        resp, body = self.put(uri, str(Document(subnet)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def remove_router_interface_with_port_id(self, router_id, port_id):
+        uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
+              router_id)
+        port = Element("port_id", port_id)
+        resp, body = self.put(uri, str(Document(port)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def create_floating_ip(self, ext_network_id, **kwargs):
+        uri = '%s/floatingips' % (self.uri_prefix)
+        floatingip = Element('floatingip')
+        floatingip.append(Element("floating_network_id", ext_network_id))
+        for element, content in kwargs.iteritems():
+            floatingip.append(Element(element, content))
+        resp, body = self.post(uri, str(Document(floatingip)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def show_floating_ip(self, floating_ip_id):
+        uri = '%s/floatingips/%s' % (self.uri_prefix, floating_ip_id)
+        resp, body = self.get(uri, self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
+    def list_floating_ips(self):
+        uri = '%s/floatingips' % (self.uri_prefix)
+        resp, body = self.get(uri, self.headers)
+        floatingips = self._parse_array(etree.fromstring(body))
+        floatingips = {"floatingips": floatingips}
+        return resp, floatingips
+
+    def delete_floating_ip(self, floating_ip_id):
+        uri = '%s/floatingips/%s' % (self.uri_prefix, floating_ip_id)
+        resp, body = self.delete(uri, self.headers)
+        return resp, body
+
+    def update_floating_ip(self, floating_ip_id, **kwargs):
+        uri = '%s/floatingips/%s' % (self.uri_prefix, floating_ip_id)
+        floatingip = Element('floatingip')
+        floatingip.add_attr('xmlns:xsi',
+                            'http://www.w3.org/2001/XMLSchema-instance')
+        for element, content in kwargs.iteritems():
+            if content is None:
+                xml_elem = Element(element)
+                xml_elem.add_attr("xsi:nil", "true")
+                floatingip.append(xml_elem)
+            else:
+                floatingip.append(Element(element, content))
+        resp, body = self.put(uri, str(Document(floatingip)), self.headers)
+        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        return resp, body
+
 
 def _root_tag_fetcher_and_xml_to_json_parse(xml_returned_body):
     body = ET.fromstring(xml_returned_body)
@@ -448,5 +554,10 @@
     if root_tag.startswith("{"):
         ns, root_tag = root_tag.split("}", 1)
     body = xml_to_json(etree.fromstring(xml_returned_body))
+    nil = '{http://www.w3.org/2001/XMLSchema-instance}nil'
+    for key, val in body.iteritems():
+        if isinstance(val, dict):
+            if (nil in val and val[nil] == 'true'):
+                body[key] = None
     body = {root_tag: body}
     return body
diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py
index 55404ce..b5cab68 100644
--- a/tempest/stress/driver.py
+++ b/tempest/stress/driver.py
@@ -196,7 +196,7 @@
 
         if not logfiles:
             continue
-        if _has_error_in_logs(logfiles, computes):
+        if _has_error_in_logs(logfiles, computes, stop_on_error):
             had_errors = True
             break
 
diff --git a/tempest/stress/run_stress.py b/tempest/stress/run_stress.py
index 886d94b..e5cc281 100755
--- a/tempest/stress/run_stress.py
+++ b/tempest/stress/run_stress.py
@@ -23,14 +23,20 @@
 from testtools.testsuite import iterate_tests
 from unittest import loader
 
+from tempest.openstack.common import log as logging
+
+LOG = logging.getLogger(__name__)
+
 
 def discover_stress_tests(path="./", filter_attr=None, call_inherited=False):
     """Discovers all tempest tests and create action out of them
     """
+    LOG.info("Start test discovery")
     tests = []
     testloader = loader.TestLoader()
     list = testloader.discover(path)
     for func in (iterate_tests(list)):
+        attrs = []
         try:
             method_name = getattr(func, '_testMethodName')
             full_name = "%s.%s.%s" % (func.__module__,
@@ -106,4 +112,8 @@
                    help="Name of the file with test description")
 
 if __name__ == "__main__":
-    sys.exit(main(parser.parse_args()))
+    try:
+        sys.exit(main(parser.parse_args()))
+    except Exception:
+        LOG.exception("Failure in the stress test framework")
+        sys.exit(1)
diff --git a/tempest/test.py b/tempest/test.py
index 6acb1c9..8ce7af8 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -16,6 +16,7 @@
 #    under the License.
 
 import atexit
+import functools
 import os
 import time
 
@@ -103,6 +104,24 @@
     return decorator
 
 
+def skip_because(*args, **kwargs):
+    """A decorator useful to skip tests hitting known bugs
+
+    @param bug: bug number causing the test to skip
+    @param condition: optional condition to be True for the skip to have place
+    """
+    def decorator(f):
+        @functools.wraps(f)
+        def wrapper(*func_args, **func_kwargs):
+            if "bug" in kwargs:
+                if "condition" not in kwargs or kwargs["condition"] is True:
+                    msg = "Skipped until Bug: %s is resolved." % kwargs["bug"]
+                    raise testtools.TestCase.skipException(msg)
+            return f(*func_args, **func_kwargs)
+        return wrapper
+    return decorator
+
+
 # there is a mis-match between nose and testtools for older pythons.
 # testtools will set skipException to be either
 # unittest.case.SkipTest, unittest2.case.SkipTest or an internal skip
diff --git a/tempest/thirdparty/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
index bce544a..0f455e1 100644
--- a/tempest/thirdparty/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -16,7 +16,6 @@
 #    under the License.
 
 from boto import exception
-import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
@@ -24,6 +23,7 @@
 from tempest import exceptions
 from tempest.openstack.common import log as logging
 from tempest.test import attr
+from tempest.test import skip_because
 from tempest.thirdparty.boto.test import BotoTestCase
 from tempest.thirdparty.boto.utils.s3 import s3_upload_dir
 from tempest.thirdparty.boto.utils.wait import re_search_wait
@@ -206,8 +206,8 @@
             instance.terminate()
         self.cancelResourceCleanUp(rcuk)
 
+    @skip_because(bug="1098891")
     @attr(type='smoke')
-    @testtools.skip("Skipped until the Bug #1098891 is resolved")
     def test_run_terminate_instance(self):
         # EC2 run, terminate immediately
         image_ami = self.ec2_client.get_image(self.images["ami"]
@@ -233,7 +233,7 @@
 
     # NOTE(afazekas): doctored test case,
     # with normal validation it would fail
-    @testtools.skip("Skipped until the Bug #1182679 is resolved.")
+    @skip_because(bug="1182679")
     @attr(type='smoke')
     def test_integration_1(self):
         # EC2 1. integration test (not strict)
diff --git a/tempest/thirdparty/boto/test_ec2_keys.py b/tempest/thirdparty/boto/test_ec2_keys.py
index 85a99c0..5592d8c 100644
--- a/tempest/thirdparty/boto/test_ec2_keys.py
+++ b/tempest/thirdparty/boto/test_ec2_keys.py
@@ -15,11 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
+from tempest.test import skip_because
 from tempest.thirdparty.boto.test import BotoTestCase
 
 
@@ -47,8 +46,8 @@
         self.assertTrue(compare_key_pairs(keypair,
                         self.client.get_key_pair(key_name)))
 
+    @skip_because(bug="1072318")
     @attr(type='smoke')
-    @testtools.skip("Skipped until the Bug #1072318 is resolved")
     def test_delete_ec2_keypair(self):
         # EC2 delete KeyPair
         key_name = rand_name("keypair-")
diff --git a/tempest/thirdparty/boto/test_ec2_network.py b/tempest/thirdparty/boto/test_ec2_network.py
index ae8c3c2..b4949c8 100644
--- a/tempest/thirdparty/boto/test_ec2_network.py
+++ b/tempest/thirdparty/boto/test_ec2_network.py
@@ -15,10 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest import clients
 from tempest.test import attr
+from tempest.test import skip_because
 from tempest.thirdparty.boto.test import BotoTestCase
 
 
@@ -30,8 +29,8 @@
         cls.os = clients.Manager()
         cls.client = cls.os.ec2api_client
 
-# Note(afazekas): these tests for things duable without an instance
-    @testtools.skip("Skipped until the Bug #1080406 is resolved")
+    # Note(afazekas): these tests for things duable without an instance
+    @skip_because(bug="1080406")
     @attr(type='smoke')
     def test_disassociate_not_associated_floating_ip(self):
         # EC2 disassociate not associated floating ip
diff --git a/tempest/thirdparty/boto/test_s3_buckets.py b/tempest/thirdparty/boto/test_s3_buckets.py
index e43cbaa..1a8fbe0 100644
--- a/tempest/thirdparty/boto/test_s3_buckets.py
+++ b/tempest/thirdparty/boto/test_s3_buckets.py
@@ -15,11 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
+from tempest.test import skip_because
 from tempest.thirdparty.boto.test import BotoTestCase
 
 
@@ -31,7 +30,7 @@
         cls.os = clients.Manager()
         cls.client = cls.os.s3_client
 
-    @testtools.skip("Skipped until the Bug #1076965 is resolved")
+    @skip_because(bug="1076965")
     @attr(type='smoke')
     def test_create_and_get_delete_bucket(self):
         # S3 Create, get and delete bucket
diff --git a/tools/check_logs.py b/tools/check_logs.py
new file mode 100755
index 0000000..0cc3677
--- /dev/null
+++ b/tools/check_logs.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 Red Hat, 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.
+
+import sys
+
+if __name__ == "__main__":
+    sys.exit(0)
diff --git a/tools/skip_tracker.py b/tools/skip_tracker.py
index c38ccdb..ffaf134 100755
--- a/tools/skip_tracker.py
+++ b/tools/skip_tracker.py
@@ -61,8 +61,8 @@
     """
     Return the skip tuples in a test file
     """
-    BUG_RE = re.compile(r'.*skip.*bug:*\s*\#*(\d+)', re.IGNORECASE)
-    DEF_RE = re.compile(r'.*def (\w+)\(')
+    BUG_RE = re.compile(r'\s*@.*skip_because\(bug=[\'"](\d+)[\'"]')
+    DEF_RE = re.compile(r'\s*def (\w+)\(')
     bug_found = False
     results = []
     lines = open(path, 'rb').readlines()
diff --git a/tools/tempest_auto_config.py b/tools/tempest_auto_config.py
new file mode 100644
index 0000000..aef6a1f
--- /dev/null
+++ b/tools/tempest_auto_config.py
@@ -0,0 +1,234 @@
+# 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.
+
+# Config
+import ConfigParser
+import os
+
+# Default client libs
+import keystoneclient.v2_0.client as keystone_client
+
+# Import Openstack exceptions
+import keystoneclient.exceptions as keystone_exception
+
+
+DEFAULT_CONFIG_DIR = "%s/etc" % os.path.abspath(os.path.pardir)
+DEFAULT_CONFIG_FILE = "tempest.conf"
+DEFAULT_CONFIG_SAMPLE = "tempest.conf.sample"
+
+# Environment variables override defaults
+TEMPEST_CONFIG_DIR = os.environ.get('TEMPEST_CONFIG_DIR') or DEFAULT_CONFIG_DIR
+TEMPEST_CONFIG = os.environ.get('TEMPEST_CONFIG') or "%s/%s" % \
+    (TEMPEST_CONFIG_DIR, DEFAULT_CONFIG_FILE)
+TEMPEST_CONFIG_SAMPLE = os.environ.get('TEMPEST_CONFIG_SAMPLE') or "%s/%s" % \
+    (TEMPEST_CONFIG_DIR, DEFAULT_CONFIG_SAMPLE)
+
+# Admin credentials
+OS_USERNAME = os.environ.get('OS_USERNAME')
+OS_PASSWORD = os.environ.get('OS_PASSWORD')
+OS_TENANT_NAME = os.environ.get('OS_TENANT_NAME')
+OS_AUTH_URL = os.environ.get('OS_AUTH_URL')
+
+# Image references
+IMAGE_ID = os.environ.get('IMAGE_ID')
+IMAGE_ID_ALT = os.environ.get('IMAGE_ID_ALT')
+
+
+class ClientManager(object):
+    """
+    Manager that provides access to the official python clients for
+    calling various OpenStack APIs.
+    """
+    def __init__(self):
+        self.identity_client = None
+        self.image_client = None
+        self.network_client = None
+        self.compute_client = None
+        self.volume_client = None
+
+    def get_identity_client(self, **kwargs):
+        """
+        Returns the openstack identity python client
+        :param username: a string representing the username
+        :param password: a string representing the user's password
+        :param tenant_name: a string representing the tenant name of the user
+        :param auth_url: a string representing the auth url of the identity
+        :param insecure: True if we wish to disable ssl certificate validation,
+        False otherwise
+        :returns an instance of openstack identity python client
+        """
+        if not self.identity_client:
+            self.identity_client = keystone_client.Client(**kwargs)
+
+        return self.identity_client
+
+
+def getTempestConfigSample():
+    """
+    Gets the tempest configuration file as a ConfigParser object
+    :return: the tempest configuration file
+    """
+    # get the sample config file from the sample
+    config_sample = ConfigParser.ConfigParser()
+    config_sample.readfp(open(TEMPEST_CONFIG_SAMPLE))
+
+    return config_sample
+
+
+def update_config_admin_credentials(config, config_section):
+    """
+    Updates the tempest config with the admin credentials
+    :param config: an object representing the tempest config file
+    :param config_section: the section name where the admin credentials are
+    """
+    # Check if credentials are present
+    if not (OS_AUTH_URL and
+            OS_USERNAME and
+            OS_PASSWORD and
+            OS_TENANT_NAME):
+        raise Exception("Admin environment variables not found.")
+
+    # TODO(tkammer): Add support for uri_v3
+    config_identity_params = {'uri': OS_AUTH_URL,
+                              'admin_username': OS_USERNAME,
+                              'admin_password': OS_PASSWORD,
+                              'admin_tenant_name': OS_TENANT_NAME}
+
+    update_config_section_with_params(config,
+                                      config_section,
+                                      config_identity_params)
+
+
+def update_config_section_with_params(config, section, params):
+    """
+    Updates a given config object with given params
+    :param config: the object representing the config file of tempest
+    :param section: the section we would like to update
+    :param params: the parameters we wish to update for that section
+    """
+    for option, value in params.items():
+        config.set(section, option, value)
+
+
+def get_identity_client_kwargs(config, section_name):
+    """
+    Get the required arguments for the identity python client
+    :param config: the tempest configuration file
+    :param section_name: the section name in the configuration where the
+    arguments can be found
+    :return: a dictionary representing the needed arguments for the identity
+    client
+    """
+    username = config.get(section_name, 'admin_username')
+    password = config.get(section_name, 'admin_password')
+    tenant_name = config.get(section_name, 'admin_tenant_name')
+    auth_url = config.get(section_name, 'uri')
+    dscv = config.get(section_name, 'disable_ssl_certificate_validation')
+    kwargs = {'username': username,
+              'password': password,
+              'tenant_name': tenant_name,
+              'auth_url': auth_url,
+              'insecure': dscv}
+
+    return kwargs
+
+
+def create_user_with_tenant(identity_client, username, password, tenant_name):
+    """
+    Creates a user using a given identity client
+    :param identity_client: openstack identity python client
+    :param username: a string representing the username
+    :param password: a string representing the user's password
+    :param tenant_name: a string representing the tenant name of the user
+    """
+    # Try to create the necessary tenant
+    tenant_id = None
+    try:
+        tenant_description = "Tenant for Tempest %s user" % username
+        tenant = identity_client.tenants.create(tenant_name,
+                                                tenant_description)
+        tenant_id = tenant.id
+    except keystone_exception.Conflict:
+
+        # if already exist, use existing tenant
+        tenant_list = identity_client.tenants.list()
+        for tenant in tenant_list:
+            if tenant.name == tenant_name:
+                tenant_id = tenant.id
+
+    # Try to create the user
+    try:
+        email = "%s@test.com" % username
+        identity_client.users.create(name=username,
+                                     password=password,
+                                     email=email,
+                                     tenant_id=tenant_id)
+    except keystone_exception.Conflict:
+
+        # if already exist, use existing user
+        pass
+
+
+def create_users_and_tenants(identity_client,
+                             config,
+                             identity_section):
+    """
+    Creates the two non admin users and tenants for tempest
+    :param identity_client: openstack identity python client
+    :param config: tempest configuration file
+    :param identity_section: the section name of identity in the config
+    """
+    # Get the necessary params from the config file
+    tenant_name = config.get(identity_section, 'tenant_name')
+    username = config.get(identity_section, 'username')
+    password = config.get(identity_section, 'password')
+
+    alt_tenant_name = config.get(identity_section, 'alt_tenant_name')
+    alt_username = config.get(identity_section, 'alt_username')
+    alt_password = config.get(identity_section, 'alt_password')
+
+    # Create the necessary users for the test runs
+    create_user_with_tenant(identity_client, username, password, tenant_name)
+    create_user_with_tenant(identity_client, alt_username, alt_password,
+                            alt_tenant_name)
+
+
+def main():
+    """
+    Main module to control the script
+    """
+    # TODO(tkammer): add support for existing config file
+    config_sample = getTempestConfigSample()
+    update_config_admin_credentials(config_sample, 'identity')
+
+    client_manager = ClientManager()
+
+    # Set the identity related info for tempest
+    identity_client_kwargs = get_identity_client_kwargs(config_sample,
+                                                        'identity')
+    identity_client = client_manager.get_identity_client(
+        **identity_client_kwargs)
+
+    # Create the necessary users and tenants for tempest run
+    create_users_and_tenants(identity_client,
+                             config_sample,
+                             'identity')
+
+    # TODO(tkammer): add image implementation
+
+if __name__ == "__main__":
+    main()