cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/4] git commit: cloudmonkey: print all id, name options for all options and stringify ID
Date Wed, 29 Oct 2014 11:35:50 GMT
Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master 3070a27a9 -> c40fddb48


cloudmonkey: print all id, name options for all options and stringify ID

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/11845091
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/11845091
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/11845091

Branch: refs/heads/master
Commit: 1184509143094c4c16e252691fca1b1aeaa73be2
Parents: 3070a27
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Oct 29 15:27:36 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Oct 29 15:27:36 2014 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/11845091/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index ae2cc08..fd0e865 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -417,7 +417,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
                             if isinstance(result[key], list):
                                 for element in result[key]:
                                     if 'id' in element.keys():
-                                        uuid = element['id']
+                                        uuid = str(element['id'])
                                         name = ""
                                         if 'name' in element.keys():
                                             name = element['name']
@@ -425,8 +425,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
                                             name = element['username']
                                         self.param_cache[api]["options"].append((uuid, name,))
                                         uuids.append(uuid)
-
-                    if len(uuids) > 1:
+                    if len(uuids) > 0:
                         print
                         for option in self.param_cache[api]["options"]:
                             uuid = option[0]


Mime
View raw message