diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-03-11 01:33:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-03-11 01:33:57 +0000 |
| commit | e3e2f38920d4f111aeee9269d038c8ec4378bbb1 (patch) | |
| tree | 9711f9c46e4985dbfe960879686cf305faf5b7fb /openstackclient/compute | |
| parent | d4b71ea890b2a32db78f874e573eb0a79dc3a4e7 (diff) | |
| parent | ea2dd8e141ef1cf446a42ee93992d8fb44f4ba05 (diff) | |
| download | python-openstackclient-e3e2f38920d4f111aeee9269d038c8ec4378bbb1.tar.gz | |
Merge "Refactor security group create to use SDK"
Diffstat (limited to 'openstackclient/compute')
| -rw-r--r-- | openstackclient/compute/v2/security_group.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py index 042e5caf..734bd78e 100644 --- a/openstackclient/compute/v2/security_group.py +++ b/openstackclient/compute/v2/security_group.py @@ -56,38 +56,6 @@ def _xform_security_group_rule(sgroup): return info -class CreateSecurityGroup(command.ShowOne): - """Create a new security group""" - - def get_parser(self, prog_name): - parser = super(CreateSecurityGroup, self).get_parser(prog_name) - parser.add_argument( - "name", - metavar="<name>", - help="New security group name", - ) - parser.add_argument( - "--description", - metavar="<description>", - help="Security group description", - ) - return parser - - def take_action(self, parsed_args): - compute_client = self.app.client_manager.compute - - description = parsed_args.description or parsed_args.name - - data = compute_client.security_groups.create( - parsed_args.name, - description, - ) - - info = {} - info.update(data._info) - return zip(*sorted(six.iteritems(info))) - - class CreateSecurityGroupRule(command.ShowOne): """Create a new security group rule""" |
