Support description in sg-rule creation
Story: 2008876 Task: 42420 Signed-off-by: Jesper Schmitz Mouridsen <jesper@schmitz.computer> Change-Id: I9e2ab6015155dd2e67788f515fd42231fcf98547
This commit is contained in:
parent
806a525733
commit
15a8fc4c26
@ -241,7 +241,8 @@ class SecurityGroupCloudMixin(_normalize.Normalizer):
|
|||||||
remote_address_group_id=None,
|
remote_address_group_id=None,
|
||||||
direction='ingress',
|
direction='ingress',
|
||||||
ethertype='IPv4',
|
ethertype='IPv4',
|
||||||
project_id=None):
|
project_id=None,
|
||||||
|
description=None):
|
||||||
"""Create a new security group rule
|
"""Create a new security group rule
|
||||||
|
|
||||||
:param string secgroup_name_or_id:
|
:param string secgroup_name_or_id:
|
||||||
@ -285,7 +286,8 @@ class SecurityGroupCloudMixin(_normalize.Normalizer):
|
|||||||
:param string project_id:
|
:param string project_id:
|
||||||
Specify the project ID this security group will be created
|
Specify the project ID this security group will be created
|
||||||
on (admin-only).
|
on (admin-only).
|
||||||
|
:param string description:
|
||||||
|
Description of the rule, max 255 characters.
|
||||||
:returns: A ``munch.Munch`` representing the new security group rule.
|
:returns: A ``munch.Munch`` representing the new security group rule.
|
||||||
|
|
||||||
:raises: OpenStackCloudException on operation error.
|
:raises: OpenStackCloudException on operation error.
|
||||||
@ -319,7 +321,8 @@ class SecurityGroupCloudMixin(_normalize.Normalizer):
|
|||||||
}
|
}
|
||||||
if project_id is not None:
|
if project_id is not None:
|
||||||
rule_def['tenant_id'] = project_id
|
rule_def['tenant_id'] = project_id
|
||||||
|
if description is not None:
|
||||||
|
rule_def["description"] = description
|
||||||
return self.network.create_security_group_rule(
|
return self.network.create_security_group_rule(
|
||||||
**rule_def
|
**rule_def
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user