summaryrefslogtreecommitdiff
path: root/openstackclient/compute
diff options
context:
space:
mode:
authorRichard Theis <rtheis@us.ibm.com>2016-03-02 15:45:01 -0600
committerRichard Theis <rtheis@us.ibm.com>2016-03-03 06:33:15 -0600
commitbac9fb18c1455f6a309e7acff9230a8d6bf7079b (patch)
tree64ecbaf197640b7a76f4296cd1f65062f77cb9f6 /openstackclient/compute
parentf9add0559c52bf3d0866cfbd320982c5143f6ef6 (diff)
downloadpython-openstackclient-bac9fb18c1455f6a309e7acff9230a8d6bf7079b.tar.gz
Refactor security group set to use SDK
Refactored the 'os security group set' command to use the SDK when neutron is enabled, but continue to use the nova client when nova network is enabled. This patch set also fixes a compute bug which ignores name and description when set to an empty value. Change-Id: I4225179dca4aedf799e1656ec49236bdedc5e9bd Partial-Bug: #1519511 Implements: blueprint neutron-client
Diffstat (limited to 'openstackclient/compute')
-rw-r--r--openstackclient/compute/v2/security_group.py41
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"""