Merge "Use random name in network common function"
diff --git a/tempest/api/compute/admin/test_availability_zone.py b/tempest/api/compute/admin/test_availability_zone.py
index ee003b0..3470602 100644
--- a/tempest/api/compute/admin/test_availability_zone.py
+++ b/tempest/api/compute/admin/test_availability_zone.py
@@ -29,7 +29,7 @@
     def test_get_availability_zone_list(self):
         # List of availability zone
         availability_zone = self.client.list_availability_zones()
-        self.assertTrue(len(availability_zone['availabilityZoneInfo']) > 0)
+        self.assertGreater(len(availability_zone['availabilityZoneInfo']), 0)
 
     @test.idempotent_id('ef726c58-530f-44c2-968c-c7bed22d5b8c')
     def test_get_availability_zone_list_detail(self):
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
index e91944f..8db094d 100644
--- a/tempest/api/compute/images/test_images_negative.py
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -64,8 +64,6 @@
         # Create a new image with invalid server id
         name = data_utils.rand_name('image')
         meta = {'image_type': 'test'}
-        resp = {}
-        resp['status'] = None
         self.assertRaises(lib_exc.NotFound, self.create_image_from_server,
                           '!@$^&*()', name=name, meta=meta)
 
diff --git a/tempest/api/compute/servers/test_instance_actions.py b/tempest/api/compute/servers/test_instance_actions.py
index a229df8..e50881f 100644
--- a/tempest/api/compute/servers/test_instance_actions.py
+++ b/tempest/api/compute/servers/test_instance_actions.py
@@ -28,17 +28,17 @@
     @classmethod
     def resource_setup(cls):
         super(InstanceActionsTestJSON, cls).resource_setup()
-        server = cls.create_test_server(wait_until='ACTIVE')
-        cls.request_id = server.response['x-compute-request-id']
-        cls.server_id = server['id']
+        cls.server = cls.create_test_server(wait_until='ACTIVE')
+        cls.request_id = cls.server.response['x-compute-request-id']
 
     @test.idempotent_id('77ca5cc5-9990-45e0-ab98-1de8fead201a')
     def test_list_instance_actions(self):
         # List actions of the provided server
-        self.client.reboot_server(self.server_id, type='HARD')
-        waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
+        self.client.reboot_server(self.server['id'], type='HARD')
+        waiters.wait_for_server_status(self.client,
+                                       self.server['id'], 'ACTIVE')
 
-        body = (self.client.list_instance_actions(self.server_id)
+        body = (self.client.list_instance_actions(self.server['id'])
                 ['instanceActions'])
         self.assertEqual(len(body), 2, str(body))
         self.assertEqual(sorted([i['action'] for i in body]),
@@ -48,8 +48,8 @@
     def test_get_instance_action(self):
         # Get the action details of the provided server
         body = self.client.show_instance_action(
-            self.server_id, self.request_id)['instanceAction']
-        self.assertEqual(self.server_id, body['instance_uuid'])
+            self.server['id'], self.request_id)['instanceAction']
+        self.assertEqual(self.server['id'], body['instance_uuid'])
         self.assertEqual('create', body['action'])
 
 
diff --git a/tempest/api/compute/servers/test_instance_actions_negative.py b/tempest/api/compute/servers/test_instance_actions_negative.py
index 54ec6aa..33fed08 100644
--- a/tempest/api/compute/servers/test_instance_actions_negative.py
+++ b/tempest/api/compute/servers/test_instance_actions_negative.py
@@ -29,8 +29,7 @@
     @classmethod
     def resource_setup(cls):
         super(InstanceActionsNegativeTestJSON, cls).resource_setup()
-        server = cls.create_test_server(wait_until='ACTIVE')
-        cls.server_id = server['id']
+        cls.server = cls.create_test_server(wait_until='ACTIVE')
 
     @test.attr(type=['negative'])
     @test.idempotent_id('67e1fce6-7ec2-45c6-92d4-0a8f1a632910')
@@ -46,4 +45,4 @@
     def test_get_instance_action_invalid_request(self):
         # Get the action details of the provided server with invalid request
         self.assertRaises(lib_exc.NotFound, self.client.show_instance_action,
-                          self.server_id, '999')
+                          self.server['id'], '999')
diff --git a/tempest/api/compute/servers/test_multiple_create_negative.py b/tempest/api/compute/servers/test_multiple_create_negative.py
index c4dbe23..d9fb4ca 100644
--- a/tempest/api/compute/servers/test_multiple_create_negative.py
+++ b/tempest/api/compute/servers/test_multiple_create_negative.py
@@ -14,48 +14,38 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.common.utils import data_utils
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
 
 class MultipleCreateNegativeTestJSON(base.BaseV2ComputeTest):
-    _name = 'multiple-create-test'
-
-    def _create_multiple_servers(self, **kwargs):
-        # This is the right way to create_multiple servers and manage to get
-        # the created servers into the servers list to be cleaned up after all.
-        kwargs['name'] = kwargs.get('name', data_utils.rand_name(self._name))
-        body = self.create_test_server(**kwargs)
-
-        return body
 
     @test.attr(type=['negative'])
     @test.idempotent_id('daf29d8d-e928-4a01-9a8c-b129603f3fc0')
     def test_min_count_less_than_one(self):
         invalid_min_count = 0
-        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self.create_test_server,
                           min_count=invalid_min_count)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('999aa722-d624-4423-b813-0d1ac9884d7a')
     def test_min_count_non_integer(self):
         invalid_min_count = 2.5
-        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self.create_test_server,
                           min_count=invalid_min_count)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('a6f9c2ab-e060-4b82-b23c-4532cb9390ff')
     def test_max_count_less_than_one(self):
         invalid_max_count = 0
-        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self.create_test_server,
                           max_count=invalid_max_count)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('9c5698d1-d7af-4c80-b971-9d403135eea2')
     def test_max_count_non_integer(self):
         invalid_max_count = 2.5
-        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self.create_test_server,
                           max_count=invalid_max_count)
 
     @test.attr(type=['negative'])
@@ -63,6 +53,6 @@
     def test_max_count_less_than_min_count(self):
         min_count = 3
         max_count = 2
-        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self.create_test_server,
                           min_count=min_count,
                           max_count=max_count)
diff --git a/tempest/api/compute/servers/test_server_metadata.py b/tempest/api/compute/servers/test_server_metadata.py
index 9c07677..cb66e81 100644
--- a/tempest/api/compute/servers/test_server_metadata.py
+++ b/tempest/api/compute/servers/test_server_metadata.py
@@ -28,18 +28,17 @@
     @classmethod
     def resource_setup(cls):
         super(ServerMetadataTestJSON, cls).resource_setup()
-        server = cls.create_test_server(metadata={}, wait_until='ACTIVE')
-        cls.server_id = server['id']
+        cls.server = cls.create_test_server(metadata={}, wait_until='ACTIVE')
 
     def setUp(self):
         super(ServerMetadataTestJSON, self).setUp()
         meta = {'key1': 'value1', 'key2': 'value2'}
-        self.client.set_server_metadata(self.server_id, meta)['metadata']
+        self.client.set_server_metadata(self.server['id'], meta)['metadata']
 
     @test.idempotent_id('479da087-92b3-4dcf-aeb3-fd293b2d14ce')
     def test_list_server_metadata(self):
         # All metadata key/value pairs for a server should be returned
