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
diff --git a/tempest/clients.py b/tempest/clients.py
index 2398d3e..b7bc4fa 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -23,21 +23,13 @@
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 @@
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 @@
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 @@
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,
diff --git a/tempest/services/baremetal/__init__.py b/tempest/services/baremetal/__init__.py
index e69de29..390f40a 100644
--- a/tempest/services/baremetal/__init__.py
+++ b/tempest/services/baremetal/__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.services.baremetal.v1.json.baremetal_client import \
+ BaremetalClient
+
+__all__ = ['BaremetalClient']
diff --git a/tempest/services/data_processing/__init__.py b/tempest/services/data_processing/__init__.py
index e69de29..c49bc5c 100644
--- a/tempest/services/data_processing/__init__.py
+++ b/tempest/services/data_processing/__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.services.data_processing.v1_1.data_processing_client import \
+ DataProcessingClient
+
+__all__ = ['DataProcessingClient']
diff --git a/tempest/services/database/__init__.py b/tempest/services/database/__init__.py
index e69de29..9a742d8 100644
--- a/tempest/services/database/__init__.py
+++ b/tempest/services/database/__init__.py
@@ -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']
diff --git a/tempest/services/orchestration/__init__.py b/tempest/services/orchestration/__init__.py
index e69de29..5a1ffcc 100644
--- a/tempest/services/orchestration/__init__.py
+++ b/tempest/services/orchestration/__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.services.orchestration.json.orchestration_client import \
+ OrchestrationClient
+
+__all__ = ['OrchestrationClient']