mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
cli: Fix attribute error and fix helpdoc
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
2a0c2be136
commit
d99f836d5d
@ -65,6 +65,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
|
|||||||
ruler = "="
|
ruler = "="
|
||||||
cache_file = cache_file
|
cache_file = cache_file
|
||||||
config_options = []
|
config_options = []
|
||||||
|
verbs = []
|
||||||
|
|
||||||
def __init__(self, pname):
|
def __init__(self, pname):
|
||||||
self.program_name = pname
|
self.program_name = pname
|
||||||
@ -246,7 +247,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
|
|||||||
args_dict.pop('filter').split(',')))
|
args_dict.pop('filter').split(',')))
|
||||||
|
|
||||||
missing_args = []
|
missing_args = []
|
||||||
if verb in self.apicache:
|
if verb in self.apicache and subject in self.apicache[verb]:
|
||||||
missing_args = filter(lambda x: x not in args_dict.keys(),
|
missing_args = filter(lambda x: x not in args_dict.keys(),
|
||||||
self.apicache[verb][subject]['requiredparams'])
|
self.apicache[verb][subject]['requiredparams'])
|
||||||
|
|
||||||
@ -388,7 +389,6 @@ class CloudMonkeyShell(cmd.Cmd, object):
|
|||||||
if subject in self.apicache[verb]:
|
if subject in self.apicache[verb]:
|
||||||
api = self.apicache[verb][subject]
|
api = self.apicache[verb][subject]
|
||||||
helpdoc = "(%s) %s" % (api['name'], api['description'])
|
helpdoc = "(%s) %s" % (api['name'], api['description'])
|
||||||
helpdoc = api['description']
|
|
||||||
if api['isasync']:
|
if api['isasync']:
|
||||||
helpdoc += "\nThis API is asynchronous."
|
helpdoc += "\nThis API is asynchronous."
|
||||||
required = api['requiredparams']
|
required = api['requiredparams']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user