-        resp_metadata = (self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server['id'])
                          ['metadata'])
 
         # Verify the expected metadata items are in the list
@@ -51,12 +50,12 @@
         # The server's metadata should be replaced with the provided values
         # Create a new set of metadata for the server
         req_metadata = {'meta2': 'data2', 'meta3': 'data3'}
-        self.client.set_server_metadata(self.server_id,
+        self.client.set_server_metadata(self.server['id'],
                                         req_metadata)['metadata']
 
         # Verify the expected values are correct, and that the
         # previous values have been removed
-        resp_metadata = (self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server['id'])
                          ['metadata'])
         self.assertEqual(resp_metadata, req_metadata)
 
@@ -65,10 +64,10 @@
         # The server's metadata values should be updated to the
         # provided values
         meta = {'key1': 'alt1', 'key3': 'value3'}
-        self.client.update_server_metadata(self.server_id, meta)
+        self.client.update_server_metadata(self.server['id'], meta)
 
         # Verify the values have been updated to the proper values
-        resp_metadata = (self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server['id'])
                          ['metadata'])
         expected = {'key1': 'alt1', 'key2': 'value2', 'key3': 'value3'}
         self.assertEqual(expected, resp_metadata)
@@ -78,8 +77,8 @@
         # The original metadata should not be lost if empty metadata body is
         # passed
         meta = {}
-        self.client.update_server_metadata(self.server_id, meta)
-        resp_metadata = (self.client.list_server_metadata(self.server_id)
+        self.client.update_server_metadata(self.server['id'], meta)
+        resp_metadata = (self.client.list_server_metadata(self.server['id'])
                          ['metadata'])
         expected = {'key1': 'value1', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
@@ -87,7 +86,7 @@
     @test.idempotent_id('3043c57d-7e0e-49a6-9a96-ad569c265e6a')
     def test_get_server_metadata_item(self):
         # The value for a specific metadata key should be returned
-        meta = self.client.show_server_metadata_item(self.server_id,
+        meta = self.client.show_server_metadata_item(self.server['id'],
                                                      'key2')['meta']
         self.assertEqual('value2', meta['key2'])
 
@@ -96,10 +95,10 @@
         # The item's value should be updated to the provided value
         # Update the metadata value
         meta = {'nova': 'alt'}
-        self.client.set_server_metadata_item(self.server_id, 'nova', meta)
+        self.client.set_server_metadata_item(self.server['id'], 'nova', meta)
 
         # Verify the meta item's value has been updated
-        resp_metadata = (self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server['id'])
                          ['metadata'])
         expected = {'key1': 'value1', 'key2': 'value2', 'nova': 'alt'}
         self.assertEqual(expected, resp_metadata)
@@ -107,10 +106,10 @@
     @test.idempotent_id('127642d6-4c7b-4486-b7cd-07265a378658')
     def test_delete_server_metadata_item(self):
         # The metadata value/key pair should be deleted from the server
-        self.client.delete_server_metadata_item(self.server_id, 'key1')
+        self.client.delete_server_metadata_item(self.server['id'], 'key1')
 
         # Verify the metadata item has been removed
-        resp_metadata = (self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server['id'])
                          ['metadata'])
         expected = {'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
diff --git a/tempest/api/compute/servers/test_server_metadata_negative.py b/tempest/api/compute/servers/test_server_metadata_negative.py
index cbe70e2..aae9101 100644
--- a/tempest/api/compute/servers/test_server_metadata_negative.py
+++ b/tempest/api/compute/servers/test_server_metadata_negative.py
@@ -31,9 +31,7 @@
     def resource_setup(cls):
         super(ServerMetadataNegativeTestJSON, cls).resource_setup()
         cls.tenant_id = cls.client.tenant_id
-        server = cls.create_test_server(metadata={}, wait_until='ACTIVE')
-
-        cls.server_id = server['id']
+        cls.server = cls.create_test_server(metadata={}, wait_until='ACTIVE')
 
     @test.attr(type=['negative'])
     @test.idempotent_id('fe114a8f-3a57-4eff-9ee2-4e14628df049')
@@ -87,7 +85,7 @@
         meta = {'testkey': 'testvalue'}
         self.assertRaises(lib_exc.BadRequest,
                           self.client.set_server_metadata_item,
-                          self.server_id, 'key', meta)
+                          self.server['id'], 'key', meta)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('0df38c2a-3d4e-4db5-98d8-d4d9fa843a12')
@@ -118,7 +116,7 @@
         meta = {'': 'data1'}
         self.assertRaises(lib_exc.BadRequest,
                           self.client.update_server_metadata,
-                          self.server_id, meta=meta)
+                          self.server['id'], meta=meta)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('6bbd88e1-f8b3-424d-ba10-ae21c45ada8d')
@@ -146,14 +144,14 @@
             req_metadata['key' + str(num)] = 'val' + str(num)
         self.assertRaises((lib_exc.OverLimit, lib_exc.Forbidden),
                           self.client.set_server_metadata,
-                          self.server_id, req_metadata)
+                          self.server['id'], req_metadata)
 
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised while exceeding metadata items limit for
         # tenant.
         self.assertRaises((lib_exc.Forbidden, lib_exc.OverLimit),
                           self.client.update_server_metadata,
-                          self.server_id, req_metadata)
+                          self.server['id'], req_metadata)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('96100343-7fa9-40d8-80fa-d29ef588ce1c')
@@ -163,7 +161,7 @@
         meta = {'': 'data1'}
         self.assertRaises(lib_exc.BadRequest,
                           self.client.set_server_metadata,
-                          self.server_id, meta=meta)
+                          self.server['id'], meta=meta)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('64a91aee-9723-4863-be44-4c9d9f1e7d0e')
@@ -173,4 +171,4 @@
         meta = {'meta1': 'data1'}
         self.assertRaises(lib_exc.BadRequest,
                           self.client.set_server_metadata,
-                          self.server_id, meta=meta, no_metadata_field=True)
+                          self.server['id'], meta=meta, no_metadata_field=True)
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index 89be3f3..1b1b339 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -490,6 +490,36 @@
                           self.client.unshelve_server,
                           self.server_id)
 
+    @test.attr(type=['negative'])
+    @test.idempotent_id('74085be3-a370-4ca2-bc51-2d0e10e0f573')
+    @test.services('volume', 'image')
+    def test_create_server_from_non_bootable_volume(self):
+        # Create a volume
+        volume = self.create_volume()
+
+        # Update volume bootable status to false
+        self.volumes_client.set_bootable_volume(volume['id'],
+                                                bootable=False)
+
+        # Verify bootable flag was updated
+        nonbootable_vol = self.volumes_client.show_volume(
+            volume['id'])['volume']
+        self.assertEqual('false', nonbootable_vol['bootable'])
+
+        # Block device mapping
+        bd_map = [{'boot_index': '0',
+                   'uuid': volume['id'],
+                   'source_type': 'volume',
+                   'destination_type': 'volume',
+                   'delete_on_termination': False}]
+
+        # Try creating a server from non-bootable volume
+        self.assertRaises(lib_exc.BadRequest,
+                          self.create_test_server,
+                          image_id='',
+                          wait_until='ACTIVE',
+                          block_device_mapping_v2=bd_map)
+
 
 class ServersNegativeTestMultiTenantJSON(base.BaseV2ComputeTest):
 
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index e620e03..08c34d3 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -40,8 +40,7 @@
     @classmethod
     def resource_setup(cls):
         super(VirtualInterfacesTestJSON, cls).resource_setup()
