summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2014-10-06 03:37:46 -0400
committerSteve Martinelli <stevemar@ca.ibm.com>2014-10-06 20:04:19 -0400
commit388bbbac2ce6bf9baf2f9ceb6102b0b1f7072264 (patch)
tree95ea548046c5583be60990cc6d9e6ad2b74d69ee /openstackclient
parent0cb204e59b20f25b7a054b411507d6dabbc699ac (diff)
downloadpython-openstackclient-388bbbac2ce6bf9baf2f9ceb6102b0b1f7072264.tar.gz
Fix issues with object related commands
1) Can't create instance of swiftclient. Since we now create an API instance, creating a swiftclient instance won't work. Trying to do any object related command fails. 2) Listing objects in a container fails, we depend on the data returned in a specific way, during the API transition this must have slipped through. Needs regression/funcitonal tests to mame sure this doesn't happen again. Change-Id: I69079a0dc9f32b84e6f9307729d3dbbba549ac5e
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: