Richard Theis 580b0aff88 Refactor security group delete to use SDK
Refactored the 'os security group delete' command to use the SDK
when neutron is enabled, but continue to use the nova client when
nova network is enabled.

This patch set introduces a new NetworkAndComputeCommand class
to be used for commands that must support neutron and nova network.
The new class allows both the parser and actions to be unique.
The current DeleteSecurityGroup class is now a subclass of this
new class and has moved under the network v2 commands.

This patch set also introduces a new FakeSecurityGroup class for
testing security groups.

And finally, this patch set updates the command documentation
for security group and security group rule to indicate that
Network v2 is also used.

Change-Id: Ic21376b86b40cc6d97f360f3760ba5beed154537
Partial-Bug: #1519511
Related-to: blueprint neutron-client
2016-02-02 09:04:51 -06:00

70 lines
1.3 KiB
ReStructuredText

===================
security group rule
===================
Compute v2, Network v2
security group rule create
--------------------------
Create a new security group rule
.. program:: security group rule create
.. code:: bash
os security group rule create
[--proto <proto>]
[--src-ip <ip-address> | --src-group <group>]
[--dst-port <port-range>]
<group>
.. option:: --proto <proto>
IP protocol (icmp, tcp, udp; default: tcp)
.. option:: --src-ip <ip-address>
Source IP address block (may use CIDR notation; default: 0.0.0.0/0)
.. option:: --src-group <group>
Source security group (ID only)
.. option:: --dst-port <port-range>
Destination port, may be a range: 137:139 (default: 0; only required for proto tcp and udp)
.. describe:: <group>
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
<rule>
.. describe:: <rule>
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
[<group>]
.. describe:: <group>
List all rules in this security group (name or ID)