Remove inheritance from baremetal client
baremetal client has complicated inheritance because Tempest tested
XML tests and the base part of the client was necessary for both XML
and JSON. However, XML tests have been already removed from Tempest
and the inheritance is unnecessary and the code is complicated.
The this patch removes the inheritance and renames the file name of
the client for fittig to the other clients' names.
Change-Id: I0a798fb146edd53b7a61bf30689b93cbd90ddac0
diff --git a/tempest/clients.py b/tempest/clients.py
index 5da0c8c..4842d30 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -20,7 +20,8 @@
from tempest import config
from tempest import manager
from tempest.openstack.common import log as logging
-from tempest.services.baremetal.v1.client_json import BaremetalClientJSON
+from tempest.services.baremetal.v1.json.baremetal_client import \
+ BaremetalClientJSON
from tempest.services import botoclients
from tempest.services.compute.json.agents_client import \
AgentsClientJSON
diff --git a/tempest/services/baremetal/v1/client_json.py b/tempest/services/baremetal/v1/client_json.py
deleted file mode 100644
index 8421fe9..0000000
--- a/tempest/services/baremetal/v1/client_json.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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 import base_v1
-
-
-class BaremetalClientJSON(base_v1.BaremetalClientV1):
- """Tempest REST client for Ironic JSON API v1."""
diff --git a/tempest/services/baremetal/v1/json/__init__.py b/tempest/services/baremetal/v1/json/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/services/baremetal/v1/json/__init__.py
diff --git a/tempest/services/baremetal/v1/base_v1.py b/tempest/services/baremetal/v1/json/baremetal_client.py
similarity index 98%
rename from tempest/services/baremetal/v1/base_v1.py
rename to tempest/services/baremetal/v1/json/baremetal_client.py
index bc51c1b..c20e793 100644
--- a/tempest/services/baremetal/v1/base_v1.py
+++ b/tempest/services/baremetal/v1/json/baremetal_client.py
@@ -13,12 +13,12 @@
from tempest.services.baremetal import base
-class BaremetalClientV1(base.BaremetalClient):
+class BaremetalClientJSON(base.BaremetalClient):
"""
Base Tempest REST client for Ironic API v1.
"""
def __init__(self, auth_provider):
- super(BaremetalClientV1, self).__init__(auth_provider)
+ super(BaremetalClientJSON, self).__init__(auth_provider)
self.version = '1'
self.uri_prefix = 'v%s' % self.version