summaryrefslogtreecommitdiff
path: root/neutronclient/neutron/v2_0/securitygroup.py
diff options
context:
space:
mode:
authorKevin Benton <kevin@benton.pub>2016-03-02 17:29:18 -0800
committerKevin Benton <kevin@benton.pub>2016-03-08 19:12:58 +0000
commit2db432fbf5be5c307b82117200649379859450e5 (patch)
treee53ffdc97cf67f0e740af73de63723ca9140d44c /neutronclient/neutron/v2_0/securitygroup.py
parent45b4516a33294fddfdbd2664ec13e16777d5448f (diff)
downloadpython-neutronclient-2db432fbf5be5c307b82117200649379859450e5.tar.gz
Add parser options for description on resources
This adds the description field to the parsers for all of the resources that gained description fields in the dependent patch. Change-Id: I939b517c5320ea9dd3f387c12adee1ed8876adec Related-Bug: #1483480 Depends-On: I6e1ef53d7aae7d04a5485810cc1db0a8eb125953
Diffstat (limited to 'neutronclient/neutron/v2_0/securitygroup.py')
-rw-r--r--neutronclient/neutron/v2_0/securitygroup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/neutronclient/neutron/v2_0/securitygroup.py b/neutronclient/neutron/v2_0/securitygroup.py
index 0e1f6d2..b558504 100644
--- a/neutronclient/neutron/v2_0/securitygroup.py
+++ b/neutronclient/neutron/v2_0/securitygroup.py
@@ -306,6 +306,9 @@ class CreateSecurityGroupRule(neutronV20.CreateCommand):
def add_known_arguments(self, parser):
parser.add_argument(
+ '--description',
+ help=_('Description of security group rule.'))
+ parser.add_argument(
'security_group_id', metavar='SECURITY_GROUP',
help=_('Security group name or ID to add rule.'))
parser.add_argument(
@@ -354,7 +357,8 @@ class CreateSecurityGroupRule(neutronV20.CreateCommand):
generate_default_ethertype(parsed_args.protocol)}
neutronV20.update_dict(parsed_args, body,
['protocol', 'port_range_min', 'port_range_max',
- 'remote_ip_prefix', 'tenant_id'])
+ 'remote_ip_prefix', 'tenant_id',
+ 'description'])
if parsed_args.remote_group_id:
_remote_group_id = neutronV20.find_resourceid_by_name_or_id(
self.get_client(), 'security_group',