diff --git a/doc/source/command-objects/security-group-rule.rst b/doc/source/command-objects/security-group-rule.rst new file mode 100644 index 0000000000..8bd0d0615c --- /dev/null +++ b/doc/source/command-objects/security-group-rule.rst @@ -0,0 +1,65 @@ +=================== +security group rule +=================== + +Compute v2 + +security group rule create +-------------------------- + +Create a new security group rule + +.. program:: security group rule create +.. code:: bash + + os security group rule create + [--proto ] + [--src-ip ] + [--dst-port ] + + +.. option:: --proto + + IP protocol (icmp, tcp, udp; default: tcp) + +.. option:: --src-ip + + Source IP (may use CIDR notation; default: 0.0.0.0/0) + +.. option:: --dst-port + + Destination port, may be a range: 137:139 (default: 0; only required for proto tcp and udp) + +.. describe:: + + Create rule in this security group (name or ID) + +security group rule delete +-------------------------- + +Delete a security group rule + +.. program:: security group rule delete +.. code:: bash + + os security group rule delete + + +.. describe:: + + Security group rule to delete (ID only) + +security group rule list +------------------------ + +List security group rules + +.. program:: security group rule list +.. code:: bash + + os security group rule list + + +.. describe:: + + List all rules in this security group (name or ID) diff --git a/doc/source/command-objects/security-group.rst b/doc/source/command-objects/security-group.rst new file mode 100644 index 0000000000..60de41d824 --- /dev/null +++ b/doc/source/command-objects/security-group.rst @@ -0,0 +1,95 @@ +============== +security group +============== + +Compute v2 + +security group create +--------------------- + +Create a new security group + +.. program:: security group create +.. code:: bash + + os security group create + [--description ] + + +.. option:: --description + + Security group description + +.. describe:: + + New security group name + +security group delete +--------------------- + +Delete a security group + +.. program:: security group delete +.. code:: bash + + os security group delete + + +.. describe:: + + Security group to delete (name or ID) + +security group list +------------------- + +List security groups + +.. program:: security group list +.. code:: bash + + os security group list + [--all-projects] + +.. option:: --all-projects + + Display information from all projects (admin only) + +security group set +------------------ + +Set security group properties + +.. program:: security group set +.. code:: bash + + os security group set + [--name ] + [--description ] + + +.. option:: --name + + New security group name + +.. option:: --description + + New security group description + +.. describe:: + + Security group to modify (name or ID) + +security group show +------------------- + +Display security group details + +.. program:: security group show +.. code:: bash + + os security group show + + +.. describe:: + + Security group to display (name or ID) diff --git a/openstackclient/compute/v2/security_group.py b/openstackclient/compute/v2/security_group.py index 3dd0c49b95..0ba51d685d 100644 --- a/openstackclient/compute/v2/security_group.py +++ b/openstackclient/compute/v2/security_group.py @@ -103,7 +103,7 @@ class DeleteSecurityGroup(command.Command): parser.add_argument( 'group', metavar='', - help='Name or ID of security group to delete', + help='Security group to delete (name or ID)', ) return parser @@ -120,7 +120,7 @@ class DeleteSecurityGroup(command.Command): class ListSecurityGroup(lister.Lister): - """List all security groups""" + """List security groups""" log = logging.getLogger(__name__ + ".ListSecurityGroup") @@ -185,7 +185,7 @@ class SetSecurityGroup(show.ShowOne): parser.add_argument( 'group', metavar='', - help='Name or ID of security group to change', + help='Security group to modify (name or ID)', ) parser.add_argument( '--name', @@ -195,7 +195,7 @@ class SetSecurityGroup(show.ShowOne): parser.add_argument( "--description", metavar="", - help="New security group name", + help="New security group description", ) return parser @@ -227,7 +227,7 @@ class SetSecurityGroup(show.ShowOne): class ShowSecurityGroup(show.ShowOne): - """Show a specific security group""" + """Display security group details""" log = logging.getLogger(__name__ + '.ShowSecurityGroup') @@ -236,7 +236,7 @@ class ShowSecurityGroup(show.ShowOne): parser.add_argument( 'group', metavar='', - help='Name or ID of security group to change', + help='Security group to display (name or ID)', ) return parser @@ -275,7 +275,7 @@ class CreateSecurityGroupRule(show.ShowOne): parser.add_argument( 'group', metavar='', - help='Create rule in this security group', + help='Create rule in this security group (name or ID)', ) parser.add_argument( "--proto", @@ -333,7 +333,7 @@ class DeleteSecurityGroupRule(command.Command): parser.add_argument( 'rule', metavar='', - help='Security group rule ID to delete', + help='Security group rule to delete (ID only)', ) return parser @@ -346,7 +346,7 @@ class DeleteSecurityGroupRule(command.Command): class ListSecurityGroupRule(lister.Lister): - """List all security group rules""" + """List security group rules""" log = logging.getLogger(__name__ + ".ListSecurityGroupRule") @@ -355,7 +355,7 @@ class ListSecurityGroupRule(lister.Lister): parser.add_argument( 'group', metavar='', - help='List all rules in this security group', + help='List all rules in this security group (name or ID)', ) return parser