Merge "Remove links from federation related commands in identity v3"

This commit is contained in:
Jenkins 2014-11-14 22:21:06 +00:00 committed by Gerrit Code Review
commit 8f40259ada
3 changed files with 11 additions and 12 deletions

View File

@ -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)))

View File

@ -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)))

View File

@ -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)))