cli: extract apicmd response using the apiname+response key

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2012-12-16 22:10:03 -08:00
parent 5658fc4249
commit 0f2a0950b6
1 changed files with 2 additions and 1 deletions

View File

@ -312,7 +312,8 @@ class CloudStackShell(cmd.Cmd, object):
if result is None:
return
try:
self.print_result(result.values())
# Response is in the key "apiname+response" (lowercase)
self.print_result(result[api_name.lower()+'response'])
print
except Exception as e:
self.print_shell("🙈 Error on parsing and printing", e)