From a20eef8a5869834da0604490a20175c6bfaabbc5 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Sun, 14 Oct 2012 21:38:18 -0700 Subject: [PATCH] Add client create options --- libra/client/clientoptions.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libra/client/clientoptions.py b/libra/client/clientoptions.py index 170db1a0..204156ff 100644 --- a/libra/client/clientoptions.py +++ b/libra/client/clientoptions.py @@ -54,9 +54,19 @@ class ClientOptions(object): subparsers.add_parser( 'delete', help='delete a load balancer' ) - subparsers.add_parser( + sp = subparsers.add_parser( 'create', help='create a load balancer' ) + sp.add_argument('--name', help='name for the load balancer') + sp.add_argument('--port', help='port for the load balancer') + sp.add_argument('--protocol', + help='protocol for the load balancer (TCP or HTTP)', + choices=['HTTP', 'TCP']) + sp.add_argument('--nodes', + help='a node for the load balancer in ip:port format', + action='append') + sp.add_argument('--vip', + help='the virtual IP to attach the load balancer to') subparsers.add_parser( 'modify', help='modify a load balancer' )