-        server = cls.create_test_server(wait_until='ACTIVE')
-        cls.server_id = server['id']
+        cls.server = cls.create_test_server(wait_until='ACTIVE')
 
     @test.idempotent_id('96c4e2ef-5e4d-4d7f-87f5-fed6dca18016')
     @test.services('network')
@@ -53,9 +52,9 @@
             # TODO(mriedem): After a microversion implements the API for
             # neutron, a 400 should be a failure for nova-network and neutron.
             with testtools.ExpectedException(exceptions.BadRequest):
-                self.client.list_virtual_interfaces(self.server_id)
+                self.client.list_virtual_interfaces(self.server['id'])
         else:
-            output = self.client.list_virtual_interfaces(self.server_id)
+            output = self.client.list_virtual_interfaces(self.server['id'])
             self.assertIsNotNone(output)
             virt_ifaces = output
             self.assertNotEqual(0, len(virt_ifaces['virtual_interfaces']),
diff --git a/tempest/api/compute/test_live_block_migration_negative.py b/tempest/api/compute/test_live_block_migration_negative.py
index ffd274f..bd2b185 100644
--- a/tempest/api/compute/test_live_block_migration_negative.py
+++ b/tempest/api/compute/test_live_block_migration_negative.py
@@ -49,9 +49,8 @@
         # Migrating to an invalid host should not change the status
         target_host = data_utils.rand_name('host')
         server = self.create_test_server(wait_until="ACTIVE")
-        server_id = server['id']
 
         self.assertRaises(lib_exc.BadRequest, self._migrate_server_to,
-                          server_id, target_host)
-        waiters.wait_for_server_status(self.servers_client, server_id,
+                          server['id'], target_host)
+        waiters.wait_for_server_status(self.servers_client, server['id'],
                                        'ACTIVE')
diff --git a/tempest/api/network/admin/test_routers_dvr.py b/tempest/api/network/admin/test_routers_dvr.py
index 36cb15f..66feba8 100644
--- a/tempest/api/network/admin/test_routers_dvr.py
+++ b/tempest/api/network/admin/test_routers_dvr.py
@@ -13,6 +13,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import testtools
+
 from tempest.api.network import base_routers as base
 from tempest.common.utils import data_utils
 from tempest import test
@@ -80,6 +82,8 @@
         self.assertFalse(router['router']['distributed'])
 
     @test.idempotent_id('acd43596-c1fb-439d-ada8-31ad48ae3c2e')
+    @testtools.skipUnless(test.is_extension_enabled('l3-ha', 'network'),
+                          'HA routers are not available.')
     def test_centralized_router_update_to_dvr(self):
         """Test centralized router update
 
@@ -95,9 +99,11 @@
         """
         name = data_utils.rand_name('router')
         # router needs to be in admin state down in order to be upgraded to DVR
+        # l3ha routers are not upgradable to dvr, make it explicitly non ha
         router = self.admin_routers_client.create_router(name=name,
                                                          distributed=False,
-                                                         admin_state_up=False)
+                                                         admin_state_up=False,
+                                                         ha=False)
         self.addCleanup(self.admin_routers_client.delete_router,
                         router['router']['id'])
         self.assertFalse(router['router']['distributed'])
diff --git a/tempest/api/orchestration/stacks/test_templates_negative.py b/tempest/api/orchestration/stacks/test_templates_negative.py
index 24e10dd..f8245c1 100644
--- a/tempest/api/orchestration/stacks/test_templates_negative.py
+++ b/tempest/api/orchestration/stacks/test_templates_negative.py
@@ -27,7 +27,7 @@
     Type: AWS::IAM::User
 """
 
-    invalid_template_url = 'http://www.example.com/template.yaml'
+    invalid_template_url = 'http:///template.yaml'
 
     @classmethod
     def resource_setup(cls):
@@ -57,4 +57,4 @@
 }
 """
 
-    invalid_template_url = 'http://www.example.com/template.template'
+    invalid_template_url = 'http:///template.template'
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 2082f50..b9aeb99 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -177,7 +177,7 @@
                 pass
 
     def create_server(self, **kwargs):
