diff options
author | Telles Nobrega <tellesmvn@lsd.ufcg.edu.br> | 2015-06-29 13:45:14 -0300 |
---|---|---|
committer | Telles Nobrega <tellesmvn@lsd.ufcg.edu.br> | 2015-07-07 09:17:28 -0300 |
commit | c9ff30dfdb5f520013692d2e3caddcd20428d8b9 (patch) | |
tree | bee64b7944fe56443e7ab14212b9bfa80691ba02 /saharaclient/api/shell.py | |
parent | 7eeac47d6cb7f2a734894004f62f6b6b91264597 (diff) | |
download | python-saharaclient-c9ff30dfdb5f520013692d2e3caddcd20428d8b9.tar.gz |
Allow multiple clusters creation
This patch allows the user to use the client to create multiple clusters
Change-Id: I3b48d6ede758e86e8cbc5bbccc069c4c24b53a44
Partially-implements: bp simultaneously-creating-multiple-clusters
Diffstat (limited to 'saharaclient/api/shell.py')
-rw-r--r-- | saharaclient/api/shell.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/saharaclient/api/shell.py b/saharaclient/api/shell.py index 3b46057..5a3812c 100644 --- a/saharaclient/api/shell.py +++ b/saharaclient/api/shell.py @@ -317,6 +317,10 @@ def do_cluster_show(cs, args): default=sys.stdin, type=argparse.FileType('r'), help='JSON representation of cluster.') +@utils.arg('--count', + default=1, + type=int, + help='Number of clusters to be created.') def do_cluster_create(cs, args): """Create a cluster.""" # TODO(mattf): improve template validation, e.g. template w/o name key @@ -326,6 +330,7 @@ def do_cluster_create(cs, args): # create w/ **template. It may be desirable to simple change # clusters.create in the future. remap = {'neutron_management_network': 'net_id'} + template['count'] = args.count _filter_call_args(template, cs.clusters.create, remap) _show_cluster(cs.clusters.create(**template)) |