Add some client documentation

This commit is contained in:
Andrew Hutchings 2012-10-16 14:42:53 -07:00
parent 7d05228d81
commit f4518f6702
4 changed files with 116 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ dist
build
.cache
*.swp
doc/html

111
doc/client.rst Normal file
View File

@ -0,0 +1,111 @@
Libra Client
============
Synopsis
--------
Description
-----------
:program:`libra_client.py` [:ref:`OPTIONS <libra_client-options>`] [:ref:`COMMAND <libra_client-commands>`]
.. _libra_client-options:
Global Options
--------------
.. program:: libra_client.py
.. option:: --help, -h
Show help message and exit
.. option:: --os_auth_url <auth-url>
The OpenStack authentication URL
.. option:: --os_username <auth-user-name>
The user name to use for authentication
.. option:: --os_password <auth-password>
The password to use for authentication
.. option:: --os_tenant_name <auth-tenant-name>
The tenant to authenticate to
.. option:: --os_region_name <region-name>
The region the load balancer is located
.. _libra_client-commands:
Client Commands
---------------
======= ==================
Command Required Parameter
======= ==================
list
create loadbalancerID
modify loadbalancerID
status loadbalancerID
======= ==================
.. program:: libra_client.py create
create
^^^^^^
Create a load balancer
.. option:: --name <name>
The name of the node to be created
.. option:: --port <port>
The port the load balancer will listen on
.. option:: --protocol <protocol>
The protocol type for the load balancer (HTTP or TCP)
.. option:: --node <ip:port>
The IP and port for a load balancer node (can be used multiple times)
.. option:: --vip <vip>
The virtual IP ID of an existing load balancer to attach to
.. program:: libra_client.py modify
modify
^^^^^^
Update a load balancer's configuration
.. option:: --name <name>
A new name for the load balancer
.. option:: --algorithm <algorithm>
A new algorithm for the load balancer
.. program:: libra_clien.py list
list
^^^^
List all load balancers
.. program:: libra_client.py status
status
^^^^^^
Get the status of a single load balancer

View File

@ -3,3 +3,5 @@ Load Balancer as a Service Device Tools
.. toctree::
:maxdepth: 2
client

View File

@ -77,7 +77,7 @@ class ClientOptions(object):
sp = subparsers.add_parser(
'modify', help='modify a load balancer'
)
sp.add_argument('lbid', help='load balancer ID', required=True)
sp.add_argument('lbid', help='load balancer ID')
sp.add_argument('--name', help='new name for the load balancer')
sp.add_argument('--algorithm',
help='new algorithm for the load balancer',
@ -85,7 +85,7 @@ class ClientOptions(object):
sp = subparsers.add_parser(
'status', help='get status of a load balancer'
)
sp.add_argument('lbid', help='load balancer ID', required=True)
sp.add_argument('lbid', help='load balancer ID')
subparsers.add_parser(
'node-list', help='list nodes in a load balancer'
)