-        name = kwargs.get(
+        name = kwargs.pop(
             'name',
             data_utils.rand_name(self.__class__.__name__ + '-instance'))
 
diff --git a/tempest/clients.py b/tempest/clients.py
index be6bc02..0158efd 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -19,7 +19,6 @@
 
 from tempest.common import negative_rest_client
 from tempest import config
-from tempest import exceptions
 from tempest.lib import auth
 from tempest.lib import exceptions as lib_exc
 from tempest.lib.services import clients
@@ -280,52 +279,33 @@
         # Mandatory parameters (always defined)
         params = self.parameters['volume']
 
-        self.volume_qos_client = volume.v1.QosSpecsClient(self.auth_provider,
-                                                          **params)
-        self.volume_qos_v2_client = volume.v2.QosSpecsClient(
-            self.auth_provider, **params)
-        self.volume_services_client = volume.v1.ServicesClient(
-            self.auth_provider, **params)
-        self.volume_services_v2_client = volume.v2.ServicesClient(
-            self.auth_provider, **params)
-        self.backups_client = volume.v1.BackupsClient(self.auth_provider,
-                                                      **params)
-        self.backups_v2_client = volume.v2.BackupsClient(self.auth_provider,
-                                                         **params)
-        self.encryption_types_client = volume.v1.EncryptionTypesClient(
-            self.auth_provider, **params)
-        self.encryption_types_v2_client = volume.v2.EncryptionTypesClient(
-            self.auth_provider, **params)
-        self.snapshots_client = volume.v1.SnapshotsClient(self.auth_provider,
-                                                          **params)
-        self.snapshots_v2_client = volume.v2.SnapshotsClient(
-            self.auth_provider, **params)
-        self.volumes_client = volume.v1.VolumesClient(self.auth_provider,
-                                                      **params)
-        self.volumes_v2_client = volume.v2.VolumesClient(self.auth_provider,
-                                                         **params)
+        self.volume_qos_client = self.volume_v1.QosSpecsClient()
+        self.volume_qos_v2_client = self.volume_v2.QosSpecsClient()
+        self.volume_services_client = self.volume_v1.ServicesClient()
+        self.volume_services_v2_client = self.volume_v2.ServicesClient()
+        self.backups_client = self.volume_v1.BackupsClient()
+        self.backups_v2_client = self.volume_v2.BackupsClient()
+        self.encryption_types_client = self.volume_v1.EncryptionTypesClient()
+        self.encryption_types_v2_client = \
+            self.volume_v2.EncryptionTypesClient()
+        self.snapshots_client = self.volume_v1.SnapshotsClient()
+        self.snapshots_v2_client = self.volume_v2.SnapshotsClient()
+        self.volumes_client = self.volume_v1.VolumesClient()
+        self.volumes_v2_client = self.volume_v2.VolumesClient()
         self.volume_messages_client = volume.v3.MessagesClient(
             self.auth_provider, **params)
-        self.volume_types_client = volume.v1.TypesClient(self.auth_provider,
-                                                         **params)
-        self.volume_types_v2_client = volume.v2.TypesClient(self.auth_provider,
-                                                            **params)
-        self.volume_hosts_client = volume.v1.HostsClient(self.auth_provider,
-                                                         **params)
-        self.volume_hosts_v2_client = volume.v2.HostsClient(self.auth_provider,
-                                                            **params)
-        self.volume_quotas_client = volume.v1.QuotasClient(self.auth_provider,
-                                                           **params)
-        self.volume_quotas_v2_client = volume.v2.QuotasClient(
-            self.auth_provider, **params)
-        self.volumes_extension_client = volume.v1.ExtensionsClient(
-            self.auth_provider, **params)
-        self.volumes_v2_extension_client = volume.v2.ExtensionsClient(
-            self.auth_provider, **params)
+        self.volume_types_client = self.volume_v1.TypesClient()
+        self.volume_types_v2_client = self.volume_v2.TypesClient()
+        self.volume_hosts_client = self.volume_v1.HostsClient()
+        self.volume_hosts_v2_client = self.volume_v2.HostsClient()
+        self.volume_quotas_client = self.volume_v1.QuotasClient()
+        self.volume_quotas_v2_client = self.volume_v2.QuotasClient()
+        self.volumes_extension_client = self.volume_v1.ExtensionsClient()
+        self.volumes_v2_extension_client = self.volume_v2.ExtensionsClient()
         self.volume_availability_zone_client = \
-            volume.v1.AvailabilityZoneClient(self.auth_provider, **params)
+            self.volume_v1.AvailabilityZoneClient()
         self.volume_v2_availability_zone_client = \
-            volume.v2.AvailabilityZoneClient(self.auth_provider, **params)
+            self.volume_v2.AvailabilityZoneClient()
 
     def _set_object_storage_clients(self):
         # Mandatory parameters (always defined)
@@ -350,7 +330,7 @@
     # kwargs for auth provider match the common ones used by service clients
     default_params = config.service_client_config()
     if credentials is None:
-        raise exceptions.InvalidCredentials(
+        raise lib_exc.InvalidCredentials(
             'Credentials must be specified')
     auth_provider_class, auth_url = get_auth_provider_class(
         credentials)
diff --git a/tempest/common/utils/net_utils.py b/tempest/common/utils/net_utils.py
index f0d3da3..867b3dd 100644
--- a/tempest/common/utils/net_utils.py
+++ b/tempest/common/utils/net_utils.py
@@ -51,3 +51,23 @@
                 return addrs
     msg = "Insufficient IP addresses available"
     raise lib_exc.BadRequest(message=msg)
+
+
+def get_ping_payload_size(mtu, ip_version):
+    """Return the maximum size of ping payload that will fit into MTU."""
+    if not mtu:
+        return None
+    if ip_version == 4:
+        ip_header = 20
+        icmp_header = 8
+    else:
+        ip_header = 40
+        icmp_header = 4
+    res = mtu - ip_header - icmp_header
+    if res < 0:
+        raise lib_exc.BadRequest(
+            message='MTU = %(mtu)d is too low for IPv%(ip_version)d' % {
+                'mtu': mtu,
+                'ip_version': ip_version,
+            })
+    return res
diff --git a/tempest/lib/services/clients.py b/tempest/lib/services/clients.py
index adf666b..2e5c457 100644
--- a/tempest/lib/services/clients.py
+++ b/tempest/lib/services/clients.py
@@ -25,6 +25,7 @@
 from tempest.lib.services import compute
 from tempest.lib.services import image
 from tempest.lib.services import network
+from tempest.lib.services import volume
 
 
 LOG = logging.getLogger(__name__)
@@ -40,7 +41,9 @@
         'compute': compute,
         'image.v1': image.v1,
         'image.v2': image.v2,
-        'network': network
+        'network': network,
+        'volume.v1': volume.v1,
+        'volume.v2': volume.v2
     }
 
 
@@ -49,8 +52,7 @@
     # NOTE(andreaf) This list will exists only as long the remain clients
     # are migrated to tempest.lib, and it will then be deleted without
     # deprecation or advance notice
-    return set(['identity.v2', 'identity.v3', 'object-storage', 'volume.v1',
-                'volume.v2', 'volume.v3'])
+    return set(['identity.v2', 'identity.v3', 'object-storage', 'volume.v3'])
 
 
 def available_modules():
diff --git a/tempest/lib/services/volume/__init__.py b/tempest/lib/services/volume/__init__.py
index e69de29..11da06c 100644
--- a/tempest/lib/services/volume/__init__.py
+++ b/tempest/lib/services/volume/__init__.py
@@ -0,0 +1,18 @@
+# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P.
+#
+# 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.lib.services.volume import v1
+from tempest.lib.services.volume import v2
+
+__all__ = ['v1', 'v2']
diff --git a/tempest/lib/services/volume/v1/__init__.py b/tempest/lib/services/volume/v1/__init__.py
index e69de29..9c98542 100644
--- a/tempest/lib/services/volume/v1/__init__.py
+++ b/tempest/lib/services/volume/v1/__init__.py
@@ -0,0 +1,31 @@
+# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P.
+#
+# 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.lib.services.volume.v1.availability_zone_client \
+    import AvailabilityZoneClient
+from tempest.lib.services.volume.v1.backups_client import BackupsClient
+from tempest.lib.services.volume.v1.encryption_types_client import \
+    EncryptionTypesClient
+from tempest.lib.services.volume.v1.extensions_client import ExtensionsClient
+from tempest.lib.services.volume.v1.hosts_client import HostsClient
+from tempest.lib.services.volume.v1.qos_client import QosSpecsClient
+from tempest.lib.services.volume.v1.quotas_client import QuotasClient
+from tempest.lib.services.volume.v1.services_client import ServicesClient
+from tempest.lib.services.volume.v1.snapshots_client import SnapshotsClient
+from tempest.lib.services.volume.v1.types_client import TypesClient
+from tempest.lib.services.volume.v1.volumes_client import VolumesClient
+
+__all__ = ['AvailabilityZoneClient', 'BackupsClient', 'EncryptionTypesClient',
+           'ExtensionsClient', 'HostsClient', 'QosSpecsClient', 'QuotasClient',
+           'ServicesClient', 'SnapshotsClient', 'TypesClient', 'VolumesClient']
diff --git a/tempest/lib/services/volume/v2/__init__.py b/tempest/lib/services/volume/v2/__init__.py
index e69de29..f547d7d 100644
--- a/tempest/lib/services/volume/v2/__init__.py
+++ b/tempest/lib/services/volume/v2/__init__.py
@@ -0,0 +1,31 @@
+# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P.
+#
+# 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.lib.services.volume.v2.availability_zone_client \
+    import AvailabilityZoneClient
+from tempest.lib.services.volume.v2.backups_client import BackupsClient
+from tempest.lib.services.volume.v2.encryption_types_client import \
+    EncryptionTypesClient
+from tempest.lib.services.volume.v2.extensions_client import ExtensionsClient
+from tempest.lib.services.volume.v2.hosts_client import HostsClient
+from tempest.lib.services.volume.v2.qos_client import QosSpecsClient
+from tempest.lib.services.volume.v2.quotas_client import QuotasClient
+from tempest.lib.services.volume.v2.services_client import ServicesClient
+from tempest.lib.services.volume.v2.snapshots_client import SnapshotsClient
+from tempest.lib.services.volume.v2.types_client import TypesClient
+from tempest.lib.services.volume.v2.volumes_client import VolumesClient
+
+__all__ = ['AvailabilityZoneClient', 'BackupsClient', 'EncryptionTypesClient',
+           'ExtensionsClient', 'HostsClient', 'QosSpecsClient', 'QuotasClient',
+           'ServicesClient', 'SnapshotsClient', 'TypesClient', 'VolumesClient']
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index ab388c2..831be99 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -26,6 +26,7 @@
 from tempest.common import image as common_image
 from tempest.common.utils import data_utils
 from tempest.common.utils.linux import remote_client
+from tempest.common.utils import net_utils
 from tempest.common import waiters
 from tempest import config
 from tempest import exceptions
@@ -495,9 +496,18 @@
                                            server_id, 'ACTIVE')
 
     def ping_ip_address(self, ip_address, should_succeed=True,
-                        ping_timeout=None):
+                        ping_timeout=None, mtu=None):
         timeout = ping_timeout or CONF.validation.ping_timeout
