Define v1 images_client as library
Image v1 API's images_client has good interfaces now,
then this patch makes the client as a library.
Partially implements blueprint consistent-service-method-names
Change-Id: I8a0346e5526bfb83e54e0184bbc34ad5195203c3
diff --git a/releasenotes/notes/image-clients-as-library-86d17caa26ce3961.yaml b/releasenotes/notes/image-clients-as-library-86d17caa26ce3961.yaml
index 90a5056..1fa4ddd 100644
--- a/releasenotes/notes/image-clients-as-library-86d17caa26ce3961.yaml
+++ b/releasenotes/notes/image-clients-as-library-86d17caa26ce3961.yaml
@@ -7,6 +7,7 @@
without any maintenance changes.
* image_members_client(v1)
+ * images_client(v1)
* image_members_client(v2)
* images_client(v2)
* namespaces_client(v2)
diff --git a/tempest/clients.py b/tempest/clients.py
index b7bc4fa..ea8dd53 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -21,13 +21,13 @@
from tempest import config
from tempest import exceptions
from tempest.lib.services import compute
+from tempest.lib.services import image
from tempest.lib.services import network
from tempest import manager
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 import orchestration
from tempest.services import volume
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index d8dad69..e083167 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -20,7 +20,7 @@
from tempest import exceptions
from tempest.lib.common.utils import misc as misc_utils
from tempest.lib import exceptions as lib_exc
-from tempest.services.image.v1.json import images_client as images_v1_client
+from tempest.lib.services.image.v1 import images_client as images_v1_client
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/tempest/lib/services/image/__init__.py b/tempest/lib/services/image/__init__.py
index e69de29..4b01663 100644
--- a/tempest/lib/services/image/__init__.py
+++ b/tempest/lib/services/image/__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.lib.services.image import v1
+from tempest.lib.services.image import v2
+
+__all__ = ['v1', 'v2']
diff --git a/tempest/lib/services/image/v1/__init__.py b/tempest/lib/services/image/v1/__init__.py
index e69de29..9bd8262 100644
--- a/tempest/lib/services/image/v1/__init__.py
+++ b/tempest/lib/services/image/v1/__init__.py
@@ -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.lib.services.image.v1.image_members_client import \
+ ImageMembersClient
+from tempest.lib.services.image.v1.images_client import ImagesClient
+
+__all__ = ['ImageMembersClient', 'ImagesClient']
diff --git a/tempest/services/image/v1/json/images_client.py b/tempest/lib/services/image/v1/images_client.py
similarity index 100%
rename from tempest/services/image/v1/json/images_client.py
rename to tempest/lib/services/image/v1/images_client.py
diff --git a/tempest/services/image/__init__.py b/tempest/services/image/__init__.py
deleted file mode 100644
index 7ff0886..0000000
--- a/tempest/services/image/__init__.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.lib.services.image import v2
-from tempest.services.image import v1
-
-__all__ = ['v1', 'v2']
diff --git a/tempest/services/image/v1/__init__.py b/tempest/services/image/v1/__init__.py
deleted file mode 100644
index 67dca39..0000000
--- a/tempest/services/image/v1/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.lib.services.image.v1.image_members_client import \
- ImageMembersClient
-from tempest.services.image.v1.json.images_client import ImagesClient
-
-__all__ = ['ImageMembersClient', 'ImagesClient']
diff --git a/tempest/services/image/v1/json/__init__.py b/tempest/services/image/v1/json/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tempest/services/image/v1/json/__init__.py
+++ /dev/null