cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject cloudstack-cloudmonkey git commit: cloudmonkey: fix async api block/unblock options to be more intuitive
Date Mon, 12 Jan 2015 05:05:25 GMT
Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master 7498aa58a -> e45c1c02b


cloudmonkey: fix async api block/unblock options to be more intuitive

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/e45c1c02
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/e45c1c02
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/e45c1c02

Branch: refs/heads/master
Commit: e45c1c02b1c8a3b7a091a73d22dac52669df06ad
Parents: 7498aa5
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Mon Jan 12 10:34:29 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Jan 12 10:34:29 2015 +0530

----------------------------------------------------------------------
 cloudmonkey/cloudmonkey.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/e45c1c02/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index 8e29660..f1d1355 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -744,7 +744,10 @@ def main():
                         dest="configFile", default=config_file,
                         help="config file for cloudmonkey", metavar="FILE")
 
-    parser.add_argument("-a", "--async", action="store_true",
+    parser.add_argument("-b", "--block-async", action="store_true",
+                        help="block and poll result on async API calls")
+
+    parser.add_argument("-n", "--noblock-async", action="store_true",
                         help="do not block on async API calls")
 
     parser.add_argument("-d", "--display-type",
@@ -767,7 +770,10 @@ def main():
     if args.displayType and args.displayType in displayTypes:
         shell.set_attr("display", args.displayType)
 
-    if args.async:
+    if args.block_async:
+        shell.set_attr("asyncblock", "true")
+
+    if args.noblock_async:
         shell.set_attr("asyncblock", "false")
 
     if args.serverProfile and args.serverProfile.strip() != '':


Mime
View raw message