-        cmd = ['ping', '-c1', '-w1', ip_address]
+        cmd = ['ping', '-c1', '-w1']
+
+        if mtu:
+            cmd += [
+                # don't fragment
+                '-M', 'do',
+                # ping receives just the size of ICMP payload
+                '-s', str(net_utils.get_ping_payload_size(mtu, 4))
+            ]
+        cmd.append(ip_address)
 
         def ping():
             proc = subprocess.Popen(cmd,
@@ -525,7 +535,8 @@
     def check_vm_connectivity(self, ip_address,
                               username=None,
                               private_key=None,
-                              should_connect=True):
+                              should_connect=True,
+                              mtu=None):
         """Check server connectivity
 
         :param ip_address: server to test against
@@ -534,6 +545,7 @@
         :param should_connect: True/False indicates positive/negative test
             positive - attempt ping and ssh
             negative - attempt ping and fail if succeed
+        :param mtu: network MTU to use for connectivity validation
 
         :raises: AssertError if the result of the connectivity check does
             not match the value of the should_connect param
@@ -543,7 +555,8 @@
         else:
             msg = "ip address %s is reachable" % ip_address
         self.assertTrue(self.ping_ip_address(ip_address,
-                                             should_succeed=should_connect),
+                                             should_succeed=should_connect,
+                                             mtu=mtu),
                         msg=msg)
         if should_connect:
             # no need to check ssh for negative connectivity
@@ -551,7 +564,7 @@
 
     def check_public_network_connectivity(self, ip_address, username,
                                           private_key, should_connect=True,
-                                          msg=None, servers=None):
+                                          msg=None, servers=None, mtu=None):
         # The target login is assumed to have been configured for
         # key-based authentication by cloud-init.
         LOG.debug('checking network connections to IP %s with user: %s' %
@@ -560,7 +573,8 @@
             self.check_vm_connectivity(ip_address,
                                        username,
                                        private_key,
-                                       should_connect=should_connect)
+                                       should_connect=should_connect,
+                                       mtu=mtu)
         except Exception:
             ex_msg = 'Public network connectivity check failed'
             if msg:
@@ -789,7 +803,7 @@
 
     def _get_server_port_id_and_ip4(self, server, ip_addr=None):
         ports = self._list_ports(device_id=server['id'], fixed_ip=ip_addr)
-        # A port can have more then one IP address in some cases.
+        # A port can have more than one IP address in some cases.
         # If the network is dual-stack (IPv4 + IPv6), this port is associated
         # with 2 subnets
         p_status = ['ACTIVE']
diff --git a/tempest/scenario/test_aggregates_basic_ops.py b/tempest/scenario/test_aggregates_basic_ops.py
index 43adfb1..8de3561 100644
--- a/tempest/scenario/test_aggregates_basic_ops.py
+++ b/tempest/scenario/test_aggregates_basic_ops.py
@@ -52,7 +52,7 @@
 
     def _get_host_name(self):
         hosts = self.hosts_client.list_hosts()['hosts']
-        self.assertTrue(len(hosts) >= 1)
+        self.assertGreaterEqual(len(hosts), 1)
         computes = [x for x in hosts if x['service'] == 'compute']
         return computes[0]['host_name']
 
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index a295b6a..b527c3d 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -183,7 +183,7 @@
 
     def check_public_network_connectivity(
             self, should_connect=True, msg=None,
-            should_check_floating_ip_status=True):
+            should_check_floating_ip_status=True, mtu=None):
         """Verifies connectivty to a VM via public network and floating IP
 
         and verifies floating IP has resource status is correct.
@@ -195,6 +195,7 @@
         to indicate the context of the failure
         :param should_check_floating_ip_status: bool. should status of
         floating_ip be checked or not
