Merge "Use server_client clearly for removing server_group"
diff --git a/tempest/clients.py b/tempest/clients.py
index 63bae6c..7679b4b 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import copy
+
from tempest import auth
from tempest.common import negative_rest_client
from tempest import config
@@ -151,7 +153,14 @@
self._set_volume_clients()
self.baremetal_client = BaremetalClientJSON(self.auth_provider)
- self.network_client = NetworkClientJSON(self.auth_provider)
+ self.network_client = NetworkClientJSON(
+ self.auth_provider,
+ CONF.network.catalog_type,
+ CONF.network.region or CONF.identity.region,
+ endpoint_type=CONF.network.endpoint_type,
+ build_interval=CONF.network.build_interval,
+ build_timeout=CONF.network.build_timeout,
+ **self.default_params)
self.database_flavors_client = DatabaseFlavorsClientJSON(
self.auth_provider)
self.database_versions_client = DatabaseVersionsClientJSON(
@@ -191,36 +200,63 @@
self.auth_provider)
def _set_compute_clients(self):
- self.agents_client = AgentsClientJSON(self.auth_provider)
- self.networks_client = NetworksClientJSON(self.auth_provider)
- self.migrations_client = MigrationsClientJSON(self.auth_provider)
+ params = {
+ 'service': CONF.compute.catalog_type,
+ 'region': CONF.compute.region or CONF.identity.region,
+ 'endpoint_type': CONF.compute.endpoint_type,
+ 'build_interval': CONF.compute.build_interval,
+ 'build_timeout': CONF.compute.build_timeout
+ }
+ params.update(self.default_params)
+
+ self.agents_client = AgentsClientJSON(self.auth_provider, **params)
+ self.networks_client = NetworksClientJSON(self.auth_provider, **params)
+ self.migrations_client = MigrationsClientJSON(self.auth_provider,
+ **params)
self.security_group_default_rules_client = (
- SecurityGroupDefaultRulesClientJSON(self.auth_provider))
- self.certificates_client = CertificatesClientJSON(self.auth_provider)
- self.servers_client = ServersClientJSON(self.auth_provider)
- self.limits_client = LimitsClientJSON(self.auth_provider)
- self.images_client = ImagesClientJSON(self.auth_provider)
- self.keypairs_client = KeyPairsClientJSON(self.auth_provider)
- self.quotas_client = QuotasClientJSON(self.auth_provider)
- self.quota_classes_client = QuotaClassesClientJSON(self.auth_provider)
- self.flavors_client = FlavorsClientJSON(self.auth_provider)
- self.extensions_client = ExtensionsClientJSON(self.auth_provider)
- self.volumes_extensions_client = VolumesExtensionsClientJSON(
- self.auth_provider)
- self.floating_ips_client = FloatingIPsClientJSON(self.auth_provider)
+ SecurityGroupDefaultRulesClientJSON(self.auth_provider, **params))
+ self.certificates_client = CertificatesClientJSON(self.auth_provider,
+ **params)
+ self.servers_client = ServersClientJSON(self.auth_provider, **params)
+ self.limits_client = LimitsClientJSON(self.auth_provider, **params)
+ self.images_client = ImagesClientJSON(self.auth_provider, **params)
+ self.keypairs_client = KeyPairsClientJSON(self.auth_provider, **params)
+ self.quotas_client = QuotasClientJSON(self.auth_provider, **params)
+ self.quota_classes_client = QuotaClassesClientJSON(self.auth_provider,
+ **params)
+ self.flavors_client = FlavorsClientJSON(self.auth_provider, **params)
+ self.extensions_client = ExtensionsClientJSON(self.auth_provider,
+ **params)
+ self.floating_ips_client = FloatingIPsClientJSON(self.auth_provider,
+ **params)
self.security_groups_client = SecurityGroupsClientJSON(
- self.auth_provider)
- self.interfaces_client = InterfacesClientJSON(self.auth_provider)
- self.fixed_ips_client = FixedIPsClientJSON(self.auth_provider)
+ self.auth_provider, **params)
+ self.interfaces_client = InterfacesClientJSON(self.auth_provider,
+ **params)
+ self.fixed_ips_client = FixedIPsClientJSON(self.auth_provider,
+ **params)
self.availability_zone_client = AvailabilityZoneClientJSON(
- self.auth_provider)
- self.aggregates_client = AggregatesClientJSON(self.auth_provider)
- self.services_client = ServicesClientJSON(self.auth_provider)
- self.tenant_usages_client = TenantUsagesClientJSON(self.auth_provider)
- self.hosts_client = HostsClientJSON(self.auth_provider)
- self.hypervisor_client = HypervisorClientJSON(self.auth_provider)
+ self.auth_provider, **params)
+ self.aggregates_client = AggregatesClientJSON(self.auth_provider,
+ **params)
+ self.services_client = ServicesClientJSON(self.auth_provider, **params)
+ self.tenant_usages_client = TenantUsagesClientJSON(self.auth_provider,
+ **params)
+ self.hosts_client = HostsClientJSON(self.auth_provider, **params)
+ self.hypervisor_client = HypervisorClientJSON(self.auth_provider,
+ **params)
self.instance_usages_audit_log_client = \
- InstanceUsagesAuditLogClientJSON(self.auth_provider)
+ InstanceUsagesAuditLogClientJSON(self.auth_provider, **params)
+
+ # NOTE: The following client needs special timeout values because
+ # the API is a proxy for the other component.
+ params_volume = copy.deepcopy(params)
+ params_volume.update({
+ 'build_interval': CONF.volume.build_interval,
+ 'build_timeout': CONF.volume.build_timeout
+ })
+ self.volumes_extensions_client = VolumesExtensionsClientJSON(
+ self.auth_provider, **params_volume)
def _set_identity_clients(self):
self.identity_client = IdentityClientJSON(self.auth_provider)
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 6e1ca7a..e5ffb1b 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -144,21 +144,46 @@
servers = None
def __init__(self, user, pw, tenant):
+ default_params = {
+ 'disable_ssl_certificate_validation':
+ CONF.identity.disable_ssl_certificate_validation,
+ 'ca_certs': CONF.identity.ca_certificates_file,
+ 'trace_requests': CONF.debug.trace_requests
+ }
+ compute_params = {
+ 'service': CONF.compute.catalog_type,
+ 'region': CONF.compute.region or CONF.identity.region,
+ 'endpoint_type': CONF.compute.endpoint_type,
+ 'build_interval': CONF.compute.build_interval,
+ 'build_timeout': CONF.compute.build_timeout
+ }
+ compute_params.update(default_params)
+
_creds = tempest.auth.KeystoneV2Credentials(
username=user,
password=pw,
tenant_name=tenant)
_auth = tempest.auth.KeystoneV2AuthProvider(_creds)
self.identity = identity_client.IdentityClientJSON(_auth)
- self.servers = servers_client.ServersClientJSON(_auth)
+ self.servers = servers_client.ServersClientJSON(_auth,
+ **compute_params)
+ self.flavors = flavors_client.FlavorsClientJSON(_auth,
+ **compute_params)
+ self.secgroups = security_groups_client.SecurityGroupsClientJSON(
+ _auth, **compute_params)
self.objects = object_client.ObjectClient(_auth)
self.containers = container_client.ContainerClient(_auth)
self.images = image_client.ImageClientV2JSON(_auth)
- self.flavors = flavors_client.FlavorsClientJSON(_auth)
self.telemetry = telemetry_client.TelemetryClientJSON(_auth)
- self.secgroups = security_groups_client.SecurityGroupsClientJSON(_auth)
self.volumes = volumes_client.VolumesClientJSON(_auth)
- self.networks = network_client.NetworkClientJSON(_auth)
+ self.networks = network_client.NetworkClientJSON(
+ _auth,
+ CONF.network.catalog_type,
+ CONF.network.region or CONF.identity.region,
+ endpoint_type=CONF.network.endpoint_type,
+ build_interval=CONF.network.build_interval,
+ build_timeout=CONF.network.build_timeout,
+ **default_params)
def load_resources(fname):
diff --git a/tempest/services/compute/json/agents_client.py b/tempest/services/compute/json/agents_client.py
index 95d7880..e17495f 100644
--- a/tempest/services/compute/json/agents_client.py
+++ b/tempest/services/compute/json/agents_client.py
@@ -18,10 +18,9 @@
from tempest.api_schema.response.compute import agents as common_schema
from tempest.api_schema.response.compute.v2 import agents as schema
from tempest.common import service_client
-from tempest.services.compute.json import base
-class AgentsClientJSON(base.ComputeClient):
+class AgentsClientJSON(service_client.ServiceClient):
"""
Tests Agents API
"""
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index 47dd401..94ea713 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -19,10 +19,9 @@
from tempest.api_schema.response.compute.v2 import aggregates as v2_schema
from tempest.common import service_client
from tempest import exceptions
-from tempest.services.compute.json import base
-class AggregatesClientJSON(base.ComputeClient):
+class AggregatesClientJSON(service_client.ServiceClient):
def list_aggregates(self):
"""Get aggregate list."""
diff --git a/tempest/services/compute/json/availability_zone_client.py b/tempest/services/compute/json/availability_zone_client.py
index b8bda68..e37c9d9 100644
--- a/tempest/services/compute/json/availability_zone_client.py
+++ b/tempest/services/compute/json/availability_zone_client.py
@@ -16,10 +16,10 @@
import json
from tempest.api_schema.response.compute.v2 import availability_zone as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class AvailabilityZoneClientJSON(base.ComputeClient):
+class AvailabilityZoneClientJSON(service_client.ServiceClient):
def get_availability_zone_list(self):
resp, body = self.get('os-availability-zone')
diff --git a/tempest/services/compute/json/base.py b/tempest/services/compute/json/base.py
deleted file mode 100644
index ae44ffb..0000000
--- a/tempest/services/compute/json/base.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2014 NEC Corporation. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-from tempest.common import service_client
-from tempest import config
-
-CONF = config.CONF
-
-
-class ComputeClient(service_client.ServiceClient):
- """
- Base compute client class
- """
-
- def __init__(self, auth_provider,
- build_interval=None, build_timeout=None):
- if build_interval is None:
- build_interval = CONF.compute.build_interval
- if build_timeout is None:
- build_timeout = CONF.compute.build_timeout
-
- super(ComputeClient, self).__init__(
- auth_provider,
- CONF.compute.catalog_type,
- CONF.compute.region or CONF.identity.region,
- endpoint_type=CONF.compute.endpoint_type,
- build_interval=build_interval,
- build_timeout=build_timeout)
diff --git a/tempest/services/compute/json/certificates_client.py b/tempest/services/compute/json/certificates_client.py
index 123f0b9..b705c37 100644
--- a/tempest/services/compute/json/certificates_client.py
+++ b/tempest/services/compute/json/certificates_client.py
@@ -17,10 +17,10 @@
from tempest.api_schema.response.compute import certificates as schema
from tempest.api_schema.response.compute.v2 import certificates as v2schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class CertificatesClientJSON(base.ComputeClient):
+class CertificatesClientJSON(service_client.ServiceClient):
def get_certificate(self, id):
url = "os-certificates/%s" % (id)
diff --git a/tempest/services/compute/json/extensions_client.py b/tempest/services/compute/json/extensions_client.py
index 69ad7c0..d3148b4 100644
--- a/tempest/services/compute/json/extensions_client.py
+++ b/tempest/services/compute/json/extensions_client.py
@@ -16,10 +16,10 @@
import json
from tempest.api_schema.response.compute.v2 import extensions as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class ExtensionsClientJSON(base.ComputeClient):
+class ExtensionsClientJSON(service_client.ServiceClient):
def list_extensions(self):
url = 'extensions'
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index 8fd24b6..5797c16 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -16,10 +16,10 @@
import json
from tempest.api_schema.response.compute.v2 import fixed_ips as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class FixedIPsClientJSON(base.ComputeClient):
+class FixedIPsClientJSON(service_client.ServiceClient):
def get_fixed_ip_details(self, fixed_ip):
url = "os-fixed-ips/%s" % (fixed_ip)
diff --git a/tempest/services/compute/json/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index 6276d3c..b42ea40 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -21,10 +21,10 @@
from tempest.api_schema.response.compute import flavors_extra_specs \
as schema_extra_specs
from tempest.api_schema.response.compute.v2 import flavors as v2schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class FlavorsClientJSON(base.ComputeClient):
+class FlavorsClientJSON(service_client.ServiceClient):
def list_flavors(self, params=None):
url = 'flavors'
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 788b4d2..9c586e3 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -17,11 +17,11 @@
import urllib
from tempest.api_schema.response.compute.v2 import floating_ips as schema
+from tempest.common import service_client
from tempest import exceptions
-from tempest.services.compute.json import base
-class FloatingIPsClientJSON(base.ComputeClient):
+class FloatingIPsClientJSON(service_client.ServiceClient):
def list_floating_ips(self, params=None):
"""Returns a list of all floating IPs filtered by any parameters."""
diff --git a/tempest/services/compute/json/hosts_client.py b/tempest/services/compute/json/hosts_client.py
index f4e1f12..b06378b 100644
--- a/tempest/services/compute/json/hosts_client.py
+++ b/tempest/services/compute/json/hosts_client.py
@@ -18,10 +18,9 @@
from tempest.api_schema.response.compute import hosts as schema
from tempest.api_schema.response.compute.v2 import hosts as v2_schema
from tempest.common import service_client
-from tempest.services.compute.json import base
-class HostsClientJSON(base.ComputeClient):
+class HostsClientJSON(service_client.ServiceClient):
def list_hosts(self, params=None):
"""Lists all hosts."""
diff --git a/tempest/services/compute/json/hypervisor_client.py b/tempest/services/compute/json/hypervisor_client.py
index 37be874..380b5ce 100644
--- a/tempest/services/compute/json/hypervisor_client.py
+++ b/tempest/services/compute/json/hypervisor_client.py
@@ -18,10 +18,9 @@
from tempest.api_schema.response.compute import hypervisors as common_schema
from tempest.api_schema.response.compute.v2 import hypervisors as v2schema
from tempest.common import service_client
-from tempest.services.compute.json import base
-class HypervisorClientJSON(base.ComputeClient):
+class HypervisorClientJSON(service_client.ServiceClient):
def get_hypervisor_list(self):
"""List hypervisors information."""
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index 5b0ebe1..a5755da 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -20,10 +20,9 @@
from tempest.common import service_client
from tempest.common import waiters
from tempest import exceptions
-from tempest.services.compute.json import base
-class ImagesClientJSON(base.ComputeClient):
+class ImagesClientJSON(service_client.ServiceClient):
def create_image(self, server_id, name, meta=None):
"""Creates an image of the original server."""
diff --git a/tempest/services/compute/json/instance_usage_audit_log_client.py b/tempest/services/compute/json/instance_usage_audit_log_client.py
index f79c3de..80d7334 100644
--- a/tempest/services/compute/json/instance_usage_audit_log_client.py
+++ b/tempest/services/compute/json/instance_usage_audit_log_client.py
@@ -17,10 +17,10 @@
from tempest.api_schema.response.compute.v2 import instance_usage_audit_logs \
as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class InstanceUsagesAuditLogClientJSON(base.ComputeClient):
+class InstanceUsagesAuditLogClientJSON(service_client.ServiceClient):
def list_instance_usage_audit_logs(self):
url = 'os-instance_usage_audit_log'
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index f1e2660..595b23c 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -19,11 +19,11 @@
from tempest.api_schema.response.compute import interfaces as common_schema
from tempest.api_schema.response.compute import servers as servers_schema
from tempest.api_schema.response.compute.v2 import interfaces as schema
+from tempest.common import service_client
from tempest import exceptions
-from tempest.services.compute.json import base
-class InterfacesClientJSON(base.ComputeClient):
+class InterfacesClientJSON(service_client.ServiceClient):
def list_interfaces(self, server):
resp, body = self.get('servers/%s/os-interface' % server)
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index c4406f5..69dd9ae 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -17,10 +17,10 @@
from tempest.api_schema.response.compute import keypairs as common_schema
from tempest.api_schema.response.compute.v2 import keypairs as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class KeyPairsClientJSON(base.ComputeClient):
+class KeyPairsClientJSON(service_client.ServiceClient):
def list_keypairs(self):
resp, body = self.get("os-keypairs")
diff --git a/tempest/services/compute/json/limits_client.py b/tempest/services/compute/json/limits_client.py
index 66a0649..3a725ae 100644
--- a/tempest/services/compute/json/limits_client.py
+++ b/tempest/services/compute/json/limits_client.py
@@ -16,10 +16,10 @@
import json
from tempest.api_schema.response.compute.v2 import limits as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class LimitsClientJSON(base.ComputeClient):
+class LimitsClientJSON(service_client.ServiceClient):
def get_absolute_limits(self):
resp, body = self.get("limits")
diff --git a/tempest/services/compute/json/migrations_client.py b/tempest/services/compute/json/migrations_client.py
index de183f1..b41abc8 100644
--- a/tempest/services/compute/json/migrations_client.py
+++ b/tempest/services/compute/json/migrations_client.py
@@ -16,10 +16,10 @@
import urllib
from tempest.api_schema.response.compute import migrations as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class MigrationsClientJSON(base.ComputeClient):
+class MigrationsClientJSON(service_client.ServiceClient):
def list_migrations(self, params=None):
"""Lists all migrations."""
diff --git a/tempest/services/compute/json/networks_client.py b/tempest/services/compute/json/networks_client.py
index 5a2744d..361258a 100644
--- a/tempest/services/compute/json/networks_client.py
+++ b/tempest/services/compute/json/networks_client.py
@@ -15,10 +15,10 @@
import json
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class NetworksClientJSON(base.ComputeClient):
+class NetworksClientJSON(service_client.ServiceClient):
def list_networks(self):
resp, body = self.get("os-networks")
diff --git a/tempest/services/compute/json/quotas_client.py b/tempest/services/compute/json/quotas_client.py
index 0fee57a..f9f02a5 100644
--- a/tempest/services/compute/json/quotas_client.py
+++ b/tempest/services/compute/json/quotas_client.py
@@ -18,10 +18,10 @@
from tempest.api_schema.response.compute.v2\
import quota_classes as classes_schema
from tempest.api_schema.response.compute.v2 import quotas as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class QuotasClientJSON(base.ComputeClient):
+class QuotasClientJSON(service_client.ServiceClient):
def get_quota_set(self, tenant_id, user_id=None):
"""List the quota set for a tenant."""
@@ -115,7 +115,7 @@
return resp, body
-class QuotaClassesClientJSON(base.ComputeClient):
+class QuotaClassesClientJSON(service_client.ServiceClient):
def get_quota_class_set(self, quota_class_id):
"""List the quota class set for a quota class."""
diff --git a/tempest/services/compute/json/security_group_default_rules_client.py b/tempest/services/compute/json/security_group_default_rules_client.py
index efaf329..5d0c16f 100644
--- a/tempest/services/compute/json/security_group_default_rules_client.py
+++ b/tempest/services/compute/json/security_group_default_rules_client.py
@@ -17,10 +17,10 @@
from tempest.api_schema.response.compute.v2 import \
security_group_default_rule as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class SecurityGroupDefaultRulesClientJSON(base.ComputeClient):
+class SecurityGroupDefaultRulesClientJSON(service_client.ServiceClient):
def create_security_default_group_rule(self, ip_protocol, from_port,
to_port, **kwargs):
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index a301a0f..1ac52af 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -17,11 +17,11 @@
import urllib
from tempest.api_schema.response.compute.v2 import security_groups as schema
+from tempest.common import service_client
from tempest import exceptions
-from tempest.services.compute.json import base
-class SecurityGroupsClientJSON(base.ComputeClient):
+class SecurityGroupsClientJSON(service_client.ServiceClient):
def list_security_groups(self, params=None):
"""List all security groups for a user."""
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 400f9a7..cbe1ca8 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -20,15 +20,15 @@
from tempest.api_schema.response.compute import servers as common_schema
from tempest.api_schema.response.compute.v2 import servers as schema
+from tempest.common import service_client
from tempest.common import waiters
from tempest import config
from tempest import exceptions
-from tempest.services.compute.json import base
CONF = config.CONF
-class ServersClientJSON(base.ComputeClient):
+class ServersClientJSON(service_client.ServiceClient):
def create_server(self, name, image_ref, flavor_ref, **kwargs):
"""
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index 52662fa..fc2274d 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -19,10 +19,9 @@
from tempest.api_schema.response.compute import services as schema
from tempest.common import service_client
-from tempest.services.compute.json import base
-class ServicesClientJSON(base.ComputeClient):
+class ServicesClientJSON(service_client.ServiceClient):
def list_services(self, params=None):
url = 'os-services'
diff --git a/tempest/services/compute/json/tenant_usages_client.py b/tempest/services/compute/json/tenant_usages_client.py
index eac23bb..5dc1d5d 100644
--- a/tempest/services/compute/json/tenant_usages_client.py
+++ b/tempest/services/compute/json/tenant_usages_client.py
@@ -17,10 +17,10 @@
import urllib
from tempest.api_schema.response.compute.v2 import tenant_usages as schema
-from tempest.services.compute.json import base
+from tempest.common import service_client
-class TenantUsagesClientJSON(base.ComputeClient):
+class TenantUsagesClientJSON(service_client.ServiceClient):
def list_tenant_usages(self, params=None):
url = 'os-simple-tenant-usage'
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_extensions_client.py
index 69b9bea..61d0b23 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_extensions_client.py
@@ -18,20 +18,11 @@
import urllib
from tempest.api_schema.response.compute.v2 import volumes as schema
-from tempest import config
+from tempest.common import service_client
from tempest import exceptions
-from tempest.services.compute.json import base
-
-CONF = config.CONF
-class VolumesExtensionsClientJSON(base.ComputeClient):
-
- def __init__(self, auth_provider):
- super(VolumesExtensionsClientJSON, self).__init__(
- auth_provider,
- build_interval=CONF.volume.build_interval,
- build_timeout=CONF.volume.build_timeout)
+class VolumesExtensionsClientJSON(service_client.ServiceClient):
def list_volumes(self, params=None):
"""List all the volumes created."""
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index 8602513..c7ee5f7 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -16,11 +16,8 @@
from tempest.common import service_client
from tempest.common.utils import misc
-from tempest import config
from tempest import exceptions
-CONF = config.CONF
-
class NetworkClientJSON(service_client.ServiceClient):
@@ -37,16 +34,8 @@
quotas
"""
- def __init__(self, auth_provider):
- super(NetworkClientJSON, self).__init__(
- auth_provider,
- CONF.network.catalog_type,
- CONF.network.region or CONF.identity.region,
- endpoint_type=CONF.network.endpoint_type,
- build_interval=CONF.network.build_interval,
- build_timeout=CONF.network.build_timeout)
- self.version = '2.0'
- self.uri_prefix = "v%s" % (self.version)
+ version = '2.0'
+ uri_prefix = "v2.0"
def get_uri(self, plural_name):
# get service prefix from resource name