summaryrefslogtreecommitdiff
path: root/openstackclient/object
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/object')
-rw-r--r--openstackclient/object/client.py8
-rw-r--r--openstackclient/object/v1/lib/container.py4
-rw-r--r--openstackclient/object/v1/lib/object.py4
3 files changed, 9 insertions, 7 deletions
diff --git a/openstackclient/object/client.py b/openstackclient/object/client.py
index 273bea6e..006d54c5 100644
--- a/openstackclient/object/client.py
+++ b/openstackclient/object/client.py
@@ -23,7 +23,7 @@ LOG = logging.getLogger(__name__)
DEFAULT_OBJECT_API_VERSION = '1'
API_VERSION_OPTION = 'os_object_api_version'
-API_NAME = 'object-store'
+API_NAME = 'object_store'
API_VERSIONS = {
'1': 'openstackclient.object.client.ObjectClientv1',
}
@@ -31,15 +31,17 @@ API_VERSIONS = {
def make_client(instance):
"""Returns an object service client."""
+
object_client = utils.get_client_class(
API_NAME,
instance._api_version[API_NAME],
API_VERSIONS)
+ LOG.debug('Instantiating object client: %s' % object_client)
+
if instance._url:
endpoint = instance._url
else:
- endpoint = instance.get_endpoint_for_service_type(API_NAME)
- LOG.debug('instantiating object client')
+ endpoint = instance.get_endpoint_for_service_type("object-store")
client = object_client(
endpoint=endpoint,
token=instance._token,
diff --git a/openstackclient/object/v1/lib/container.py b/openstackclient/object/v1/lib/container.py
index 0bae2349..72e97d4e 100644
--- a/openstackclient/object/v1/lib/container.py
+++ b/openstackclient/object/v1/lib/container.py
@@ -17,9 +17,9 @@
"""Object v1 API library"""
try:
- from urllib.parse import urlparse
+ from urllib.parse import urlparse # noqa
except ImportError:
- from urlparse import urlparse
+ from urlparse import urlparse # noqa
def list_containers(
diff --git a/openstackclient/object/v1/lib/object.py b/openstackclient/object/v1/lib/object.py
index 646737bd..ffc7e9b8 100644
--- a/openstackclient/object/v1/lib/object.py
+++ b/openstackclient/object/v1/lib/object.py
@@ -19,9 +19,9 @@
import six
try:
- from urllib.parse import urlparse
+ from urllib.parse import urlparse # noqa
except ImportError:
- from urlparse import urlparse
+ from urlparse import urlparse # noqa
def list_objects(