+        :param mtu: int. MTU network to use for connectivity validation
         """
         ssh_login = CONF.validation.image_ssh_user
         floating_ip, server = self.floating_ip_tuple
@@ -210,7 +211,7 @@
         # call the common method in the parent class
         super(TestNetworkBasicOps, self).check_public_network_connectivity(
             ip_address, ssh_login, private_key, should_connect, msg,
-            self.servers)
+            self.servers, mtu=mtu)
 
     def _disassociate_floating_ips(self):
         floating_ip, server = self.floating_ip_tuple
@@ -410,6 +411,16 @@
                                                msg="after re-associate "
                                                    "floating ip")
 
+    @test.idempotent_id('b158ea55-472e-4086-8fa9-c64ac0c6c1d0')
+    @testtools.skipUnless(test.is_extension_enabled('net-mtu', 'network'),
+                          'No way to calculate MTU for networks')
+    @test.services('compute', 'network')
+    def test_mtu_sized_frames(self):
+        """Validate that network MTU sized frames fit through."""
+        self._setup_network_and_servers()
+        self.check_public_network_connectivity(
+            should_connect=True, mtu=self.network['mtu'])
+
     @test.idempotent_id('1546850e-fbaa-42f5-8b5f-03d8a6a95f15')
     @testtools.skipIf(CONF.baremetal.driver_enabled,
                       'Baremetal relies on a shared physical network.')
diff --git a/tempest/scenario/test_network_v6.py b/tempest/scenario/test_network_v6.py
index dd86d90..496f07e 100644
--- a/tempest/scenario/test_network_v6.py
+++ b/tempest/scenario/test_network_v6.py
@@ -18,7 +18,6 @@
 
 from tempest import config
 from tempest.lib.common.utils import test_utils
-from tempest.lib import decorators
 from tempest.scenario import manager
 from tempest import test
 
@@ -255,7 +254,6 @@
         self._prepare_and_test(address6_mode='dhcpv6-stateless', n_subnets6=2,
                                dualnet=True)
 
-    @decorators.skip_because(bug="1540983")
     @test.idempotent_id('9178ad42-10e4-47e9-8987-e02b170cc5cd')
     @test.services('compute', 'network')
     def test_dualnet_multi_prefix_slaac(self):
diff --git a/tempest/services/volume/__init__.py b/tempest/services/volume/__init__.py
index 4d29cdd..c62dd53 100644
--- a/tempest/services/volume/__init__.py
+++ b/tempest/services/volume/__init__.py
@@ -12,8 +12,6 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-from tempest.services.volume import v1
-from tempest.services.volume import v2
 from tempest.services.volume import v3
 
-__all__ = ['v1', 'v2', 'v3']
+__all__ = ['v3']
diff --git a/tempest/services/volume/v1/__init__.py b/tempest/services/volume/v1/__init__.py
deleted file mode 100644
index 7fb3ed3..0000000
--- a/tempest/services/volume/v1/__init__.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P.
-#
-# 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.lib.services.volume.v1.availability_zone_client import \
-    AvailabilityZoneClient
-from tempest.lib.services.volume.v1.backups_client import BackupsClient
-from tempest.lib.services.volume.v1.encryption_types_client import \
-    EncryptionTypesClient
-from tempest.lib.services.volume.v1.extensions_client import ExtensionsClient
-from tempest.lib.services.volume.v1.hosts_client import HostsClient
-from tempest.lib.services.volume.v1.qos_client import QosSpecsClient
-from tempest.lib.services.volume.v1.quotas_client import QuotasClient
-from tempest.lib.services.volume.v1.services_client import ServicesClient
-from tempest.lib.services.volume.v1.snapshots_client import SnapshotsClient
-from tempest.lib.services.volume.v1.types_client import TypesClient
-from tempest.lib.services.volume.v1.volumes_client import VolumesClient
-
-__all__ = ['AvailabilityZoneClient', 'EncryptionTypesClient',
-           'ExtensionsClient', 'HostsClient', 'QuotasClient',
-           'QosSpecsClient', 'ServicesClient',
-           'SnapshotsClient', 'TypesClient', 'BackupsClient',
-           'VolumesClient', ]
diff --git a/tempest/services/volume/v1/json/__init__.py b/tempest/services/volume/v1/json/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tempest/services/volume/v1/json/__init__.py
+++ /dev/null
diff --git a/tempest/services/volume/v2/__init__.py b/tempest/services/volume/v2/__init__.py
deleted file mode 100644
index 8edaf2a..0000000
--- a/tempest/services/volume/v2/__init__.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P.
-#
-# 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.lib.services.volume.v2.availability_zone_client import \
-    AvailabilityZoneClient
-from tempest.lib.services.volume.v2.backups_client import BackupsClient
-from tempest.lib.services.volume.v2.encryption_types_client import \
-    EncryptionTypesClient
-from tempest.lib.services.volume.v2.extensions_client import ExtensionsClient
-from tempest.lib.services.volume.v2.hosts_client import HostsClient
-from tempest.lib.services.volume.v2.qos_client import QosSpecsClient
-from tempest.lib.services.volume.v2.quotas_client import QuotasClient
-from tempest.lib.services.volume.v2.services_client import ServicesClient
-from tempest.lib.services.volume.v2.snapshots_client import SnapshotsClient
-from tempest.lib.services.volume.v2.types_client import TypesClient
-from tempest.lib.services.volume.v2.volumes_client import VolumesClient
-
-__all__ = ['AvailabilityZoneClient', 'BackupsClient', 'EncryptionTypesClient',
-           'ExtensionsClient', 'HostsClient', 'QosSpecsClient', 'QuotasClient',
-           'ServicesClient', 'SnapshotsClient', 'TypesClient',
-           'VolumesClient', ]
diff --git a/tempest/services/volume/v2/json/__init__.py b/tempest/services/volume/v2/json/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tempest/services/volume/v2/json/__init__.py
+++ /dev/null
diff --git a/tempest/tests/common/utils/test_net_utils.py b/tempest/tests/common/utils/test_net_utils.py
new file mode 100644
index 0000000..83c6bcc
--- /dev/null
+++ b/tempest/tests/common/utils/test_net_utils.py
@@ -0,0 +1,33 @@
+#    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 mock
+
+from tempest.common.utils import net_utils
+from tempest.lib import exceptions as lib_exc
+from tempest.tests import base
+
+
+class TestGetPingPayloadSize(base.TestCase):
+
+    def test_ipv4(self):
+        self.assertEqual(1422, net_utils.get_ping_payload_size(1450, 4))
+
+    def test_ipv6(self):
+        self.assertEqual(1406, net_utils.get_ping_payload_size(1450, 6))
+
+    def test_too_low_mtu(self):
+        self.assertRaises(
+            lib_exc.BadRequest, net_utils.get_ping_payload_size, 10, 4)
+
+    def test_None(self):
+        self.assertIsNone(net_utils.get_ping_payload_size(None, mock.Mock()))
diff --git a/tempest/tests/lib/services/volume/v1/test_quotas_client.py b/tempest/tests/lib/services/volume/v1/test_quotas_client.py
new file mode 100644
index 0000000..f9e76af
--- /dev/null
+++ b/tempest/tests/lib/services/volume/v1/test_quotas_client.py
@@ -0,0 +1,96 @@
+# Copyright 2016 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.lib.services.volume.v1 import quotas_client
+from tempest.tests.lib import fake_auth_provider
+from tempest.tests.lib.services import base
+
+
+class TestQuotasClient(base.BaseServiceTest):
+    FAKE_QUOTAS = {
+        "quota_set": {
+            "cores": 20,
+            "fixed_ips": -1,
+            "floating_ips": 10,
+            "id": "fake_tenant",
+            "injected_file_content_bytes": 10240,
+            "injected_file_path_bytes": 255,
+            "injected_files": 5,
+            "instances": 10,
+            "key_pairs": 100,
+            "metadata_items": 128,
+            "ram": 51200,
+            "security_group_rules": 20,
+            "security_groups": 10
+        }
+    }
+
+    FAKE_UPDATE_QUOTAS_REQUEST = {
+        "quota_set": {
+            "security_groups": 45
+        }
+    }
+
+    def setUp(self):
+        super(TestQuotasClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = quotas_client.QuotasClient(fake_auth,
+                                                 'volume',
+                                                 'regionOne')
+
+    def _test_show_default_quota_set(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_default_quota_set,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_QUOTAS,
+            bytes_body, tenant_id="fake_tenant")
+
+    def _test_show_quota_set(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_quota_set,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_QUOTAS,
+            bytes_body, tenant_id="fake_tenant")
+
+    def _test_update_quota_set(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_quota_set,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_UPDATE_QUOTAS_REQUEST,
+            bytes_body, tenant_id="fake_tenant")
+
+    def test_show_default_quota_set_with_str_body(self):
+        self._test_show_default_quota_set()
+
+    def test_show_default_quota_set_with_bytes_body(self):
+        self._test_show_default_quota_set(bytes_body=True)
+
+    def test_show_quota_set_with_str_body(self):
+        self._test_show_quota_set()
+
+    def test_show_quota_set_with_bytes_body(self):
+        self._test_show_quota_set(bytes_body=True)
+
+    def test_update_quota_set_with_str_body(self):
+        self._test_update_quota_set()
+
+    def test_update_quota_set_with_bytes_body(self):
+        self._test_update_quota_set(bytes_body=True)
+
+    def test_delete_quota_set(self):
+        self.check_service_client_function(
+            self.client.delete_quota_set,
+            'tempest.lib.common.rest_client.RestClient.delete',
+            {},
+            tenant_id="fake_tenant")
diff --git a/tempest/tests/lib/services/volume/v1/test_snapshots_client.py b/tempest/tests/lib/services/volume/v1/test_snapshots_client.py
new file mode 100644
index 0000000..49191e3
--- /dev/null
+++ b/tempest/tests/lib/services/volume/v1/test_snapshots_client.py
@@ -0,0 +1,200 @@
+# Copyright 2016 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.lib.services.volume.v1 import snapshots_client
+from tempest.tests.lib import fake_auth_provider
+from tempest.tests.lib.services import base
+
+
+class TestSnapshotsClient(base.BaseServiceTest):
+    FAKE_CREATE_SNAPSHOT = {
+        "snapshot": {
+            "display_name": "snap-001",
+            "display_description": "Daily backup",
+            "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            "force": True
+        }
+    }
+
+    FAKE_UPDATE_SNAPSHOT_REQUEST = {
+        "metadata": {
+            "key": "v1"
+        }
+    }
+
+    FAKE_INFO_SNAPSHOT = {
+        "snapshot": {
+            "id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
+            "display_name": "snap-001",
+            "display_description": "Daily backup",
+            "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            "status": "available",
+            "size": 30,
+            "created_at": "2012-02-29T03:50:07Z"
+        }
+    }
+
+    FAKE_LIST_SNAPSHOTS = {
+        "snapshots": [
+            {
+                "id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
+                "display_name": "snap-001",
+                "display_description": "Daily backup",
+                "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+                "status": "available",
+                "size": 30,
+                "created_at": "2012-02-29T03:50:07Z",
+                "metadata": {
+                    "contents": "junk"
+                }
+            },
+            {
+                "id": "e479997c-650b-40a4-9dfe-77655818b0d2",
+                "display_name": "snap-002",
+                "display_description": "Weekly backup",
+                "volume_id": "76b8950a-8594-4e5b-8dce-0dfa9c696358",
+                "status": "available",
+                "size": 25,
+                "created_at": "2012-03-19T01:52:47Z",
+                "metadata": {}
+            }
+        ]
+    }
+
+    def setUp(self):
+        super(TestSnapshotsClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = snapshots_client.SnapshotsClient(fake_auth,
+                                                       'volume',
+                                                       'regionOne')
+
+    def _test_create_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.create_snapshot,
+            'tempest.lib.common.rest_client.RestClient.post',
+            self.FAKE_CREATE_SNAPSHOT,
+            bytes_body)
+
+    def _test_show_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_snapshot,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_INFO_SNAPSHOT,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5")
+
+    def _test_list_snapshots(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.list_snapshots,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_LIST_SNAPSHOTS,
+            bytes_body,
+            detail=True)
+
+    def _test_create_snapshot_metadata(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.create_snapshot_metadata,
+            'tempest.lib.common.rest_client.RestClient.post',
+            self.FAKE_INFO_SNAPSHOT,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5",
+            metadata={"key": "v1"})
+
+    def _test_update_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_snapshot,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_UPDATE_SNAPSHOT_REQUEST,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5")
+
+    def _test_show_snapshot_metadata(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_snapshot_metadata,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_UPDATE_SNAPSHOT_REQUEST,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5")
+
+    def _test_update_snapshot_metadata(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_snapshot_metadata,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_UPDATE_SNAPSHOT_REQUEST,
+            bytes_body, snapshot_id="cbc36478b0bd8e67e89")
+
+    def _test_update_snapshot_metadata_item(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_snapshot_metadata_item,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_INFO_SNAPSHOT,
+            bytes_body, volume_type_id="cbc36478b0bd8e67e89")
+
+    def test_create_snapshot_with_str_body(self):
+        self._test_create_snapshot()
+
+    def test_create_snapshot_with_bytes_body(self):
+        self._test_create_snapshot(bytes_body=True)
+
+    def test_show_snapshot_with_str_body(self):
+        self._test_show_snapshot()
+
+    def test_show_snapshot_with_bytes_body(self):
+        self._test_show_snapshot(bytes_body=True)
+
+    def test_list_snapshots_with_str_body(self):
+        self._test_list_snapshots()
+
+    def test_list_snapshots_with_bytes_body(self):
+        self._test_list_snapshots(bytes_body=True)
+
+    def test_create_snapshot_metadata_with_str_body(self):
+        self._test_create_snapshot_metadata()
+
+    def test_create_snapshot_metadata_with_bytes_body(self):
+        self._test_create_snapshot_metadata(bytes_body=True)
+
+    def test_update_snapshot_with_str_body(self):
+        self._test_update_snapshot()
+
+    def test_update_snapshot_with_bytes_body(self):
+        self._test_update_snapshot(bytes_body=True)
+
+    def test_show_snapshot_metadata_with_str_body(self):
+        self._test_show_snapshot_metadata()
+
+    def test_show_snapshot_metadata_with_bytes_body(self):
+        self._test_show_snapshot_metadata(bytes_body=True)
+
+    def test_update_snapshot_metadata_with_str_body(self):
+        self._test_update_snapshot_metadata()
+
+    def test_update_snapshot_metadata_with_bytes_body(self):
+        self._test_update_snapshot_metadata(bytes_body=True)
+
+    def test_force_delete_snapshot(self):
+        self.check_service_client_function(
+            self.client.force_delete_snapshot,
+            'tempest.lib.common.rest_client.RestClient.post',
+            {},
+            snapshot_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            status=202)
+
+    def test_delete_snapshot(self):
+        self.check_service_client_function(
+            self.client.delete_snapshot,
+            'tempest.lib.common.rest_client.RestClient.delete',
+            {},
+            snapshot_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            status=202)
diff --git a/tempest/tests/lib/services/volume/v2/test_quotas_client.py b/tempest/tests/lib/services/volume/v2/test_quotas_client.py
new file mode 100644
index 0000000..6384350
--- /dev/null
+++ b/tempest/tests/lib/services/volume/v2/test_quotas_client.py
@@ -0,0 +1,86 @@
+# Copyright 2016 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.lib.services.volume.v2 import quotas_client
+from tempest.tests.lib import fake_auth_provider
+from tempest.tests.lib.services import base
+
+
+class TestQuotasClient(base.BaseServiceTest):
+    FAKE_QUOTAS = {
+        "quota_set": {
+            "gigabytes": 5,
+            "snapshots": 10,
+            "volumes": 20
+        }
+    }
+
+    FAKE_UPDATE_QUOTAS_REQUEST = {
+        "quota_set": {
+            "security_groups": 45
+        }
+    }
+
+    def setUp(self):
+        super(TestQuotasClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = quotas_client.QuotasClient(fake_auth,
+                                                 'volume',
+                                                 'regionOne')
+
+    def _test_show_default_quota_set(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_default_quota_set,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_QUOTAS,
+            bytes_body, tenant_id="fake_tenant")
+
+    def _test_show_quota_set(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_quota_set,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_QUOTAS,
+            bytes_body, tenant_id="fake_tenant")
+
+    def _test_update_quota_set(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_quota_set,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_UPDATE_QUOTAS_REQUEST,
+            bytes_body, tenant_id="fake_tenant")
+
+    def test_show_default_quota_set_with_str_body(self):
+        self._test_show_default_quota_set()
+
+    def test_show_default_quota_set_with_bytes_body(self):
+        self._test_show_default_quota_set(bytes_body=True)
+
+    def test_show_quota_set_with_str_body(self):
+        self._test_show_quota_set()
+
+    def test_show_quota_set_with_bytes_body(self):
+        self._test_show_quota_set(bytes_body=True)
+
+    def test_update_quota_set_with_str_body(self):
+        self._test_update_quota_set()
+
+    def test_update_quota_set_with_bytes_body(self):
+        self._test_update_quota_set(bytes_body=True)
+
+    def test_delete_quota_set(self):
+        self.check_service_client_function(
+            self.client.delete_quota_set,
+            'tempest.lib.common.rest_client.RestClient.delete',
+            {},
+            tenant_id="fake_tenant")
diff --git a/tempest/tests/lib/services/volume/v2/test_snapshots_client.py b/tempest/tests/lib/services/volume/v2/test_snapshots_client.py
new file mode 100644
index 0000000..7d656f1
--- /dev/null
+++ b/tempest/tests/lib/services/volume/v2/test_snapshots_client.py
@@ -0,0 +1,201 @@
+# Copyright 2016 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.lib.services.volume.v2 import snapshots_client
+from tempest.tests.lib import fake_auth_provider
+from tempest.tests.lib.services import base
+
+
+class TestSnapshotsClient(base.BaseServiceTest):
+    FAKE_CREATE_SNAPSHOT = {
+        "snapshot": {
+            "display_name": "snap-001",
+            "display_description": "Daily backup",
+            "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            "force": True
+        }
+    }
+
+    FAKE_UPDATE_SNAPSHOT_REQUEST = {
+        "metadata": {
+            "key": "v1"
+        }
+    }
+
+    FAKE_INFO_SNAPSHOT = {
+        "snapshot": {
+            "id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
+            "display_name": "snap-001",
+            "display_description": "Daily backup",
+            "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            "status": "available",
+            "size": 30,
+            "created_at": "2012-02-29T03:50:07Z"
+        }
+    }
+
+    FAKE_LIST_SNAPSHOTS = {
+        "snapshots": [
+            {
+                "id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
+                "display_name": "snap-001",
+                "display_description": "Daily backup",
+                "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+                "status": "available",
+                "size": 30,
+                "created_at": "2012-02-29T03:50:07Z",
+                "metadata": {
+                    "contents": "junk"
+                }
+            },
+            {
+                "id": "e479997c-650b-40a4-9dfe-77655818b0d2",
+                "display_name": "snap-002",
+                "display_description": "Weekly backup",
+                "volume_id": "76b8950a-8594-4e5b-8dce-0dfa9c696358",
+                "status": "available",
+                "size": 25,
+                "created_at": "2012-03-19T01:52:47Z",
+                "metadata": {}
+            }
+        ]
+    }
+
+    def setUp(self):
+        super(TestSnapshotsClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = snapshots_client.SnapshotsClient(fake_auth,
+                                                       'volume',
+                                                       'regionOne')
+
+    def _test_create_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.create_snapshot,
+            'tempest.lib.common.rest_client.RestClient.post',
+            self.FAKE_CREATE_SNAPSHOT,
+            bytes_body,
+            status=202)
+
+    def _test_show_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_snapshot,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_INFO_SNAPSHOT,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5")
+
+    def _test_list_snapshots(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.list_snapshots,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_LIST_SNAPSHOTS,
+            bytes_body,
+            detail=True)
+
+    def _test_create_snapshot_metadata(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.create_snapshot_metadata,
+            'tempest.lib.common.rest_client.RestClient.post',
+            self.FAKE_INFO_SNAPSHOT,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5",
+            metadata={"key": "v1"})
+
+    def _test_update_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_snapshot,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_UPDATE_SNAPSHOT_REQUEST,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5")
+
+    def _test_show_snapshot_metadata(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_snapshot_metadata,
+            'tempest.lib.common.rest_client.RestClient.get',
+            self.FAKE_UPDATE_SNAPSHOT_REQUEST,
+            bytes_body,
+            snapshot_id="3fbbcccf-d058-4502-8844-6feeffdf4cb5")
+
+    def _test_update_snapshot_metadata(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_snapshot_metadata,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_UPDATE_SNAPSHOT_REQUEST,
+            bytes_body, snapshot_id="cbc36478b0bd8e67e89")
+
+    def _test_update_snapshot_metadata_item(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.update_snapshot_metadata_item,
+            'tempest.lib.common.rest_client.RestClient.put',
+            self.FAKE_INFO_SNAPSHOT,
+            bytes_body, volume_type_id="cbc36478b0bd8e67e89")
+
+    def test_create_snapshot_with_str_body(self):
+        self._test_create_snapshot()
+
+    def test_create_snapshot_with_bytes_body(self):
+        self._test_create_snapshot(bytes_body=True)
+
+    def test_show_snapshot_with_str_body(self):
+        self._test_show_snapshot()
+
+    def test_show_snapshot_with_bytes_body(self):
+        self._test_show_snapshot(bytes_body=True)
+
+    def test_list_snapshots_with_str_body(self):
+        self._test_list_snapshots()
+
+    def test_list_snapshots_with_bytes_body(self):
+        self._test_list_snapshots(bytes_body=True)
+
+    def test_create_snapshot_metadata_with_str_body(self):
+        self._test_create_snapshot_metadata()
+
+    def test_create_snapshot_metadata_with_bytes_body(self):
+        self._test_create_snapshot_metadata(bytes_body=True)
+
+    def test_update_snapshot_with_str_body(self):
+        self._test_update_snapshot()
+
+    def test_update_snapshot_with_bytes_body(self):
+        self._test_update_snapshot(bytes_body=True)
+
+    def test_show_snapshot_metadata_with_str_body(self):
+        self._test_show_snapshot_metadata()
+
+    def test_show_snapshot_metadata_with_bytes_body(self):
+        self._test_show_snapshot_metadata(bytes_body=True)
+
+    def test_update_snapshot_metadata_with_str_body(self):
+        self._test_update_snapshot_metadata()
+
+    def test_update_snapshot_metadata_with_bytes_body(self):
+        self._test_update_snapshot_metadata(bytes_body=True)
+
+    def test_force_delete_snapshot(self):
+        self.check_service_client_function(
+            self.client.force_delete_snapshot,
+            'tempest.lib.common.rest_client.RestClient.post',
+            {},
+            snapshot_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            status=202)
+
+    def test_delete_snapshot(self):
+        self.check_service_client_function(
+            self.client.delete_snapshot,
+            'tempest.lib.common.rest_client.RestClient.delete',
+            {},
+            snapshot_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+            status=202)