summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-10-08 22:18:50 +0000
committerGerrit Code Review <review@openstack.org>2014-10-08 22:18:50 +0000
commitd405b1b12d216e77b0e8341a8a81668cbb6a2429 (patch)
treea7e65dc058f16a3f209e3b7c12bc54f0b8d52e2c /openstackclient
parent35b0bbd7623df0ba47806f2bba446bd32c5c7791 (diff)
parent388bbbac2ce6bf9baf2f9ceb6102b0b1f7072264 (diff)
downloadpython-openstackclient-d405b1b12d216e77b0e8341a8a81668cbb6a2429.tar.gz
Merge "Fix issues with object related commands"
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/api/object_store_v1.py5
-rw-r--r--openstackclient/object/client.py6
2 files changed, 3 insertions, 8 deletions
diff --git a/openstackclient/api/object_store_v1.py b/openstackclient/api/object_store_v1.py
index f938b55e..57db9063 100644
--- a/openstackclient/api/object_store_v1.py
+++ b/openstackclient/api/object_store_v1.py
@@ -252,6 +252,7 @@ class APIv1(api.BaseAPI):
if container is None or object is None:
return None
+ params['format'] = 'json'
if all_data:
data = listing = self.object_list(
container=container,
@@ -280,7 +281,6 @@ class APIv1(api.BaseAPI):
data.extend(listing)
return data
- params = {}
if limit:
params['limit'] = limit
if marker:
@@ -320,7 +320,8 @@ class APIv1(api.BaseAPI):
)
if response.status_code == 200:
if not os.path.exists(os.path.dirname(file)):
- os.makedirs(os.path.dirname(file))
+ if len(os.path.dirname(file)) > 0:
+ os.makedirs(os.path.dirname(file))
with open(file, 'wb') as f:
for chunk in response.iter_content():
f.write(chunk)
diff --git a/openstackclient/object/client.py b/openstackclient/object/client.py
index 887aa85b..1ac905c3 100644
--- a/openstackclient/object/client.py
+++ b/openstackclient/object/client.py
@@ -33,12 +33,6 @@ API_VERSIONS = {
def make_client(instance):
"""Returns an object-store API 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: