summaryrefslogtreecommitdiff
path: root/doc/source/cli/command-objects
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-04-29 00:32:32 +0000
committerAkihiro Motoki <amotoki@gmail.com>2017-07-23 21:54:32 +0000
commit57e5840710c3b2b74d31bfd6a0da739e0fc747ed (patch)
tree93fbb66cdc78f93062c4be7bddd8c8d8e45ff365 /doc/source/cli/command-objects
parente889ba1524c7e48a86ef41361a17cdb93b9942c2 (diff)
downloadpython-openstackclient-57e5840710c3b2b74d31bfd6a0da739e0fc747ed.tar.gz
Network tag support
Neutron tag mechanism now supports network, subnet, port, subnetpool and router. Tag support for more resources is planned. This commit introduces a common mixin class to implement tag operation and individual resource consumes it. To support tag remove, network unset command is added. Implements blueprint neutron-client-tag Change-Id: Iad59d052f46896d27d73c22d6d4bb3df889f2352
Diffstat (limited to 'doc/source/cli/command-objects')
-rw-r--r--doc/source/cli/command-objects/network.rst79
-rw-r--r--doc/source/cli/command-objects/port.rst47
-rw-r--r--doc/source/cli/command-objects/router.rst47
-rw-r--r--doc/source/cli/command-objects/subnet-pool.rst47
-rw-r--r--doc/source/cli/command-objects/subnet.rst47
5 files changed, 267 insertions, 0 deletions
diff --git a/doc/source/cli/command-objects/network.rst b/doc/source/cli/command-objects/network.rst
index ed9fd13d..5f20dc38 100644
--- a/doc/source/cli/command-objects/network.rst
+++ b/doc/source/cli/command-objects/network.rst
@@ -32,6 +32,7 @@ Create new network
[--provider-segment <provider-segment>]
[--qos-policy <qos-policy>]
[--transparent-vlan | --no-transparent-vlan]
+ [--tag <tag> | --no-tag]
<name>
.. option:: --project <project>
@@ -165,6 +166,18 @@ Create new network
*Network version 2 only*
+.. option:: --tag <tag>
+
+ Tag to be added to the network (repeat option to set multiple tags)
+
+ *Network version 2 only*
+
+.. option:: --no-tag
+
+ No tags associated with the network
+
+ *Network version 2 only*
+
.. _network_create-name:
.. describe:: <name>
@@ -206,6 +219,8 @@ List networks
[--provider-physical-network <provider-physical-network>]
[--provider-segment <provider-segment>]
[--agent <agent-id>]
+ [--tags <tag>[,<tag>,...]] [--any-tags <tag>[,<tag>,...]]
+ [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]]
.. option:: --external
@@ -297,6 +312,32 @@ List networks
List networks hosted by agent (ID only)
+ *Network version 2 only*
+
+.. option:: --tags <tag>[,<tag>,...]
+
+ List networks which have all given tag(s)
+
+ *Network version 2 only*
+
+.. option:: --any-tags <tag>[,<tag>,...]
+
+ List networks which have any given tag(s)
+
+ *Network version 2 only*
+
+.. option:: --not-tags <tag>[,<tag>,...]
+
+ Exclude networks which have all given tag(s)
+
+ *Network version 2 only*
+
+.. option:: --not-any-tags <tag>[,<tag>,...]
+
+ Exclude networks which have any given tag(s)
+
+ *Network version 2 only*
+
network set
-----------
@@ -318,6 +359,7 @@ Set network properties
[--provider-physical-network <provider-physical-network>]
[--provider-segment <provider-segment>]
[--qos-policy <qos-policy> | --no-qos-policy]
+ [--tag <tag>] [--no-tag]
<network>
.. option:: --name <name>
@@ -392,6 +434,15 @@ Set network properties
Remove the QoS policy attached to this network
+.. option:: --tag <tag>
+
+ Tag to be added to the network (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ Clear tags associated with the network. Specify both --tag
+ and --no-tag to overwrite current tags
+
.. _network_set-network:
.. describe:: <network>
@@ -412,3 +463,31 @@ Display network details
.. describe:: <network>
Network to display (name or ID)
+
+network unset
+-------------
+
+Unset network properties
+
+*Network version 2 only*
+
+.. program:: network unset
+.. code:: bash
+
+ openstack network unset
+ [--tag <tag> | --all-tag]
+ <network>
+
+.. option:: --tag <tag>
+
+ Tag to be removed from the network
+ (repeat option to remove multiple tags)
+
+.. option:: --all-tag
+
+ Clear all tags associated with the network
+
+.. _network_unset-network:
+.. describe:: <network>
+
+ Network to modify (name or ID)
diff --git a/doc/source/cli/command-objects/port.rst b/doc/source/cli/command-objects/port.rst
index 37814a95..c2da09b3 100644
--- a/doc/source/cli/command-objects/port.rst
+++ b/doc/source/cli/command-objects/port.rst
@@ -33,6 +33,7 @@ Create new port
[--qos-policy <qos-policy>]
[--project <project> [--project-domain <project-domain>]]
[--enable-port-security | --disable-port-security]
+ [--tag <tag> | --no-tag]
<name>
.. option:: --network <network>
@@ -126,6 +127,14 @@ Create new port
Disable port security for this port
+.. option:: --tag <tag>
+
+ Tag to be added to the port (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ No tags associated with the port
+
.. _port_create-name:
.. describe:: <name>
@@ -163,6 +172,8 @@ List ports
[--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
[--long]
[--project <project> [--project-domain <project-domain>]]
+ [--tags <tag>[,<tag>,...]] [--any-tags <tag>[,<tag>,...]]
+ [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]]
.. option:: --device-owner <device-owner>
@@ -204,6 +215,22 @@ List ports
Domain the project belongs to (name or ID).
This can be used in case collisions between project names exist.
+.. option:: --tags <tag>[,<tag>,...]
+
+ List ports which have all given tag(s)
+
+.. option:: --any-tags <tag>[,<tag>,...]
+
+ List ports which have any given tag(s)
+
+.. option:: --not-tags <tag>[,<tag>,...]
+
+ Exclude ports which have all given tag(s)
+
+.. option:: --not-any-tags <tag>[,<tag>,...]
+
+ Exclude ports which have any given tag(s)
+
port set
--------
@@ -233,6 +260,7 @@ Set port properties
[--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]]
[--no-allowed-address]
[--data-plane-status <status>]
+ [--tag <tag>] [--no-tag]
<port>
.. option:: --description <description>
@@ -342,6 +370,15 @@ Set port properties
Unset it to None with the 'port unset' command
(requires data plane status extension)
+.. option:: --tag <tag>
+
+ Tag to be added to the port (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ Clear tags associated with the port. Specify both --tag
+ and --no-tag to overwrite current tags
+
.. _port_set-port:
.. describe:: <port>
@@ -378,6 +415,7 @@ Unset port properties
[--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>] [...]]
[--qos-policy]
[--data-plane-status]
+ [--tag <tag> | --all-tag]
<port>
.. option:: --fixed-ip subnet=<subnet>,ip-address=<ip-address>
@@ -410,6 +448,15 @@ Unset port properties
Clear existing information of data plane status
+.. option:: --tag <tag>
+
+ Tag to be removed from the port
+ (repeat option to remove multiple tags)
+
+.. option:: --all-tag
+
+ Clear all tags associated with the port
+
.. _port_unset-port:
.. describe:: <port>
diff --git a/doc/source/cli/command-objects/router.rst b/doc/source/cli/command-objects/router.rst
index 8bdf81db..9c9364bc 100644
--- a/doc/source/cli/command-objects/router.rst
+++ b/doc/source/cli/command-objects/router.rst
@@ -67,6 +67,7 @@ Create new router
[--ha | --no-ha]
[--description <description>]
[--availability-zone-hint <availability-zone>]
+ [--tag <tag> | --no-tag]
<name>
.. option:: --project <project>
@@ -121,6 +122,14 @@ Create new router
(Router Availability Zone extension required,
repeat option to set multiple availability zones)
+.. option:: --tag <tag>
+
+ Tag to be added to the router (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ No tags associated with the router
+
.. _router_create-name:
.. describe:: <name>
@@ -156,6 +165,8 @@ List routers
[--long]
[--project <project> [--project-domain <project-domain>]]
[--agent <agent-id>]
+ [--tags <tag>[,<tag>,...]] [--any-tags <tag>[,<tag>,...]]
+ [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]]
.. option:: --agent <agent-id>
@@ -186,6 +197,22 @@ List routers
Domain the project belongs to (name or ID).
This can be used in case collisions between project names exist.
+.. option:: --tags <tag>[,<tag>,...]
+
+ List routers which have all given tag(s)
+
+.. option:: --any-tags <tag>[,<tag>,...]
+
+ List routers which have any given tag(s)
+
+.. option:: --not-tags <tag>[,<tag>,...]
+
+ Exclude routers which have all given tag(s)
+
+.. option:: --not-any-tags <tag>[,<tag>,...]
+
+ Exclude routers which have any given tag(s)
+
router remove port
------------------
@@ -246,6 +273,7 @@ Set router properties
[--route destination=<subnet>,gateway=<ip-address> | --no-route]
[--ha | --no-ha]
[--external-gateway <network> [--enable-snat|--disable-snat] [--fixed-ip subnet=<subnet>,ip-address=<ip-address>]]
+ [--tag <tag>] [--no-tag]
<router>
.. option:: --name <name>
@@ -311,6 +339,15 @@ Set router properties
subnet=<subnet>,ip-address=<ip-address>
(repeat option to set multiple fixed IP addresses)
+.. option:: --tag <tag>
+
+ Tag to be added to the router (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ Clear tags associated with the router. Specify both --tag
+ and --no-tag to overwrite current tags
+
.. _router_set-router:
.. describe:: <router>
@@ -343,6 +380,7 @@ Unset router properties
openstack router unset
[--route destination=<subnet>,gateway=<ip-address>]
[--external-gateway]
+ [--tag <tag> | --all-tag]
<router>
.. option:: --route destination=<subnet>,gateway=<ip-address>
@@ -356,6 +394,15 @@ Unset router properties
Remove external gateway information from the router
+.. option:: --tag <tag>
+
+ Tag to be removed from the router
+ (repeat option to remove multiple tags)
+
+.. option:: --all-tag
+
+ Clear all tags associated with the router
+
.. _router_unset-router:
.. describe:: <router>
diff --git a/doc/source/cli/command-objects/subnet-pool.rst b/doc/source/cli/command-objects/subnet-pool.rst
index 3a60974a..0cff4d7f 100644
--- a/doc/source/cli/command-objects/subnet-pool.rst
+++ b/doc/source/cli/command-objects/subnet-pool.rst
@@ -25,6 +25,7 @@ Create subnet pool
[--default | --no-default]
[--share | --no-share]
[--default-quota <num-ip-addresses>]
+ [--tag <tag> | --no-tag]
--pool-prefix <pool-prefix> [...]
<name>
@@ -79,6 +80,14 @@ Create subnet pool
Set default quota for subnet pool as the number of
IP addresses allowed in a subnet
+.. option:: --tag <tag>
+
+ Tag to be added to the subnet pool (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ No tags associated with the subnet pool
+
.. option:: --pool-prefix <pool-prefix>
Set subnet pool prefixes (in CIDR notation)
@@ -120,6 +129,8 @@ List subnet pools
[--project <project> [--project-domain <project-domain>]]
[--name <name>]
[--address-scope <address-scope>]
+ [--tags <tag>[,<tag>,...]] [--any-tags <tag>[,<tag>,...]]
+ [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]]
.. option:: --long
@@ -158,6 +169,22 @@ List subnet pools
List only subnet pools of given address scope in output (name or ID)
+.. option:: --tags <tag>[,<tag>,...]
+
+ List subnet pools which have all given tag(s)
+
+.. option:: --any-tags <tag>[,<tag>,...]
+
+ List subnet pools which have any given tag(s)
+
+.. option:: --not-tags <tag>[,<tag>,...]
+
+ Exclude subnet pools which have all given tag(s)
+
+.. option:: --not-any-tags <tag>[,<tag>,...]
+
+ Exclude subnet pools which have any given tag(s)
+
subnet pool set
---------------
@@ -176,6 +203,7 @@ Set subnet pool properties
[--default | --no-default]
[--description <description>]
[--default-quota <num-ip-addresses>]
+ [--tag <tag>] [--no-tag]
<subnet-pool>
.. option:: --name <name>
@@ -225,6 +253,15 @@ Set subnet pool properties
Set default quota for subnet pool as the number of
IP addresses allowed in a subnet
+.. option:: --tag <tag>
+
+ Tag to be added to the subnet pool (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ Clear tags associated with the subnet pool. Specify both --tag
+ and --no-tag to overwrite current tags
+
.. _subnet_pool_set-subnet-pool:
.. describe:: <subnet-pool>
@@ -256,6 +293,7 @@ Unset subnet pool properties
openstack subnet pool unset
[--pool-prefix <pool-prefix> [...]]
+ [--tag <tag> | --all-tag]
<subnet-pool>
.. option:: --pool-prefix <pool-prefix>
@@ -263,6 +301,15 @@ Unset subnet pool properties
Remove subnet pool prefixes (in CIDR notation).
(repeat option to unset multiple prefixes).
+.. option:: --tag <tag>
+
+ Tag to be removed from the subnet pool
+ (repeat option to remove multiple tags)
+
+.. option:: --all-tag
+
+ Clear all tags associated with the subnet pool
+
.. _subnet_pool_unset-subnet-pool:
.. describe:: <subnet-pool>
diff --git a/doc/source/cli/command-objects/subnet.rst b/doc/source/cli/command-objects/subnet.rst
index 4e609361..c228dc20 100644
--- a/doc/source/cli/command-objects/subnet.rst
+++ b/doc/source/cli/command-objects/subnet.rst
@@ -31,6 +31,7 @@ Create new subnet
[--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
[--network-segment <network-segment>]
[--service-type <service-type>]
+ [--tag <tag> | --no-tag]
--network <network>
<name>
@@ -125,6 +126,14 @@ Create new subnet
Must be a valid device owner value for a network port
(repeat option to set multiple service types)
+.. option:: --tag <tag>
+
+ Tag to be added to the subnet (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ No tags associated with the subnet
+
.. option:: --network <network>
Network this subnet belongs to (name or ID)
@@ -167,6 +176,8 @@ List subnets
[--gateway <gateway>]
[--name <name>]
[--subnet-range <subnet-range>]
+ [--tags <tag>[,<tag>,...]] [--any-tags <tag>[,<tag>,...]]
+ [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]]
.. option:: --long
@@ -218,6 +229,22 @@ List subnets
List only subnets of given subnet range (in CIDR notation) in output
e.g.: ``--subnet-range 10.10.0.0/16``
+.. option:: --tags <tag>[,<tag>,...]
+
+ List subnets which have all given tag(s)
+
+.. option:: --any-tags <tag>[,<tag>,...]
+
+ List subnets which have any given tag(s)
+
+.. option:: --not-tags <tag>[,<tag>,...]
+
+ Exclude subnets which have all given tag(s)
+
+.. option:: --not-any-tags <tag>[,<tag>,...]
+
+ Exclude subnets which have any given tag(s)
+
subnet set
----------
@@ -238,6 +265,7 @@ Set subnet properties
[--service-type <service-type>]
[--name <new-name>]
[--description <description>]
+ [--tag <tag>] [--no-tag]
<subnet>
.. option:: --allocation-pool start=<ip-address>,end=<ip-address>
@@ -305,6 +333,15 @@ Set subnet properties
Updated name of the subnet
+.. option:: --tag <tag>
+
+ Tag to be added to the subnet (repeat option to set multiple tags)
+
+.. option:: --no-tag
+
+ Clear tags associated with the subnet. Specify both --tag
+ and --no-tag to overwrite current tags
+
.. _subnet_set-subnet:
.. describe:: <subnet>
@@ -340,6 +377,7 @@ Unset subnet properties
[--dns-nameserver <dns-nameserver> [...]]
[--host-route destination=<subnet>,gateway=<ip-address> [...]]
[--service-type <service-type>]
+ [--tag <tag> | --all-tag]
<subnet>
.. option:: --dns-nameserver <dns-nameserver>
@@ -368,6 +406,15 @@ Unset subnet properties
Must be a valid device owner value for a network port
(repeat option to unset multiple service types)
+.. option:: --tag <tag>
+
+ Tag to be removed from the subnet
+ (repeat option to remove multiple tags)
+
+.. option:: --all-tag
+
+ Clear all tags associated with the subnet
+
.. _subnet_unset-subnet:
.. describe:: <subnet>