diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-03-05 16:08:20 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-03-05 16:08:20 +0000 |
| commit | 0b2c4b1f327dddce0306637e7128bad6eb43fc54 (patch) | |
| tree | ce3c1cff2670f9a6582a1931a6c8d9b56c50ac2a /openstackclient/compute | |
| parent | fa3a34322c532c6ae09b7b21c305b6a92d99300a (diff) | |
| parent | bac9fb18c1455f6a309e7acff9230a8d6bf7079b (diff) | |
| download | python-openstackclient-0b2c4b1f327dddce0306637e7128bad6eb43fc54.tar.gz | |
Merge "Refactor security group set to use SDK"
Diffstat (limited to 'openstackclient/compute')
| -rw-r--r-- | openstackclient/compute/v2/security_group.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py index 907175f7..f378af14 100644 --- a/openstackclient/compute/v2/security_group.py +++ b/openstackclient/compute/v2/security_group.py @@ -217,47 +217,6 @@ class ListSecurityGroupRule(command.Lister): ) for s in rules)) -class SetSecurityGroup(command.Command): - """Set security group properties""" - - def get_parser(self, prog_name): - parser = super(SetSecurityGroup, self).get_parser(prog_name) - parser.add_argument( - 'group', - metavar='<group>', - help='Security group to modify (name or ID)', - ) - parser.add_argument( - '--name', - metavar='<new-name>', - help='New security group name', - ) - parser.add_argument( - "--description", - metavar="<description>", - help="New security group description", - ) - return parser - - def take_action(self, parsed_args): - compute_client = self.app.client_manager.compute - data = utils.find_resource( - compute_client.security_groups, - parsed_args.group, - ) - - if parsed_args.name: - data.name = parsed_args.name - if parsed_args.description: - data.description = parsed_args.description - - compute_client.security_groups.update( - data, - data.name, - data.description, - ) - - class ShowSecurityGroup(command.ShowOne): """Display security group details""" |
