summaryrefslogtreecommitdiff
path: root/openstackclient/compute
diff options
context:
space:
mode:
authorRichard Theis <rtheis@us.ibm.com>2016-02-05 09:02:27 -0600
committerRichard Theis <rtheis@us.ibm.com>2016-02-10 10:38:35 -0600
commita29c9732d7434902fd36e0417e16bb760875591f (patch)
tree75ba5443bad7cf4ad4a4ad62ceac191c7fb8095d /openstackclient/compute
parent624c39ab1bb060e35253b78c842d41ebc1807ae5 (diff)
downloadpython-openstackclient-a29c9732d7434902fd36e0417e16bb760875591f.tar.gz
Refactor security group rule delete to use SDK
Refactored the 'os security group rule delete' 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 introduces new FakeSecurityGroupRule classes for testing network and compute security group rules. And fixes were made to the network FakeSecurityGroup class. Change-Id: I8d0917925aa464e8255defae95a2a2adfb6cfb75 Partial-Bug: #1519512 Related-to: blueprint neutron-client
Diffstat (limited to 'openstackclient/compute')
-rw-r--r--openstackclient/compute/v2/security_group.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py
index 2a8908d7..6f2e1a52 100644
--- a/openstackclient/compute/v2/security_group.py
+++ b/openstackclient/compute/v2/security_group.py
@@ -169,24 +169,6 @@ class CreateSecurityGroupRule(command.ShowOne):
return zip(*sorted(six.iteritems(info)))
-class DeleteSecurityGroupRule(command.Command):
- """Delete a security group rule"""
-
- def get_parser(self, prog_name):
- parser = super(DeleteSecurityGroupRule, self).get_parser(prog_name)
- parser.add_argument(
- 'rule',
- metavar='<rule>',
- help='Security group rule to delete (ID only)',
- )
- return parser
-
- def take_action(self, parsed_args):
-
- compute_client = self.app.client_manager.compute
- compute_client.security_group_rules.delete(parsed_args.rule)
-
-
class ListSecurityGroup(command.Lister):
"""List security groups"""