Jump to: navigation, search

Difference between revisions of "Neutron/LBaaS/CLI"

< Neutron‎ | LBaaS
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
/!\ '''Draft'''
 
 
 
<<[[TableOfContents]]()>>
 
<<[[TableOfContents]]()>>
  
 
= Scope =
 
= Scope =
  
This document describes commands that will be introduced into python-quantumclient in order to support LBaaS advanced service. The implementation is proposed to be extensible to support different types of Quantum advanced services.
+
This document describes commands that will be introduced into python-quantumclient in order to support LBaaS advanced service.  
  
 
= Implementation Details =
 
= Implementation Details =
  
In the upcoming Grizzly release Quantum core will be extended by advanced service framework. The similar extension mechanism will be introduced into the Client in order to support new REST API operations.
+
All LBaaS commands have prefix ''lb-'' in order to avoid ambiguity. The set of commands corresponds to [[Quantum/LBaaS/API_1.0]]:
 
 
The extension framework is responsible for enumerating and loading extensions. Every extension announces itself with command prefix and set of supported commands. The resulting command have format <code><nowiki> [service] command </nowiki></code>, where ''service'' part may be optional and needed only to avoid interference with other extensions.
 
 
 
In interactive mode user may specify what extension to use (in order to minimize the number of accessible commands). Note that it is not proposed to use sub-shell, since it would be harder in usage and implementation.
 
 
 
== LBaaS Command List ==
 
 
 
The command set corresponds to [[Quantum/LBaaS/API_1.0]]
 
  
  
 
<pre><nowiki>
 
<pre><nowiki>
   healthmonitor-create        Create a healthmonitor
+
   lb-healthmonitor-create        Create a health monitor
   healthmonitor-delete        Delete a given healthmonitor
+
   lb-healthmonitor-delete        Delete a given health monitor
   healthmonitor-list          List healthmonitors that belong to a given tenant
+
   lb-healthmonitor-list          List health monitors that belong to a given tenant
   healthmonitor-show          Show information of a given healthmonitor
+
   lb-healthmonitor-show          Show information of a given health monitor
   healthmonitor-update        Update healthmonitor's information
+
   lb-healthmonitor-update        Update health monitor's information
  
   healthmonitor-associate    Associate a healthmonitor with a pool
+
   lb-healthmonitor-associate    Associate a health monitor with a pool
   healthmonitor-disassociate  Disassociate a healthmonitor with a pool
+
   lb-healthmonitor-disassociate  Disassociate a health monitor with a pool
  
   member-create              Create a member
+
   lb-member-create              Create a member
   member-delete              Delete a given member
+
   lb-member-delete              Delete a given member
   member-list                List members that belong to a given tenant
+
   lb-member-list                List members that belong to a given tenant
   member-show                Show information of a given member
+
   lb-member-show                Show information of a given member
   member-update              Update member's information
+
   lb-member-update              Update member's information
  
   pool-create                Create a pool
+
   lb-pool-create                Create a pool
   pool-delete                Delete a given pool
+
   lb-pool-delete                Delete a given pool
   pool-list                  List pools that belong to a given tenant
+
   lb-pool-list                  List pools that belong to a given tenant
   pool-show                  Show information of a given pool
+
   lb-pool-show                  Show information of a given pool
   pool-update                Update pool's information
+
   lb-pool-update                Update pool's information
  
   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>
  
  
=== healthmonitor-create ===
+
== lb-healthmonitor-create ==
  
This command creates a new healthmonitor object.
+
Create a new health monitor object.
  
  
 
<pre><nowiki>
 
<pre><nowiki>
healthmonitor-create --type <type> --delay <delay> --max_retries <max_retries> [--timeout <timeout>] <name>
+
lb-healthmonitor-create --type <type> --delay <delay> --max_retries <max_retries> --timeout <timeout> [--http_method <http method>] [--path <path>] [--expected-codes <expected codes>]
 
</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.
 
