Service client modules in volume __init__
Import the volume service client classes in the __init__ of the volume module, and define __all__, so that service client classes may be accessed by importing the volume module only. Partially-implements: bp client-manager-refactor Change-Id: I7f0e070f325a9b77979d6516d18bf319bfdfa7b8
This commit is contained in:
parent
c34e518b6f
commit
14ecae147a
@ -50,43 +50,7 @@ from tempest.services.object_storage.container_client import ContainerClient
|
|||||||
from tempest.services.object_storage.object_client import ObjectClient
|
from tempest.services.object_storage.object_client import ObjectClient
|
||||||
from tempest.services.orchestration.json.orchestration_client import \
|
from tempest.services.orchestration.json.orchestration_client import \
|
||||||
OrchestrationClient
|
OrchestrationClient
|
||||||
from tempest.services.volume.v1.json.admin.hosts_client import \
|
from tempest.services import volume
|
||||||
HostsClient as VolumeHostsClient
|
|
||||||
from tempest.services.volume.v1.json.admin.quotas_client import \
|
|
||||||
QuotasClient as VolumeQuotasClient
|
|
||||||
from tempest.services.volume.v1.json.admin.services_client import \
|
|
||||||
ServicesClient as VolumeServicesClient
|
|
||||||
from tempest.services.volume.v1.json.admin.types_client import \
|
|
||||||
TypesClient as VolumeTypesClient
|
|
||||||
from tempest.services.volume.v1.json.availability_zone_client import \
|
|
||||||
AvailabilityZoneClient as VolumeAvailabilityZoneClient
|
|
||||||
from tempest.services.volume.v1.json.backups_client import BackupsClient
|
|
||||||
from tempest.services.volume.v1.json.extensions_client import \
|
|
||||||
ExtensionsClient as VolumeExtensionsClient
|
|
||||||
from tempest.services.volume.v1.json.qos_client import QosSpecsClient
|
|
||||||
from tempest.services.volume.v1.json.snapshots_client import SnapshotsClient
|
|
||||||
from tempest.services.volume.v1.json.volumes_client import VolumesClient
|
|
||||||
from tempest.services.volume.v2.json.admin.hosts_client import \
|
|
||||||
HostsClient as VolumeHostsV2Client
|
|
||||||
from tempest.services.volume.v2.json.admin.quotas_client import \
|
|
||||||
QuotasClient as VolumeQuotasV2Client
|
|
||||||
from tempest.services.volume.v2.json.admin.services_client import \
|
|
||||||
ServicesClient as VolumeServicesV2Client
|
|
||||||
from tempest.services.volume.v2.json.admin.types_client import \
|
|
||||||
TypesClient as VolumeTypesV2Client
|
|
||||||
from tempest.services.volume.v2.json.availability_zone_client import \
|
|
||||||
AvailabilityZoneClient as VolumeAvailabilityZoneV2Client
|
|
||||||
from tempest.services.volume.v2.json.backups_client import \
|
|
||||||
BackupsClient as BackupsV2Client
|
|
||||||
from tempest.services.volume.v2.json.extensions_client import \
|
|
||||||
ExtensionsClient as VolumeExtensionsV2Client
|
|
||||||
from tempest.services.volume.v2.json.qos_client import \
|
|
||||||
QosSpecsClient as QosSpecsV2Client
|
|
||||||
from tempest.services.volume.v2.json.snapshots_client import \
|
|
||||||
SnapshotsClient as SnapshotsV2Client
|
|
||||||
from tempest.services.volume.v2.json.volumes_client import \
|
|
||||||
VolumesClient as VolumesV2Client
|
|
||||||
from tempest.services.volume.v3.json.messages_client import MessagesClient
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@ -406,49 +370,50 @@ class Manager(manager.Manager):
|
|||||||
}
|
}
|
||||||
params.update(self.default_params)
|
params.update(self.default_params)
|
||||||
|
|
||||||
self.volume_qos_client = QosSpecsClient(self.auth_provider,
|
self.volume_qos_client = volume.v1.QosSpecsClient(self.auth_provider,
|
||||||
**params)
|
**params)
|
||||||
self.volume_qos_v2_client = QosSpecsV2Client(
|
self.volume_qos_v2_client = volume.v2.QosSpecsClient(
|
||||||
self.auth_provider, **params)
|
self.auth_provider, **params)
|
||||||
self.volume_services_client = VolumeServicesClient(
|
self.volume_services_client = volume.v1.ServicesClient(
|
||||||
self.auth_provider, **params)
|
self.auth_provider, **params)
|
||||||
self.volume_services_v2_client = VolumeServicesV2Client(
|
self.volume_services_v2_client = volume.v2.ServicesClient(
|
||||||
self.auth_provider, **params)
|
self.auth_provider, **params)
|
||||||
self.backups_client = BackupsClient(self.auth_provider, **params)
|
self.backups_client = volume.v1.BackupsClient(self.auth_provider,
|
||||||
self.backups_v2_client = BackupsV2Client(self.auth_provider,
|
**params)
|
||||||
**params)
|
self.backups_v2_client = volume.v2.BackupsClient(self.auth_provider,
|
||||||
self.snapshots_client = SnapshotsClient(self.auth_provider,
|
**params)
|
||||||
**params)
|
self.snapshots_client = volume.v1.SnapshotsClient(self.auth_provider,
|
||||||
self.snapshots_v2_client = SnapshotsV2Client(self.auth_provider,
|
**params)
|
||||||
**params)
|
self.snapshots_v2_client = volume.v2.SnapshotsClient(
|
||||||
self.volumes_client = VolumesClient(
|
self.auth_provider, **params)
|
||||||
|
self.volumes_client = volume.v1.VolumesClient(
|
||||||
self.auth_provider, default_volume_size=CONF.volume.volume_size,
|
self.auth_provider, default_volume_size=CONF.volume.volume_size,
|
||||||
**params)
|
**params)
|
||||||
self.volumes_v2_client = VolumesV2Client(
|
self.volumes_v2_client = volume.v2.VolumesClient(
|
||||||
self.auth_provider, default_volume_size=CONF.volume.volume_size,
|
self.auth_provider, default_volume_size=CONF.volume.volume_size,
|
||||||
**params)
|
**params)
|
||||||
self.volume_messages_client = MessagesClient(self.auth_provider,
|
self.volume_messages_client = volume.v3.MessagesClient(
|
||||||
**params)
|
|
||||||
self.volume_types_client = VolumeTypesClient(self.auth_provider,
|
|
||||||
**params)
|
|
||||||
self.volume_types_v2_client = VolumeTypesV2Client(
|
|
||||||
self.auth_provider, **params)
|
self.auth_provider, **params)
|
||||||
self.volume_hosts_client = VolumeHostsClient(self.auth_provider,
|
self.volume_types_client = volume.v1.TypesClient(self.auth_provider,
|
||||||
**params)
|
**params)
|
||||||
self.volume_hosts_v2_client = VolumeHostsV2Client(
|
self.volume_types_v2_client = volume.v2.TypesClient(self.auth_provider,
|
||||||
self.auth_provider, **params)
|
|
||||||
self.volume_quotas_client = VolumeQuotasClient(self.auth_provider,
|
|
||||||
**params)
|
|
||||||
self.volume_quotas_v2_client = VolumeQuotasV2Client(self.auth_provider,
|
|
||||||
**params)
|
**params)
|
||||||
self.volumes_extension_client = VolumeExtensionsClient(
|
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.auth_provider, **params)
|
||||||
self.volumes_v2_extension_client = VolumeExtensionsV2Client(
|
self.volumes_extension_client = volume.v1.ExtensionsClient(
|
||||||
|
self.auth_provider, **params)
|
||||||
|
self.volumes_v2_extension_client = volume.v2.ExtensionsClient(
|
||||||
self.auth_provider, **params)
|
self.auth_provider, **params)
|
||||||
self.volume_availability_zone_client = \
|
self.volume_availability_zone_client = \
|
||||||
VolumeAvailabilityZoneClient(self.auth_provider, **params)
|
volume.v1.AvailabilityZoneClient(self.auth_provider, **params)
|
||||||
self.volume_v2_availability_zone_client = \
|
self.volume_v2_availability_zone_client = \
|
||||||
VolumeAvailabilityZoneV2Client(self.auth_provider, **params)
|
volume.v2.AvailabilityZoneClient(self.auth_provider, **params)
|
||||||
|
|
||||||
def _set_object_storage_clients(self):
|
def _set_object_storage_clients(self):
|
||||||
params = {
|
params = {
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
# 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.services.volume import v1
|
||||||
|
from tempest.services.volume import v2
|
||||||
|
from tempest.services.volume import v3
|
||||||
|
|
||||||
|
__all__ = ['v1', 'v2', 'v3']
|
@ -0,0 +1,30 @@
|
|||||||
|
# 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.services.volume.v1.json.admin.hosts_client import HostsClient
|
||||||
|
from tempest.services.volume.v1.json.admin.quotas_client import QuotasClient
|
||||||
|
from tempest.services.volume.v1.json.admin.services_client import \
|
||||||
|
ServicesClient
|
||||||
|
from tempest.services.volume.v1.json.admin.types_client import TypesClient
|
||||||
|
from tempest.services.volume.v1.json.availability_zone_client import \
|
||||||
|
AvailabilityZoneClient
|
||||||
|
from tempest.services.volume.v1.json.backups_client import BackupsClient
|
||||||
|
from tempest.services.volume.v1.json.extensions_client import ExtensionsClient
|
||||||
|
from tempest.services.volume.v1.json.qos_client import QosSpecsClient
|
||||||
|
from tempest.services.volume.v1.json.snapshots_client import SnapshotsClient
|
||||||
|
from tempest.services.volume.v1.json.volumes_client import VolumesClient
|
||||||
|
|
||||||
|
__all__ = ['HostsClient', 'QuotasClient', 'ServicesClient', 'TypesClient',
|
||||||
|
'AvailabilityZoneClient', 'BackupsClient', 'ExtensionsClient',
|
||||||
|
'QosSpecsClient', 'SnapshotsClient', 'VolumesClient']
|
@ -0,0 +1,30 @@
|
|||||||
|
# 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.services.volume.v2.json.admin.hosts_client import HostsClient
|
||||||
|
from tempest.services.volume.v2.json.admin.quotas_client import QuotasClient
|
||||||
|
from tempest.services.volume.v2.json.admin.services_client import \
|
||||||
|
ServicesClient
|
||||||
|
from tempest.services.volume.v2.json.admin.types_client import TypesClient
|
||||||
|
from tempest.services.volume.v2.json.availability_zone_client import \
|
||||||
|
AvailabilityZoneClient
|
||||||
|
from tempest.services.volume.v2.json.backups_client import BackupsClient
|
||||||
|
from tempest.services.volume.v2.json.extensions_client import ExtensionsClient
|
||||||
|
from tempest.services.volume.v2.json.qos_client import QosSpecsClient
|
||||||
|
from tempest.services.volume.v2.json.snapshots_client import SnapshotsClient
|
||||||
|
from tempest.services.volume.v2.json.volumes_client import VolumesClient
|
||||||
|
|
||||||
|
__all__ = ['HostsClient', 'QuotasClient', 'ServicesClient', 'TypesClient',
|
||||||
|
'AvailabilityZoneClient', 'BackupsClient', 'ExtensionsClient',
|
||||||
|
'QosSpecsClient', 'SnapshotsClient', 'VolumesClient']
|
@ -0,0 +1,17 @@
|
|||||||
|
# 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.services.volume.v3.json.messages_client import MessagesClient
|
||||||
|
|
||||||
|
__all__ = ['MessagesClient']
|
Loading…
Reference in New Issue
Block a user