From 1b6b639c9fa0f81f365f4c5baad575dc2eaca200 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 14 Dec 2023 12:30:03 +0000 Subject: [PATCH] network: Clarify purpose of default sg rules These only apply to newly created default security groups i.e. when you create a new project. They do not apply to existing default security groups. Change-Id: Ie01bf47dd8a0392354d17d984b41c1fad504e659 Signed-off-by: Stephen Finucane --- .../network/v2/default_security_group_rule.py | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/openstackclient/network/v2/default_security_group_rule.py b/openstackclient/network/v2/default_security_group_rule.py index b8232a2521..86a2ddc878 100644 --- a/openstackclient/network/v2/default_security_group_rule.py +++ b/openstackclient/network/v2/default_security_group_rule.py @@ -38,7 +38,12 @@ def _get_columns(item): class CreateDefaultSecurityGroupRule( command.ShowOne, common.NeutronCommandWithExtraArgs ): - _description = _("Create a new default security group rule") + """Add a new security group rule to the default security group template. + + These rules will be applied to the default security groups created for any + new project. They will not be applied to any existing default security + groups. + """ def get_parser(self, prog_name): parser = super().get_parser(prog_name) @@ -225,7 +230,12 @@ class CreateDefaultSecurityGroupRule( class DeleteDefaultSecurityGroupRule(command.Command): - _description = _("Delete default security group rule(s)") + """Remove security group rule(s) from the default security group template. + + These rules will not longer be applied to the default security groups + created for any new project. They will not be removed from any existing + default security groups. + """ def get_parser(self, prog_name): parser = super().get_parser(prog_name) @@ -265,7 +275,12 @@ class DeleteDefaultSecurityGroupRule(command.Command): class ListDefaultSecurityGroupRule(command.Lister): - _description = _("List default security group rules") + """List security group rules used for new default security groups. + + This shows the rules that will be added to any new default security groups + created. These rules may differ for the rules present on existing default + security groups. + """ def _format_network_security_group_rule(self, rule): """Transform the SDK DefaultSecurityGroupRule object to a dict @@ -373,7 +388,11 @@ class ListDefaultSecurityGroupRule(command.Lister): class ShowDefaultSecurityGroupRule(command.ShowOne): - _description = _("Display default security group rule details") + """Show a security group rule used for new default security groups. + + This shows a rule that will be added to any new default security groups + created. This rule may not be present on existing default security groups. + """ def get_parser(self, prog_name): parser = super().get_parser(prog_name)