diff options
| author | Zuul <zuul@review.opendev.org> | 2021-05-26 19:29:11 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2021-05-26 19:29:11 +0000 |
| commit | 443c311fc288eefe1b9223b6b51a94121ab9d301 (patch) | |
| tree | 801155f8e1346c03fb80b4b51917b17eb62e47f0 /openstackclient/network/v2/security_group_rule.py | |
| parent | 84a606be675902d75a60efaf46305f670f26548f (diff) | |
| parent | b26b7f3440d4f756c0b7906b93751d7e83a733f7 (diff) | |
| download | python-openstackclient-443c311fc288eefe1b9223b6b51a94121ab9d301.tar.gz | |
Merge "Allow to send extra attributes in Neutron related commands"
Diffstat (limited to 'openstackclient/network/v2/security_group_rule.py')
| -rw-r--r-- | openstackclient/network/v2/security_group_rule.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/openstackclient/network/v2/security_group_rule.py b/openstackclient/network/v2/security_group_rule.py index 17241ed2..e273ded3 100644 --- a/openstackclient/network/v2/security_group_rule.py +++ b/openstackclient/network/v2/security_group_rule.py @@ -104,7 +104,8 @@ def _is_icmp_protocol(protocol): # TODO(abhiraut): Use the SDK resource mapped attribute names once the # OSC minimum requirements include SDK 1.0. -class CreateSecurityGroupRule(common.NetworkAndComputeShowOne): +class CreateSecurityGroupRule(common.NetworkAndComputeShowOne, + common.NeutronCommandWithExtraArgs): _description = _("Create a new security group rule") def update_parser_common(self, parser): @@ -355,6 +356,9 @@ class CreateSecurityGroupRule(common.NetworkAndComputeShowOne): ).id attrs['tenant_id'] = project_id + attrs.update( + self._parse_extra_properties(parsed_args.extra_properties)) + # Create and show the security group rule. obj = client.create_security_group_rule(**attrs) display_columns, columns = _get_columns(obj) |
