127 argv = [args[
'<command>']] + args[
'<args>']
131 for repeat_id
in tqdm(range(0,
int(args[
'--repeat']))):
133 print(
"INFO: Repeat #"+
str(repeat_id))
134 if args[
'<command>'] ==
'user':
136 elif args[
'<command>'] ==
'cluster':
138 cfrm_response=cfsp_cluster.main(args)
139 elif args[
'<command>'] ==
'image':
141 cfrm_response=cfsp_image.main(args)
142 elif args[
'<command>'] ==
'instance':
144 cfrm_response=cfsp_instance.main(args)
145 elif args[
'<command>'] ==
'debug':
147 cfrm_response=cfsp_debug.main(args)
148 elif args[
'<command>']
in [
'help',
None]:
149 if args[
'<args>'] == [
'user']:
151 print(docopt(cfsp_user.__doc__, argv=argv))
152 elif args[
'<args>'] == [
'cluster']:
153 print(docopt(cfsp_cluster.__doc__, argv=argv))
154 elif args[
'<args>'] == [
'image']:
155 print(docopt(cfsp_image.__doc__, argv=argv))
156 elif args[
'<args>'] == [
'instance']:
157 print(docopt(cfsp_instance.__doc__, argv=argv))
158 elif args[
'<args>'] == [
'debug']:
159 print(docopt(cfsp_debug.__doc__, argv=argv))
161 print(docopt(__doc__, version=__version__))
163 print(
"ERROR: unknown command. Aborting...")
164 exit(print(docopt(__doc__, version=__version__)))
167 pprint(cfrm_response)
169 return(cfrm_response)