From 1f8b81462826284068b96ffce2648344c9e7c644 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Fri, 11 Sep 2015 00:46:03 -0500 Subject: Fix up object-store show commands 1) Change metadata to appear under a common 'properties' key, and use the utility to format them, this applied to object, account and container. 2) Clean up container and object output, which were setting the x-container-meta-owner property, but this is metadata only for the container, so it's pointless to have, removed it. 3) Container show was showing read/write ACLs and sync stuff, but these are not being returned by my swift by default, so I moved these to be checks, so we don't clutter the output. Change-Id: Ife7521fe9c2724035b06963c118bd6016ba2f5b5 --- openstackclient/object/v1/account.py | 2 ++ openstackclient/object/v1/container.py | 2 ++ openstackclient/object/v1/object.py | 2 ++ 3 files changed, 6 insertions(+) (limited to 'openstackclient/object') diff --git a/openstackclient/object/v1/account.py b/openstackclient/object/v1/account.py index 4ff890ce..aa94ff5c 100644 --- a/openstackclient/object/v1/account.py +++ b/openstackclient/object/v1/account.py @@ -55,6 +55,8 @@ class ShowAccount(show.ShowOne): @utils.log_method(log) def take_action(self, parsed_args): data = self.app.client_manager.object_store.account_show() + if 'properties' in data: + data['properties'] = utils.format_dict(data.pop('properties')) return zip(*sorted(six.iteritems(data))) diff --git a/openstackclient/object/v1/container.py b/openstackclient/object/v1/container.py index b8eb4c25..8c8844e2 100644 --- a/openstackclient/object/v1/container.py +++ b/openstackclient/object/v1/container.py @@ -229,6 +229,8 @@ class ShowContainer(show.ShowOne): data = self.app.client_manager.object_store.container_show( container=parsed_args.container, ) + if 'properties' in data: + data['properties'] = utils.format_dict(data.pop('properties')) return zip(*sorted(six.iteritems(data))) diff --git a/openstackclient/object/v1/object.py b/openstackclient/object/v1/object.py index a023e3a0..4bd06124 100644 --- a/openstackclient/object/v1/object.py +++ b/openstackclient/object/v1/object.py @@ -284,6 +284,8 @@ class ShowObject(show.ShowOne): container=parsed_args.container, object=parsed_args.object, ) + if 'properties' in data: + data['properties'] = utils.format_dict(data.pop('properties')) return zip(*sorted(six.iteritems(data))) -- cgit v1.2.1