diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-09-18 00:54:52 -0500 |
|---|---|---|
| committer | Steve Martinelli <stevemar@ca.ibm.com> | 2014-10-01 13:50:13 -0400 |
| commit | 31018bf7c2c57c530d55ed1dd90b9b65d489d557 (patch) | |
| tree | 79f991b2c0b6c54c54b97c54cdf6db00a904cf86 /openstackclient/object/client.py | |
| parent | e3b9b9658805f274283a498ed82014dce3833fe3 (diff) | |
| download | python-openstackclient-31018bf7c2c57c530d55ed1dd90b9b65d489d557.tar.gz | |
Move object-store commands to low-level API
api.object_store.APIv1 now contains the formerly top-level functions
implementing the object-store REST client. This replaces the old-style
ObjectClientv1 that is no longer necessary.
Change-Id: I7d8fea326b214481e7d6b24119bd41777c6aa968
Diffstat (limited to 'openstackclient/object/client.py')
| -rw-r--r-- | openstackclient/object/client.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/openstackclient/object/client.py b/openstackclient/object/client.py index b81ffaaf..887aa85b 100644 --- a/openstackclient/object/client.py +++ b/openstackclient/object/client.py @@ -17,6 +17,7 @@ import logging +from openstackclient.api import object_store_v1 from openstackclient.common import utils LOG = logging.getLogger(__name__) @@ -30,7 +31,7 @@ API_VERSIONS = { def make_client(instance): - """Returns an object service client.""" + """Returns an object-store API client.""" object_client = utils.get_client_class( API_NAME, @@ -42,9 +43,11 @@ def make_client(instance): endpoint = instance._url else: endpoint = instance.get_endpoint_for_service_type("object-store") - client = object_client( + + client = object_store_v1.APIv1( + session=instance.session, + service_type='object-store', endpoint=endpoint, - token=instance._token, ) return client @@ -61,16 +64,3 @@ def build_option_parser(parser): DEFAULT_OBJECT_API_VERSION + ' (Env: OS_OBJECT_API_VERSION)') return parser - - -class ObjectClientv1(object): - - def __init__( - self, - endpoint_type='publicURL', - endpoint=None, - token=None, - ): - self.endpoint_type = endpoint_type - self.endpoint = endpoint - self.token = token |