* '''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".
  
=== healthmonitor-delete ===
+
== lb-healthmonitor-delete ==
 
This command deletes a given healthmonitor object.
 
This command deletes a given healthmonitor object.
  
 
<pre><nowiki>
 
<pre><nowiki>
healthmonitor-delete <healthmonitor-id>
+
lb-healthmonitor-delete <healthmonitor-id>
 
</nowiki></pre>
 
</nowiki></pre>
  
  
=== healthmonitor-list ===
+
== lb-healthmonitor-list ==
 
This command shows list of health monitor objects available to tenant.
 
This command shows list of health monitor objects available to tenant.
  
 
<pre><nowiki>
 
<pre><nowiki>
healthmonitor-list
+
lb-healthmonitor-list
 
</nowiki></pre>
 
</nowiki></pre>
  
  
=== healthmonitor-show ===
+
== lb-healthmonitor-show ==
 
This command shows information about a given health monitor object.
 
This command 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>
  
  
=== healthmonitor-update ===
+
== lb-healthmonitor-update ==
 
This command updates information of a given health monitor object.
 
This command updates information of a given health monitor object.
  
 
<pre><nowiki>
 
<pre><nowiki>
healthmonitor-update [--type <type>] [--delay <delay>] [--max_retries <max_retries>] [--timeout <timeout>] [--name <name>] <healthmonitor-id>
+
lb-healthmonitor-update [--type <type>] [--delay <delay>] [--max_retries <max_retries>] [--timeout <timeout>] [--name <name>] [--http_method <http method>] [--path <path>] [--expected-codes <expected codes>] <healthmonitor-id>
 
</nowiki></pre>
 
</nowiki></pre>
  
  
=== healthmonitor-associate ===
+
== 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>
  
  
=== healthmonitor-disassociate ===
+
== 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>
  
  
=== member-create ===
+
== 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> --port <tcp port> [--weight <weight>] [--admin-state <UP|DOWN>] <pool-id>
 
</nowiki></pre>
 
</nowiki></pre>
  
  
* address: the IP address of the pool member on the pool's network.
+
* '''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.
+
* '''port''': The port on which the pool member listens for requests or connections.
* pool_id: The pool to which the member is added.
+
* '''weight''': The weight of pool member in the pool.
 +
* '''admin-state''': Specifies the state of member, by default UP.
 +
* '''pool_id''': The pool to which the member is added.
  
=== member-delete ===
+
 
 +
<pre><nowiki>#!wiki note
 +
Quantum port has parameter ''admin-state-down''. We may use it instead of ''admin-state''
 +
</nowiki></pre>
 +
 
 +
 
 +
== 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>
  
  
=== member-list ===
+
== 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>
  
  
=== member-show ===
+
== 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>
  
  
=== member-update ===
+
== lb-member-update ==
 
Update member's information
 
Update member's information
  
 
<pre><nowiki>
 
<pre><nowiki>
member-update [--address <IP>] [--port <tcp port>] <pool-id>
+
lb-member-update [--pool-id <pool id>] [--weight <weight>] [--admin-state <UP|DOWN>] <member-id>
 
</nowiki></pre>
 
</nowiki></pre>
  
  
=== pool-create ===
+
== lb-pool-create ==
 
Create a pool
 
Create a pool
  
 
<pre><nowiki>
 
<pre><nowiki>
pool-create [--network-id <network-id>] [--lb-method <lb-method>] [--protocol <protocol>] <name>
+
lb-pool-create [--network-id <network-id>] [--lb-method <lb-method>] [--protocol <protocol>] <name>
 
</nowiki></pre>
 
</nowiki></pre>
  
Line 170: Line 172:
 
* protocol: The protocol used by the pool members
 
* protocol: The protocol used by the pool members
  
=== pool-delete ===
+
== 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>
  
  
=== pool-list ===
+
== 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>
  
  
=== pool-show ===
+
== 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>
 
</nowiki></pre>
  
  
=== pool-update ===
+
== lb-pool-update ==
 
Update pool's information
 
Update pool's information
  
 
<pre><nowiki>
 
<pre><nowiki>
pool-update [--network-id <network-id>] [--lb-method <lb-method>] [--protocol <protocol>] [--name <name>]
+
lb-pool-update [--lb-method <lb-method>] [--name <name>] <pool-id>
 +
</nowiki></pre>
 +
 
 +
 
 +
 
 +
<pre><nowiki>#!wiki note
 +
