From 3e97e1775dccd12757588e667ba511b464f84234 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Thu, 13 Nov 2014 16:48:59 -0500 Subject: [PATCH] Remove links from oauth consumers This should be the last of the v3 identity objects that return a links section upon create or show. Change-Id: I45a3b43c303bfed73950095bec8860cbea7a559c --- openstackclient/identity/v3/consumer.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/openstackclient/identity/v3/consumer.py b/openstackclient/identity/v3/consumer.py index 7f54603540..b7e57d8dd0 100644 --- a/openstackclient/identity/v3/consumer.py +++ b/openstackclient/identity/v3/consumer.py @@ -46,9 +46,8 @@ class CreateConsumer(show.ShowOne): consumer = identity_client.oauth1.consumers.create( parsed_args.description ) - info = {} - info.update(consumer._info) - return zip(*sorted(six.iteritems(info))) + consumer._info.pop('links', None) + return zip(*sorted(six.iteritems(consumer._info))) class DeleteConsumer(command.Command): @@ -147,6 +146,5 @@ class ShowConsumer(show.ShowOne): consumer = utils.find_resource( identity_client.oauth1.consumers, parsed_args.consumer) - info = {} - info.update(consumer._info) - return zip(*sorted(six.iteritems(info))) + consumer._info.pop('links', None) + return zip(*sorted(six.iteritems(consumer._info)))