diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-02-29 18:38:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-02-29 18:38:38 +0000 |
| commit | 5310cfb8b750b3a17b99d235318e736023cfd234 (patch) | |
| tree | 79afb90e57636b1d0b64338637768a1f661afabd /openstackclient | |
| parent | 8a3fc6c34368079d6c79cfc236c68ee8d1cb1ef4 (diff) | |
| parent | 859bfaf8757086c8607c1520c8018ab20e91a3ac (diff) | |
| download | python-openstackclient-5310cfb8b750b3a17b99d235318e736023cfd234.tar.gz | |
Merge "Make SetSecurityGroup inherit from cliff.Command"
Diffstat (limited to 'openstackclient')
| -rw-r--r-- | openstackclient/compute/v2/security_group.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py index 6f2e1a52..2a7b40f4 100644 --- a/openstackclient/compute/v2/security_group.py +++ b/openstackclient/compute/v2/security_group.py @@ -271,7 +271,7 @@ class ListSecurityGroupRule(command.Lister): ) for s in rules)) -class SetSecurityGroup(command.ShowOne): +class SetSecurityGroup(command.Command): """Set security group properties""" def get_parser(self, prog_name): @@ -294,7 +294,6 @@ class SetSecurityGroup(command.ShowOne): return parser def take_action(self, parsed_args): - compute_client = self.app.client_manager.compute data = utils.find_resource( compute_client.security_groups, @@ -306,17 +305,11 @@ class SetSecurityGroup(command.ShowOne): if parsed_args.description: data.description = parsed_args.description - info = {} - info.update(compute_client.security_groups.update( + compute_client.security_groups.update( data, data.name, data.description, - )._info) - - if info: - return zip(*sorted(six.iteritems(info))) - else: - return ({}, {}) + ) class ShowSecurityGroup(command.ShowOne): |
