Service client modules in various services __init__

Import the remaning service client classes in the __init__ of the
corresponding services module, and define __all__, so that service client
classes may be accessed by importing the service module only.

Change-Id: Id7428ac7bc9aeffed21a5e99c3f520f1568f2018
Partially-implements: bp client-manager-refactor
changes/65/331065/6
Andrea Frittoli (andreaf) 7 years ago committed by Andrea Frittoli
parent 9a22543b4b
commit c33486f1ea

@ -23,21 +23,13 @@ from tempest import exceptions
from tempest.lib.services import compute
from tempest.lib.services import network
from tempest import manager
from tempest.services.baremetal.v1.json.baremetal_client import \
BaremetalClient
from tempest.services.data_processing.v1_1.data_processing_client import \
DataProcessingClient
from tempest.services.database.json.flavors_client import \
DatabaseFlavorsClient
from tempest.services.database.json.limits_client import \
DatabaseLimitsClient
from tempest.services.database.json.versions_client import \
DatabaseVersionsClient
from tempest.services import baremetal
from tempest.services import data_processing
from tempest.services import database
from tempest.services import identity
from tempest.services import image
from tempest.services import object_storage
from tempest.services.orchestration.json.orchestration_client import \
OrchestrationClient
from tempest.services import orchestration
from tempest.services import volume
CONF = config.CONF
@ -79,13 +71,13 @@ class Manager(manager.Manager):
self._set_image_clients()
self._set_network_clients()
self.baremetal_client = BaremetalClient(
self.baremetal_client = baremetal.BaremetalClient(
self.auth_provider,
CONF.baremetal.catalog_type,
CONF.identity.region,
endpoint_type=CONF.baremetal.endpoint_type,
**self.default_params_with_timeout_values)
self.orchestration_client = OrchestrationClient(
self.orchestration_client = orchestration.OrchestrationClient(
self.auth_provider,
CONF.orchestration.catalog_type,
CONF.orchestration.region or CONF.identity.region,
@ -93,7 +85,7 @@ class Manager(manager.Manager):
build_interval=CONF.orchestration.build_interval,
build_timeout=CONF.orchestration.build_timeout,
**self.default_params)
self.data_processing_client = DataProcessingClient(
self.data_processing_client = data_processing.DataProcessingClient(
self.auth_provider,
CONF.data_processing.catalog_type,
CONF.identity.region,
@ -252,17 +244,17 @@ class Manager(manager.Manager):
self.auth_provider, **params_volume)
def _set_database_clients(self):
self.database_flavors_client = DatabaseFlavorsClient(
self.database_flavors_client = database.DatabaseFlavorsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
self.database_limits_client = DatabaseLimitsClient(
self.database_limits_client = database.DatabaseLimitsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
self.database_versions_client = DatabaseVersionsClient(
self.database_versions_client = database.DatabaseVersionsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,

@ -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.services.baremetal.v1.json.baremetal_client import \
BaremetalClient
__all__ = ['BaremetalClient']

@ -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.services.data_processing.v1_1.data_processing_client import \
DataProcessingClient
__all__ = ['DataProcessingClient']

@ -0,0 +1,23 @@
# 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.database.json.flavors_client import \
DatabaseFlavorsClient
from tempest.services.database.json.limits_client import \
DatabaseLimitsClient
from tempest.services.database.json.versions_client import \
DatabaseVersionsClient
__all__ = ['DatabaseFlavorsClient', 'DatabaseLimitsClient',
'DatabaseVersionsClient']

@ -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.services.orchestration.json.orchestration_client import \
OrchestrationClient
__all__ = ['OrchestrationClient']
Loading…
Cancel
Save