[[Quantum/LBaaS/API_1.0#Update_a_Pool]] also mentions ''description'' attribute, but it is missed in creation operation.
 
</nowiki></pre>
 
</nowiki></pre>
  
  
=== vip-create ===
+
== lb-vip-create ==
 
Create a vip
 
Create a vip
  
 
<pre><nowiki>
 
<pre><nowiki>
vip-create --network-id <network-id> --protocol <protocol> --port <tcp port> <pool-id>
+
lb-vip-create --network-id <network-id> --protocol <protocol> --port <tcp port> --name <name> [--connection-limit <connection limit>] [--admin-state <UP|DOWN>] [--session-persistence <session-persistence-type>] <pool-id>  
 
</nowiki></pre>
 
</nowiki></pre>
  
  
* network_id: The network on which to allocate the vip's address. A tenant can only create vips on networks authorized by policy (e.g. her own  networks or shared/provider networks).
+
* '''network_id''': The network on which to allocate the vip's address. A tenant can only create vips on networks authorized by policy (e.g. her own  networks or shared/provider networks).
* 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.
+
* '''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.
+
* '''connection-limit''': the maximum number of connections per second allowed for the vip.
 +
* '''admin-state''': initial state of vip, by default UP
 +
* '''session-persistence''': the type of session persistence applied to traffic.
 +
* '''pool_id''': the id of the pool that contains the real servers to which traffic is load balanced.
  
=== vip-delete ===
+
== 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>
  
  
=== vip-list ===
+
== 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>
  
  
=== vip-show ===
+
== 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>
  
  
=== vip-update ===
+
== lb-vip-update ==
 
Update vip's information
 
Update vip's information
  
 
<pre><nowiki>
 
<pre><nowiki>
vip-update [--network-id <network-id>] [--protocol <protocol>] [--port <tcp port>] [--pool-id <pool-id>] [--name <name>]
+
lb-vip-update [--connection-limit <connection limit>] [--admin-state <UP|DOWN>] [--session-persistence <session-persistence-type>] [--pool-id <pool-id>] [--name <name>] <vip-id>
 
</nowiki></pre>
 
</nowiki></pre>

Revision as of 16:34, 14 November 2012

<<TableOfContents()>>

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-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


lb-healthmonitor-create

Create a new health monitor object.


lb-healthmonitor-create --type <type> --delay <delay> --max_retries <max_retries> --timeout <timeout> [--http_method <http method>] [--path <path>] [--expected-codes <expected codes>]


  • 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".

lb-healthmonitor-delete

This command deletes a given healthmonitor object.

lb-healthmonitor-delete <healthmonitor-id>


lb-healthmonitor-list

This command shows list of health monitor objects available to tenant.

lb-healthmonitor-list


lb-healthmonitor-show

This command shows information about a given health monitor object.

lb-healthmonitor-show <healthmonitor-id>


lb-healthmonitor-update

This command updates information of a given health monitor object.

lb-healthmonitor-update [--type <type>] [--delay <delay>] [--max_retries <max_retries>] [--timeout <timeout>] [--name <name>] [--http_method <http method>] [--path <path>] [--expected-codes <expected codes>] <healthmonitor-id>


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> --port <tcp port> [--weight <weight>] [--admin-state <UP|DOWN>] <pool-id>


  • 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.
  • weight: The weight of pool member in the pool.
  • admin-state: Specifies the state of member, by default UP.
  • pool_id: The pool to which the member is added.


#!wiki note
 Quantum port has parameter ''admin-state-down''. We may use it instead of ''admin-state''


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 [--pool-id <pool id>] [--weight <weight>] [--admin-state <UP|DOWN>] <member-id>


lb-pool-create

Create a pool

lb-pool-create [--network-id <network-id>] [--lb-method <lb-method>] [--protocol <protocol>] <name>


  • name: name of the pool
  • network_id: The network on which the members of the pool will be located. Only members that are on this network 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

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-update

Update pool's information

lb-pool-update [--lb-method <lb-method>] [--name <name>] <pool-id>


#!wiki note
 [[Quantum/LBaaS/API_1.0#Update_a_Pool]] also mentions ''description'' attribute, but it is missed in creation operation. 


lb-vip-create

Create a vip

lb-vip-create --network-id <network-id> --protocol <protocol> --port <tcp port> --name <name> [--connection-limit <connection limit>] [--admin-state <UP|DOWN>] [--session-persistence <session-persistence-type>] <pool-id> 


  • network_id: The network on which to allocate the vip's address. A tenant can only create vips on networks authorized by policy (e.g. her own networks or shared/provider networks).
  • protocol: the protocol of the vip address.
  • port: the port on which to listen for client traffic that is associated with the vip address.
  • connection-limit: the maximum number of connections per second allowed for the vip.
  • admin-state: initial state of vip, by default UP
  • session-persistence: the type of session persistence applied to traffic.
  • pool_id: the id of the pool that contains the real servers to which traffic is load balanced.

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 [--connection-limit <connection limit>] [--admin-state <UP|DOWN>] [--session-persistence <session-persistence-type>] [--pool-id <pool-id>] [--name <name>] <vip-id>