Migrate V1 and V2 qos service to tempest lib

Split and migrate v1 and v2 API qos_client to tempest.lib.

Partially implements blueprint consistent-service-method-names
Change-Id: I14c3db7f1229a030a02f60f686826508afa01f61
diff --git a/releasenotes/notes/add-volume-clients-as-a-library-d05b6bc35e66c6ef.yaml b/releasenotes/notes/add-volume-clients-as-a-library-d05b6bc35e66c6ef.yaml
index 8125ab9..1ef2b0d 100644
--- a/releasenotes/notes/add-volume-clients-as-a-library-d05b6bc35e66c6ef.yaml
+++ b/releasenotes/notes/add-volume-clients-as-a-library-d05b6bc35e66c6ef.yaml
@@ -7,6 +7,8 @@
     any maintenance changes.
 
     * encryption_types_client (v1)
+    * qos_clients (v1)
+    * qos_clients (v2)
     * snapshots_client (v1)
     * snapshots_client (v2)
 
diff --git a/tempest/services/volume/base/base_qos_client.py b/tempest/lib/services/volume/v1/qos_client.py
similarity index 96%
copy from tempest/services/volume/base/base_qos_client.py
copy to tempest/lib/services/volume/v1/qos_client.py
index 0ce76a7..65ae274 100644
--- a/tempest/services/volume/base/base_qos_client.py
+++ b/tempest/lib/services/volume/v1/qos_client.py
@@ -18,8 +18,13 @@
 from tempest.lib import exceptions as lib_exc
 
 
-class BaseQosSpecsClient(rest_client.RestClient):
-    """Client class to send CRUD QoS API requests"""
+class QosSpecsClient(rest_client.RestClient):
+    """Volume V1 QoS client.
+
+       Client class to send CRUD QoS API requests
+    """
+
+    api_version = "v1"
 
     def is_resource_deleted(self, qos_id):
         try:
diff --git a/tempest/services/volume/base/base_qos_client.py b/tempest/lib/services/volume/v2/qos_client.py
similarity index 96%
rename from tempest/services/volume/base/base_qos_client.py
rename to tempest/lib/services/volume/v2/qos_client.py
index 0ce76a7..5fac00f 100644
--- a/tempest/services/volume/base/base_qos_client.py
+++ b/tempest/lib/services/volume/v2/qos_client.py
@@ -18,8 +18,13 @@
 from tempest.lib import exceptions as lib_exc
 
 
-class BaseQosSpecsClient(rest_client.RestClient):
-    """Client class to send CRUD QoS API requests"""
+class QosSpecsClient(rest_client.RestClient):
+    """Volume V2 QoS client.
+
+       Client class to send CRUD QoS API requests
+    """
+
+    api_version = "v2"
 
     def is_resource_deleted(self, qos_id):
         try:
diff --git a/tempest/services/volume/v1/__init__.py b/tempest/services/volume/v1/__init__.py
index 02eaa7f..e386faf 100644
--- a/tempest/services/volume/v1/__init__.py
+++ b/tempest/services/volume/v1/__init__.py
@@ -18,15 +18,16 @@
     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.services.volume.v1.json.backups_client import BackupsClient
-from tempest.services.volume.v1.json.qos_client import QosSpecsClient
 from tempest.services.volume.v1.json.volumes_client import VolumesClient
 
 __all__ = ['AvailabilityZoneClient', 'EncryptionTypesClient',
-           'ExtensionsClient', 'HostsClient', 'QuotasClient', 'ServicesClient',
-           'SnapshotsClient', 'TypesClient', 'BackupsClient', 'QosSpecsClient',
+           'ExtensionsClient', 'HostsClient', 'QuotasClient',
+           'QosSpecsClient', 'ServicesClient',
+           'SnapshotsClient', 'TypesClient', 'BackupsClient',
            'VolumesClient', ]
diff --git a/tempest/services/volume/v1/json/qos_client.py b/tempest/services/volume/v1/json/qos_client.py
deleted file mode 100644
index b2b2195..0000000
--- a/tempest/services/volume/v1/json/qos_client.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.services.volume.base import base_qos_client
-
-
-class QosSpecsClient(base_qos_client.BaseQosSpecsClient):
-    """Volume V1 QoS client."""
diff --git a/tempest/services/volume/v2/__init__.py b/tempest/services/volume/v2/__init__.py
index 58f7af4..b63e6f2 100644
--- a/tempest/services/volume/v2/__init__.py
+++ b/tempest/services/volume/v2/__init__.py
@@ -16,6 +16,7 @@
     AvailabilityZoneClient
 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
@@ -23,10 +24,9 @@
 from tempest.services.volume.v2.json.backups_client import BackupsClient
 from tempest.services.volume.v2.json.encryption_types_client import \
     EncryptionTypesClient
-from tempest.services.volume.v2.json.qos_client import QosSpecsClient
 from tempest.services.volume.v2.json.volumes_client import VolumesClient
 
 __all__ = ['AvailabilityZoneClient', 'ExtensionsClient', 'HostsClient',
-           'QuotasClient', 'ServicesClient', 'SnapshotsClient', 'TypesClient',
-           'BackupsClient', 'EncryptionTypesClient', 'QosSpecsClient',
-           'VolumesClient', ]
+           'QosSpecsClient', 'QuotasClient', 'ServicesClient',
+           'SnapshotsClient', 'TypesClient', 'BackupsClient',
+           'EncryptionTypesClient', 'VolumesClient', ]
diff --git a/tempest/services/volume/v2/json/qos_client.py b/tempest/services/volume/v2/json/qos_client.py
deleted file mode 100644
index 3c0f74f..0000000
--- a/tempest/services/volume/v2/json/qos_client.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.services.volume.base import base_qos_client
-
-
-class QosSpecsClient(base_qos_client.BaseQosSpecsClient):
-    api_version = "v2"