Update help messages for default security group commands

The secgroup-{add,delete,list}-default-rules? family of commands has
confusing help text that makes it sounds like they actually operate on
the default security group (that is, the security group named
'default' which is the default for the current tenant). Instead, the
operate on a sort of meta-security-group object which is only used to
populate the 'default' security group in newly-created tenants. This
is crazy confusing. These commands get fancy new help strings that
should hopefully make it a little more clear.

Closes-Bug: 1430354
Change-Id: I4d9569ba7ea9ad7a20e984df7a137c99240a9748
This commit is contained in:
Chris St. Pierre 2015-03-10 21:27:45 -05:00
parent 876a3bd80a
commit b7972478ff
1 changed files with 9 additions and 3 deletions

View File

@ -4326,7 +4326,9 @@ def do_server_group_list(cs, args):
def do_secgroup_list_default_rules(cs, args):
"""List rules for the default security group."""
"""List rules that will be added to the 'default' security group for
new tenants.
"""
_print_secgroup_rules(cs.security_group_default_rules.list(),
show_source_group=False)
@ -4345,7 +4347,9 @@ def do_secgroup_list_default_rules(cs, args):
help=_('Port at end of range.'))
@cliutils.arg('cidr', metavar='<cidr>', help=_('CIDR for address range.'))
def do_secgroup_add_default_rule(cs, args):
"""Add a rule to the default security group."""
"""Add a rule to the set of rules that will be added to the 'default'
security group for new tenants.
"""
rule = cs.security_group_default_rules.create(args.ip_proto,
args.from_port,
args.to_port,
@ -4367,7 +4371,9 @@ def do_secgroup_add_default_rule(cs, args):
help=_('Port at end of range.'))
@cliutils.arg('cidr', metavar='<cidr>', help=_('CIDR for address range.'))
def do_secgroup_delete_default_rule(cs, args):
"""Delete a rule from the default security group."""
"""Delete a rule from the set of rules that will be added to the
'default' security group for new tenants.
"""
for rule in cs.security_group_default_rules.list():
if (rule.ip_protocol and
rule.ip_protocol.upper() == args.ip_proto.upper() and