diff --git a/openstackclient/identity/v3/federation_protocol.py b/openstackclient/identity/v3/federation_protocol.py index adc4a28b14..693ec94eae 100644 --- a/openstackclient/identity/v3/federation_protocol.py +++ b/openstackclient/identity/v3/federation_protocol.py @@ -61,6 +61,7 @@ class CreateProtocol(show.ShowOne): # user. info['identity_provider'] = parsed_args.identity_provider info['mapping'] = info.pop('mapping_id') + info.pop('links', None) return zip(*sorted(six.iteritems(info))) @@ -179,4 +180,5 @@ class ShowProtocol(show.ShowOne): parsed_args.identity_provider, parsed_args.federation_protocol) info = dict(protocol._info) info['mapping'] = info.pop('mapping_id') + info.pop('links', None) return zip(*sorted(six.iteritems(info))) diff --git a/openstackclient/identity/v3/identity_provider.py b/openstackclient/identity/v3/identity_provider.py index 5e8ee56689..8a1b22d0cf 100644 --- a/openstackclient/identity/v3/identity_provider.py +++ b/openstackclient/identity/v3/identity_provider.py @@ -65,9 +65,9 @@ class CreateIdentityProvider(show.ShowOne): id=parsed_args.identity_provider_id, description=parsed_args.description, enabled=parsed_args.enabled) - info = {} - info.update(idp._info) - return zip(*sorted(six.iteritems(info))) + + idp._info.pop('links', None) + return zip(*sorted(six.iteritems(idp._info))) class DeleteIdentityProvider(command.Command): @@ -176,6 +176,5 @@ class ShowIdentityProvider(show.ShowOne): identity_client.federation.identity_providers, parsed_args.identity_provider) - info = {} - info.update(identity_provider._info) - return zip(*sorted(six.iteritems(info))) + identity_provider._info.pop('links', None) + return zip(*sorted(six.iteritems(identity_provider._info))) diff --git a/openstackclient/identity/v3/mapping.py b/openstackclient/identity/v3/mapping.py index ae5e03bd2d..c530a40439 100644 --- a/openstackclient/identity/v3/mapping.py +++ b/openstackclient/identity/v3/mapping.py @@ -107,9 +107,8 @@ class CreateMapping(show.ShowOne, _RulesReader): mapping_id=parsed_args.mapping, rules=rules) - info = {} - info.update(mapping._info) - return zip(*sorted(six.iteritems(info))) + mapping._info.pop('links', None) + return zip(*sorted(six.iteritems(mapping._info))) class DeleteMapping(command.Command): @@ -204,6 +203,5 @@ class ShowMapping(show.ShowOne): mapping = identity_client.federation.mappings.get(parsed_args.mapping) - info = {} - info.update(mapping._info) - return zip(*sorted(six.iteritems(info))) + mapping._info.pop('links', None) + return zip(*sorted(six.iteritems(mapping._info)))