diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-11-09 20:05:56 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-11-09 20:05:56 +0000 |
| commit | 8b2f25682850ca747dcc0961b894ed5f5644580a (patch) | |
| tree | 242f0145625692e6b31327413e11a22bcf943e6a /openstackclient/network | |
| parent | a1ed3752924e38fae8829bec22b7d2006a3e8e1b (diff) | |
| parent | 52c4a55d43248d87737613509930242244b6ff3c (diff) | |
| download | python-openstackclient-8b2f25682850ca747dcc0961b894ed5f5644580a.tar.gz | |
Merge "Add 'description' option"
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/v2/security_group_rule.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openstackclient/network/v2/security_group_rule.py b/openstackclient/network/v2/security_group_rule.py index e3be44ec..0f3bad3d 100644 --- a/openstackclient/network/v2/security_group_rule.py +++ b/openstackclient/network/v2/security_group_rule.py @@ -110,6 +110,11 @@ class CreateSecurityGroupRule(common.NetworkAndComputeShowOne): def update_parser_network(self, parser): parser.add_argument( + '--description', + metavar='<description>', + help=_("Set security group rule description") + ) + parser.add_argument( '--dst-port', metavar='<port-range>', action=parseractions.RangeAction, @@ -235,6 +240,9 @@ class CreateSecurityGroupRule(common.NetworkAndComputeShowOne): attrs = {} attrs['protocol'] = self._get_protocol(parsed_args) + if parsed_args.description is not None: + attrs['description'] = parsed_args.description + # NOTE(rtheis): A direction must be specified and ingress # is the default. if parsed_args.ingress or not parsed_args.egress: |
