diff options
| author | Steve Martinelli <stevemar@ca.ibm.com> | 2014-10-03 00:07:45 -0400 |
|---|---|---|
| committer | Steve Martinelli <stevemar@ca.ibm.com> | 2014-10-11 22:35:12 -0400 |
| commit | a8d4b0eebb563c8aad33300938b1b32347eb0050 (patch) | |
| tree | 2d69974a6da7a1792044be2b12bb97e88c45969d /openstackclient/identity/v3/service.py | |
| parent | f0c57e17c9a4b5bbe2f072a4eacefce3bcf30d45 (diff) | |
| download | python-openstackclient-a8d4b0eebb563c8aad33300938b1b32347eb0050.tar.gz | |
Remove 'links' section from several v3 Identity objects
The links field in the returned objects from the v3 Identity
API aren't really useful, so let's remove them.
Managed to remove most of them from the core API.
I'll likely remove the extension/contribution (oauth/federation)
related ones in another patch.
Also in this patch the code for setting services and projects
was changed. Though not incorrect, it was not needed to copy
the entire returned object, we should just need to pass in
the fields we want to update.
Change-Id: I164ca9ad8b28fa10b291e9115ef40753e387c547
Diffstat (limited to 'openstackclient/identity/v3/service.py')
| -rw-r--r-- | openstackclient/identity/v3/service.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openstackclient/identity/v3/service.py b/openstackclient/identity/v3/service.py index 88301edc..4f622269 100644 --- a/openstackclient/identity/v3/service.py +++ b/openstackclient/identity/v3/service.py @@ -70,6 +70,7 @@ class CreateService(show.ShowOne): enabled=enabled, ) + service._info.pop('links') return zip(*sorted(six.iteritems(service._info))) @@ -161,7 +162,7 @@ class SetService(command.Command): service = common.find_service(identity_client, parsed_args.service) - kwargs = service._info + kwargs = {} if parsed_args.type: kwargs['type'] = parsed_args.type if parsed_args.name: @@ -170,8 +171,6 @@ class SetService(command.Command): kwargs['enabled'] = True if parsed_args.disable: kwargs['enabled'] = False - if 'id' in kwargs: - del kwargs['id'] identity_client.services.update( service.id, @@ -200,4 +199,5 @@ class ShowService(show.ShowOne): service = common.find_service(identity_client, parsed_args.service) + service._info.pop('links') return zip(*sorted(six.iteritems(service._info))) |
