cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [3/4] git commit: cloudmonkey: use list heuristic for own list verb api for both id and ids
Date Wed, 29 Oct 2014 11:35:52 GMT
cloudmonkey: use list heuristic for own list verb api for both id and ids

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

Branch: refs/heads/master
Commit: 91bd9644929f01517d54f2dae16bfbdbf7c4265d
Parents: 633152b
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Oct 29 16:48:43 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Oct 29 16:48:43 2014 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/91bd9644/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index edadfed..cc77c68 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -388,9 +388,10 @@ class CloudMonkeyShell(cmd.Cmd, object):
                                                                  param))
                     if "id" in param:
                         logger.debug("[Paramcompl] Using 'list' heuristics")
-                        entity = param.replace("id", "")
-                        if not entity:
+                        if param == "id" or param == "ids":
                             entity = subject
+                        else:
+                            entity = param.replace("id", "")
                         apis = []
                         for resource in self.apicache["list"]:
                             if resource.startswith(entity):


Mime
View raw message