cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: cloudmonkey: pick the first related API in parameter completion
Date Wed, 29 Oct 2014 07:10:43 GMT
Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master 78920d02a -> af5d8f86e


cloudmonkey: pick the first related API in parameter completion

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

Branch: refs/heads/master
Commit: af5d8f86ef8b2462746ef79ae9fa53141e3b1e08
Parents: 78920d0
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Oct 29 12:40:21 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Oct 29 12:40:21 2014 +0530

----------------------------------------------------------------------
 cloudmonkey/cloudmonkey.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/af5d8f86/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index efe90e4..a74439b 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -386,7 +386,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
                     params = self.apicache[verb][subject]['params']
                     related = filter(lambda x: x['name'] == param,
                                      params)[0]['related']
-                    api = min(filter(lambda x: 'list' in x, related), key=len)
+                    api = filter(lambda x: 'list' in x, related)[0]
                     uuids = []
                     if api in self.param_cache.keys() and self.param_cache[api]["ts"] >
(int(time.time()) - 1000):
                         for option in self.param_cache[api]["options"]:


Mime
View raw message