Difference between revisions of "Neutron/LBaaS/CLI"
m (ThierryCarrez moved page Quantum/LBaaS/CLI to Neutron/LBaaS/CLI) |
|||
(18 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
− | + | __TOC__ | |
= Scope = | = Scope = | ||
− | This document describes commands that will be introduced into python-quantumclient in order to support LBaaS advanced service | + | This document describes commands that will be introduced into python-quantumclient in order to support LBaaS advanced service. |
= Implementation Details = | = Implementation Details = | ||
− | + | All LBaaS commands have prefix ''lb-'' in order to avoid ambiguity. The set of commands corresponds to [[Quantum/LBaaS/API_1.0]]: | |
− | |||
− | + | <pre><nowiki> | |
− | + | lb-healthmonitor-create Create a health monitor | |
− | + | lb-healthmonitor-delete Delete a given health monitor | |
− | + | lb-healthmonitor-list List health monitors that belong to a given tenant | |
− | + | lb-healthmonitor-show Show information of a given health monitor | |
+ | lb-healthmonitor-update Update health monitor's information | ||
+ | lb-healthmonitor-associate Associate a health monitor with a pool | ||
+ | lb-healthmonitor-disassociate Disassociate a health monitor with a pool | ||
− | + | lb-member-create Create a member | |
− | + | lb-member-delete Delete a given member | |
− | + | lb-member-list List members that belong to a given tenant | |
− | + | lb-member-show Show information of a given member | |
− | + | lb-member-update Update member's information | |
− | |||
− | |||
− | |||
− | |||
− | + | lb-pool-create Create a pool | |
− | + | lb-pool-delete Delete a given pool | |
− | + | lb-pool-list List pools that belong to a given tenant | |
− | + | lb-pool-show Show information of a given pool | |
− | + | lb-pool-update Update pool's information | |
− | + | lb-pool-stats Retrieve traffic statistics for pool | |
− | |||
− | |||
− | |||
− | |||
− | vip-create Create a vip | + | lb-vip-create Create a vip |
− | vip-delete Delete a given vip | + | lb-vip-delete Delete a given vip |
− | vip-list List vips that belong to a given tenant | + | lb-vip-list List vips that belong to a given tenant |
− | vip-show Show information of a given vip | + | lb-vip-show Show information of a given vip |
− | vip-update Update vip's information | + | lb-vip-update Update vip's information |
</nowiki></pre> | </nowiki></pre> | ||
+ | = Command Specification = | ||
− | == | + | == lb-healthmonitor-create == |
− | + | Create a new health monitor object. | |
<pre><nowiki> | <pre><nowiki> | ||
− | healthmonitor-create --type <type> --delay <delay> -- | + | lb-healthmonitor-create --type <type> --delay <delay> --max-retries <max retries> --timeout <timeout> [--admin-state-down] [--http-method <http method>] [--url-path <url path>] [--expected-codes <expected codes>] [--tenant-id <tenant id>] |
</nowiki></pre> | </nowiki></pre> | ||
+ | * '''type''': One of predefined health monitor types | ||
* '''delay''': This is the minimum time in seconds between regular connections of the member. | * '''delay''': This is the minimum time in seconds between regular connections of the member. | ||
* '''timeout''': Maximum number of seconds for a monitor to wait for a connection to be established before it times out. The value must be less than the delay value. | * '''timeout''': Maximum number of seconds for a monitor to wait for a connection to be established before it times out. The value must be less than the delay value. | ||
− | * ''' | + | * '''max-retries''': Number of permissible connection failures before changing the member's status to INACTIVE. Must be a number between 1 and 10. |
+ | * '''http-method''': The HTTP method used for requests by the monitor of type HTTP. If this attribute is not specified, it defaults to "GET". | ||
+ | * '''url-path''': The HTTP path used in the HTTP request used by the monitor to test a member's health. This must be a string beginning with a / (forward slash). If this is not specified it defaults to "/". | ||
+ | * '''expected-codes''': These are the list of HTTP status codes expected in response from the member to declare it healthy. This attribute can contain one value, or a list of values separated by comma, or a range of values (e.g. "200-299"). If this attribute is not specified, it defaults to "200". | ||
+ | * '''tenant-id''': ID of tenant that owns the health monitor | ||
− | == | + | == lb-healthmonitor-delete == |
− | + | Delete a given healthmonitor object. | |
<pre><nowiki> | <pre><nowiki> | ||
− | healthmonitor-delete <healthmonitor-id> | + | lb-healthmonitor-delete <healthmonitor-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-healthmonitor-list == |
− | + | Show list of health monitor objects available to tenant. | |
<pre><nowiki> | <pre><nowiki> | ||
− | healthmonitor-list | + | lb-healthmonitor-list |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-healthmonitor-show == |
− | + | Shows information about a given health monitor object. | |
<pre><nowiki> | <pre><nowiki> | ||
− | healthmonitor-show <healthmonitor-id> | + | lb-healthmonitor-show <healthmonitor-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-healthmonitor-update == |
− | + | Update information of a given health monitor object. | |
<pre><nowiki> | <pre><nowiki> | ||
− | healthmonitor-update [-- | + | lb-healthmonitor-update <healthmonitor-id> [--admin-state-down] [--delay <delay>] [--max-retries <max retries>] [--timeout <timeout>] [--name <name>] [--http-method <http method>] [--url-path <url path>] [--expected-codes <expected codes>] |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-healthmonitor-associate == |
Associate a healthmonitor with a pool. | Associate a healthmonitor with a pool. | ||
<pre><nowiki> | <pre><nowiki> | ||
− | healthmonitor-associate <healthmonitor-id> <pool-id> | + | lb-healthmonitor-associate <healthmonitor-id> <pool-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-healthmonitor-disassociate == |
Disassociate a healthmonitor with a pool. | Disassociate a healthmonitor with a pool. | ||
<pre><nowiki> | <pre><nowiki> | ||
− | healthmonitor-disassociate <healthmonitor-id> <pool-id> | + | lb-healthmonitor-disassociate <healthmonitor-id> <pool-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-member-create == |
Create a member | Create a member | ||
<pre><nowiki> | <pre><nowiki> | ||
− | member-create --address <IP> --port <tcp port> <pool-id> | + | lb-member-create --address <IP> --protocol-port <tcp port> [--weight <weight>] [--admin-state-down] [--tenant-id <tenant id>] <pool-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | * address: | + | * '''address''': The IP address of the pool member on the pool's network. |
− | * port: The port on which the pool member listens for requests or connections. | + | * '''protocol-port''': The port on which the pool member listens for requests or connections. |
− | * | + | * '''weight''': The weight of pool member in the pool. |
+ | * '''pool-id''': The pool to which the member is added. | ||
+ | * '''tenant-id''': ID of tenant that owns the member | ||
− | == | + | == lb-member-delete == |
Delete a given member | Delete a given member | ||
<pre><nowiki> | <pre><nowiki> | ||
− | member-delete <member-id> | + | lb-member-delete <member-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-member-list == |
List members that belong to a given tenant | List members that belong to a given tenant | ||
<pre><nowiki> | <pre><nowiki> | ||
− | member-list | + | lb-member-list |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-member-show == |
Show information of a given member | Show information of a given member | ||
<pre><nowiki> | <pre><nowiki> | ||
− | member-show <member-id> | + | lb-member-show <member-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-member-update == |
Update member's information | Update member's information | ||
<pre><nowiki> | <pre><nowiki> | ||
− | member-update [-- | + | lb-member-update <member-id> [--admin-state-down] [--pool-id <pool id>] [--weight <weight>] [--admin-state <UP|DOWN>] |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-pool-create == |
Create a pool | Create a pool | ||
<pre><nowiki> | <pre><nowiki> | ||
− | pool-create | + | lb-pool-create --subnet-id <subnet-id> --lb-method <lb-method> --protocol <protocol> --name <name> [--admin-state-down] [--description <description>] [--tenant-id <tenant id>] [-- [--health_monitors {<id>}]] |
</nowiki></pre> | </nowiki></pre> | ||
− | * name: name of the pool | + | * '''name''': name of the pool |
− | * | + | * '''subnet_id''': The subnet on which the members of the pool will be located. Only members that are on this subnet can be added to the pool. |
− | * lb_method: The algorithm used to distribute load between the members of the pool. | + | * '''lb_method''': The algorithm used to distribute load between the members of the pool. |
− | * protocol: The protocol used by the pool members | + | * '''protocol''': The protocol used by the pool members |
+ | * '''description''': Human-readable description of the pool | ||
+ | * '''tenant-id''': ID of tenant that owns the pool | ||
+ | |||
+ | The operation may also associate health monitors to the created pool, to achieve this a list of monitor ids needs to be specified in positional argument ''--health_monitors''. | ||
− | == | + | == lb-pool-delete == |
Delete a given pool | Delete a given pool | ||
<pre><nowiki> | <pre><nowiki> | ||
− | pool-delete <pool-id> | + | lb-pool-delete <pool-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-pool-list == |
List pools that belong to a given tenant | List pools that belong to a given tenant | ||
<pre><nowiki> | <pre><nowiki> | ||
− | pool-list | + | lb-pool-list |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-pool-show == |
Show information of a given pool | Show information of a given pool | ||
<pre><nowiki> | <pre><nowiki> | ||
− | pool-show <pool-id> | + | lb-pool-show <pool-id> |
+ | </nowiki></pre> | ||
+ | |||
+ | |||
+ | == lb-pool-stats == | ||
+ | Retrieve traffic statistics for a given pool | ||
+ | |||
+ | <pre><nowiki> | ||
+ | lb-pool-stats <pool-id> | ||
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-pool-update == |
Update pool's information | Update pool's information | ||
<pre><nowiki> | <pre><nowiki> | ||
− | pool-update [-- | + | lb-pool-update <pool-id> [--admin-state-down] [--lb-method <lb-method>] [--description <description>] [--name <name>] |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-vip-create == |
Create a vip | Create a vip | ||
<pre><nowiki> | <pre><nowiki> | ||
− | vip-create -- | + | lb-vip-create --subnet-id <subnet-id> --protocol <protocol> --protocol-port <tcp port> --name <name> [--address <address>] [--admin-state-down] [--connection-limit <connection limit>] [--description <description>] [--tenant-id <tenant id>] <pool-id> [--session-persistence type=dict type=<type>,[cookie_name=<name>]] |
</nowiki></pre> | </nowiki></pre> | ||
− | * | + | * '''subnet_id''': The subnet on which to allocate the vip's address. A tenant can only create vips on subnets authorized by policy. |
− | * protocol: the protocol of the vip address. | + | * '''protocol''': the protocol of the vip address. |
− | * port: the port on which to listen for client traffic that is associated with the vip address. | + | * '''protocol-port''': the port on which to listen for client traffic that is associated with the vip address. |
− | * pool_id: the id of the pool that contains the real servers to which traffic is load balanced. | + | * '''address''': IP address of the vip |
+ | * '''connection-limit''': the maximum number of connections per second allowed for the vip. | ||
+ | * '''description''': human-readable description of the vip | ||
+ | * '''pool_id''': the id of the pool that contains the real servers to which traffic is load balanced. | ||
+ | * '''tenant-id''': ID of tenant that owns the vip | ||
+ | * '''session-persistence''': dictionary with session persistence parameters, e.g.: | ||
+ | ** '''type''': the type of session persistence applied to traffic. | ||
+ | ** '''cookie-name''': the name of cookie for cookie-based session persistence. | ||
− | == | + | == lb-vip-delete == |
Delete a given vip | Delete a given vip | ||
<pre><nowiki> | <pre><nowiki> | ||
− | vip-delete <vip-id> | + | lb-vip-delete <vip-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-vip-list == |
List vips that belong to a given tenant | List vips that belong to a given tenant | ||
<pre><nowiki> | <pre><nowiki> | ||
− | vip-list | + | lb-vip-list |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-vip-show == |
Show information of a given vip | Show information of a given vip | ||
<pre><nowiki> | <pre><nowiki> | ||
− | vip-show <vip-id> | + | lb-vip-show <vip-id> |
</nowiki></pre> | </nowiki></pre> | ||
− | == | + | == lb-vip-update == |
Update vip's information | Update vip's information | ||
<pre><nowiki> | <pre><nowiki> | ||
− | vip-update [-- | + | lb-vip-update <vip-id> [--address <address>] [--admin-state-down] [--connection-limit <connection limit>] [--description <description>] [--pool-id <pool-id>] [--name <name>] [--session-persistence-disable] [--session-persistence type=dict type=<type>,[cookie_name=<name>]] |
</nowiki></pre> | </nowiki></pre> |
Latest revision as of 15:54, 21 June 2013
Contents
- 1 Scope
- 2 Implementation Details
- 3 Command Specification
- 3.1 lb-healthmonitor-create
- 3.2 lb-healthmonitor-delete
- 3.3 lb-healthmonitor-list
- 3.4 lb-healthmonitor-show
- 3.5 lb-healthmonitor-update
- 3.6 lb-healthmonitor-associate
- 3.7 lb-healthmonitor-disassociate
- 3.8 lb-member-create
- 3.9 lb-member-delete
- 3.10 lb-member-list
- 3.11 lb-member-show
- 3.12 lb-member-update
- 3.13 lb-pool-create
- 3.14 lb-pool-delete
- 3.15 lb-pool-list
- 3.16 lb-pool-show
- 3.17 lb-pool-stats
- 3.18 lb-pool-update
- 3.19 lb-vip-create
- 3.20 lb-vip-delete
- 3.21 lb-vip-list
- 3.22 lb-vip-show
- 3.23 lb-vip-update
Scope
This document describes commands that will be introduced into python-quantumclient in order to support LBaaS advanced service.
Implementation Details
All LBaaS commands have prefix lb- in order to avoid ambiguity. The set of commands corresponds to Quantum/LBaaS/API_1.0:
lb-healthmonitor-create Create a health monitor lb-healthmonitor-delete Delete a given health monitor lb-healthmonitor-list List health monitors that belong to a given tenant lb-healthmonitor-show Show information of a given health monitor lb-healthmonitor-update Update health monitor's information lb-healthmonitor-associate Associate a health monitor with a pool lb-healthmonitor-disassociate Disassociate a health monitor with a pool lb-member-create Create a member lb-member-delete Delete a given member lb-member-list List members that belong to a given tenant lb-member-show Show information of a given member lb-member-update Update member's information lb-pool-create Create a pool lb-pool-delete Delete a given pool lb-pool-list List pools that belong to a given tenant lb-pool-show Show information of a given pool lb-pool-update Update pool's information lb-pool-stats Retrieve traffic statistics for pool lb-vip-create Create a vip lb-vip-delete Delete a given vip lb-vip-list List vips that belong to a given tenant lb-vip-show Show information of a given vip lb-vip-update Update vip's information
Command Specification
lb-healthmonitor-create
Create a new health monitor object.
lb-healthmonitor-create --type <type> --delay <delay> --max-retries <max retries> --timeout <timeout> [--admin-state-down] [--http-method <http method>] [--url-path <url path>] [--expected-codes <expected codes>] [--tenant-id <tenant id>]
- type: One of predefined health monitor types
- delay: This is the minimum time in seconds between regular connections of the member.
- timeout: Maximum number of seconds for a monitor to wait for a connection to be established before it times out. The value must be less than the delay value.
- max-retries: Number of permissible connection failures before changing the member's status to INACTIVE. Must be a number between 1 and 10.
- http-method: The HTTP method used for requests by the monitor of type HTTP. If this attribute is not specified, it defaults to "GET".
- url-path: The HTTP path used in the HTTP request used by the monitor to test a member's health. This must be a string beginning with a / (forward slash). If this is not specified it defaults to "/".
- expected-codes: These are the list of HTTP status codes expected in response from the member to declare it healthy. This attribute can contain one value, or a list of values separated by comma, or a range of values (e.g. "200-299"). If this attribute is not specified, it defaults to "200".
- tenant-id: ID of tenant that owns the health monitor
lb-healthmonitor-delete
Delete a given healthmonitor object.
lb-healthmonitor-delete <healthmonitor-id>
lb-healthmonitor-list
Show list of health monitor objects available to tenant.
lb-healthmonitor-list
lb-healthmonitor-show
Shows information about a given health monitor object.
lb-healthmonitor-show <healthmonitor-id>
lb-healthmonitor-update
Update information of a given health monitor object.
lb-healthmonitor-update <healthmonitor-id> [--admin-state-down] [--delay <delay>] [--max-retries <max retries>] [--timeout <timeout>] [--name <name>] [--http-method <http method>] [--url-path <url path>] [--expected-codes <expected codes>]
lb-healthmonitor-associate
Associate a healthmonitor with a pool.
lb-healthmonitor-associate <healthmonitor-id> <pool-id>
lb-healthmonitor-disassociate
Disassociate a healthmonitor with a pool.
lb-healthmonitor-disassociate <healthmonitor-id> <pool-id>
lb-member-create
Create a member
lb-member-create --address <IP> --protocol-port <tcp port> [--weight <weight>] [--admin-state-down] [--tenant-id <tenant id>] <pool-id>
- address: The IP address of the pool member on the pool's network.
- protocol-port: The port on which the pool member listens for requests or connections.
- weight: The weight of pool member in the pool.
- pool-id: The pool to which the member is added.
- tenant-id: ID of tenant that owns the member
lb-member-delete
Delete a given member
lb-member-delete <member-id>
lb-member-list
List members that belong to a given tenant
lb-member-list
lb-member-show
Show information of a given member
lb-member-show <member-id>
lb-member-update
Update member's information
lb-member-update <member-id> [--admin-state-down] [--pool-id <pool id>] [--weight <weight>] [--admin-state <UP|DOWN>]
lb-pool-create
Create a pool
lb-pool-create --subnet-id <subnet-id> --lb-method <lb-method> --protocol <protocol> --name <name> [--admin-state-down] [--description <description>] [--tenant-id <tenant id>] [-- [--health_monitors {<id>}]]
- name: name of the pool
- subnet_id: The subnet on which the members of the pool will be located. Only members that are on this subnet can be added to the pool.
- lb_method: The algorithm used to distribute load between the members of the pool.
- protocol: The protocol used by the pool members
- description: Human-readable description of the pool
- tenant-id: ID of tenant that owns the pool
The operation may also associate health monitors to the created pool, to achieve this a list of monitor ids needs to be specified in positional argument --health_monitors.
lb-pool-delete
Delete a given pool
lb-pool-delete <pool-id>
lb-pool-list
List pools that belong to a given tenant
lb-pool-list
lb-pool-show
Show information of a given pool
lb-pool-show <pool-id>
lb-pool-stats
Retrieve traffic statistics for a given pool
lb-pool-stats <pool-id>
lb-pool-update
Update pool's information
lb-pool-update <pool-id> [--admin-state-down] [--lb-method <lb-method>] [--description <description>] [--name <name>]
lb-vip-create
Create a vip
lb-vip-create --subnet-id <subnet-id> --protocol <protocol> --protocol-port <tcp port> --name <name> [--address <address>] [--admin-state-down] [--connection-limit <connection limit>] [--description <description>] [--tenant-id <tenant id>] <pool-id> [--session-persistence type=dict type=<type>,[cookie_name=<name>]]
- subnet_id: The subnet on which to allocate the vip's address. A tenant can only create vips on subnets authorized by policy.
- protocol: the protocol of the vip address.
- protocol-port: the port on which to listen for client traffic that is associated with the vip address.
- address: IP address of the vip
- connection-limit: the maximum number of connections per second allowed for the vip.
- description: human-readable description of the vip
- pool_id: the id of the pool that contains the real servers to which traffic is load balanced.
- tenant-id: ID of tenant that owns the vip
- session-persistence: dictionary with session persistence parameters, e.g.:
- type: the type of session persistence applied to traffic.
- cookie-name: the name of cookie for cookie-based session persistence.
lb-vip-delete
Delete a given vip
lb-vip-delete <vip-id>
lb-vip-list
List vips that belong to a given tenant
lb-vip-list
lb-vip-show
Show information of a given vip
lb-vip-show <vip-id>
lb-vip-update
Update vip's information
lb-vip-update <vip-id> [--address <address>] [--admin-state-down] [--connection-limit <connection limit>] [--description <description>] [--pool-id <pool-id>] [--name <name>] [--session-persistence-disable] [--session-persistence type=dict type=<type>,[cookie_name=<name>]]