Add and document all the rest of the client options
This commit is contained in:
103
doc/client.rst
103
doc/client.rst
@@ -48,15 +48,6 @@ Global Options
|
|||||||
Client Commands
|
Client Commands
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
======= ==================
|
|
||||||
Command Required Parameter
|
|
||||||
======= ==================
|
|
||||||
list None
|
|
||||||
create loadbalancerID
|
|
||||||
modify loadbalancerID
|
|
||||||
status loadbalancerID
|
|
||||||
======= ==================
|
|
||||||
|
|
||||||
.. program:: libra_client.py create
|
.. program:: libra_client.py create
|
||||||
|
|
||||||
create
|
create
|
||||||
@@ -91,6 +82,10 @@ modify
|
|||||||
|
|
||||||
Update a load balancer's configuration
|
Update a load balancer's configuration
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
.. option:: --name <name>
|
.. option:: --name <name>
|
||||||
|
|
||||||
A new name for the load balancer
|
A new name for the load balancer
|
||||||
@@ -112,3 +107,93 @@ status
|
|||||||
^^^^^^
|
^^^^^^
|
||||||
|
|
||||||
Get the status of a single load balancer
|
Get the status of a single load balancer
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
|
.. program:: libra_client.py delete
|
||||||
|
|
||||||
|
delete
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
Delete a load balancer
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
|
.. program:: libra_client.py node-list
|
||||||
|
|
||||||
|
node-list
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
List the nodes in a load balancer
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
|
.. program:: libra_client.py node-delete
|
||||||
|
|
||||||
|
node-delete
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
Delete a node from the load balancer
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
|
.. option:: --nodeid <nodeid>
|
||||||
|
|
||||||
|
The ID of the node to be removed
|
||||||
|
|
||||||
|
.. program:: libra_client.py node-add
|
||||||
|
|
||||||
|
node-add
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
Add a node to a load balancer
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
|
.. option:: --node <ip:port>
|
||||||
|
|
||||||
|
The node address in ip:port format
|
||||||
|
|
||||||
|
.. program:: libra_client.py node-modify
|
||||||
|
|
||||||
|
node-modify
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
Modify a node in a load balancer
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
|
.. option:: --nodeid <nodeid>
|
||||||
|
|
||||||
|
The ID of the node to be modified
|
||||||
|
|
||||||
|
.. option:: --node <ip:port>
|
||||||
|
|
||||||
|
The new node address in ip:port format
|
||||||
|
|
||||||
|
.. program:: libra_client.py node-status
|
||||||
|
|
||||||
|
node-status
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
Get the status of a node in a load balancer
|
||||||
|
|
||||||
|
.. option:: --id <id>
|
||||||
|
|
||||||
|
The ID of the load balancer
|
||||||
|
|
||||||
|
.. option:: --nodeid <nodeid>
|
||||||
|
|
||||||
|
The ID of the node in the load balancer
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Load Balancer as a Service Device Tools
|
|||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 3
|
||||||
|
|
||||||
client
|
client
|
||||||
worker/index
|
worker/index
|
||||||
|
|||||||
@@ -56,9 +56,10 @@ class ClientOptions(object):
|
|||||||
subparsers.add_parser(
|
subparsers.add_parser(
|
||||||
'list', help='list load balancers'
|
'list', help='list load balancers'
|
||||||
)
|
)
|
||||||
subparsers.add_parser(
|
sp = subparsers.add_parser(
|
||||||
'delete', help='delete a load balancer'
|
'delete', help='delete a load balancer'
|
||||||
)
|
)
|
||||||
|
sp.add_argument('--id', help='load balancer ID', required=True)
|
||||||
sp = subparsers.add_parser(
|
sp = subparsers.add_parser(
|
||||||
'create', help='create a load balancer'
|
'create', help='create a load balancer'
|
||||||
)
|
)
|
||||||
@@ -77,7 +78,7 @@ class ClientOptions(object):
|
|||||||
sp = subparsers.add_parser(
|
sp = subparsers.add_parser(
|
||||||
'modify', help='modify a load balancer'
|
'modify', help='modify a load balancer'
|
||||||
)
|
)
|
||||||
sp.add_argument('lbid', help='load balancer ID')
|
sp.add_argument('--id', help='load balancer ID', required=True)
|
||||||
sp.add_argument('--name', help='new name for the load balancer')
|
sp.add_argument('--name', help='new name for the load balancer')
|
||||||
sp.add_argument('--algorithm',
|
sp.add_argument('--algorithm',
|
||||||
help='new algorithm for the load balancer',
|
help='new algorithm for the load balancer',
|
||||||
@@ -85,22 +86,37 @@ class ClientOptions(object):
|
|||||||
sp = subparsers.add_parser(
|
sp = subparsers.add_parser(
|
||||||
'status', help='get status of a load balancer'
|
'status', help='get status of a load balancer'
|
||||||
)
|
)
|
||||||
sp.add_argument('lbid', help='load balancer ID')
|
sp.add_argument('--id', help='load balancer ID', requied=True)
|
||||||
subparsers.add_parser(
|
sp = subparsers.add_parser(
|
||||||
'node-list', help='list nodes in a load balancer'
|
'node-list', help='list nodes in a load balancer'
|
||||||
)
|
)
|
||||||
subparsers.add_parser(
|
sp.add_argument('--id', help='load balancer ID', required=True)
|
||||||
|
sp = subparsers.add_parser(
|
||||||
'node-delete', help='delete node from a load balancer'
|
'node-delete', help='delete node from a load balancer'
|
||||||
)
|
)
|
||||||
subparsers.add_parser(
|
sp.add_argument('--id', help='load balancer ID', required=True)
|
||||||
|
sp.add_argument('--nodeid',
|
||||||
|
help='node ID to remove from load balancer',
|
||||||
|
required=True)
|
||||||
|
sp = subparsers.add_parser(
|
||||||
'node-add', help='add node to a load balancer'
|
'node-add', help='add node to a load balancer'
|
||||||
)
|
)
|
||||||
subparsers.add_parser(
|
sp.add_argument('--id', help='load balancer ID', required=True)
|
||||||
|
sp.add_argument('--node', help='node to add in ip:port form',
|
||||||
|
required=True)
|
||||||
|
sp = subparsers.add_parser(
|
||||||
'node-modify', help='modify node in a load balancer'
|
'node-modify', help='modify node in a load balancer'
|
||||||
)
|
)
|
||||||
subparsers.add_parser(
|
sp.add_argument('--id', help='load balancer ID', required=True)
|
||||||
|
sp.add_argument('--nodeid', help='node ID to modify', required=True)
|
||||||
|
sp.add_argument('--node', help='the new node address in ip:port form',
|
||||||
|
required=True)
|
||||||
|
sp = subparsers.add_parser(
|
||||||
'node-status', help='get status of a node in a load balancer'
|
'node-status', help='get status of a node in a load balancer'
|
||||||
)
|
)
|
||||||
|
sp.add_argument('--id', help='load balancer ID', required=True)
|
||||||
|
sp.add_argument('--nodeid', help='node ID to get status from',
|
||||||
|
required=True)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self._generate()
|
self._generate()
|
||||||
|
|||||||
Reference in New Issue
Block a user