Commits

Daniel Green committed a2b7dac

Fix list not showing all items if another command is present

Comments (0)

Files changed (1)

                 api_params['id'] = str(vm['id'])
                 api_call (base_url, build_request(secret_key, api_params))
 
+    # Don't need this parameter after this point
+    if 'id' in api_params.keys():
+        del api_params['id']
+
     if app.pargs.info:
         # List all virtual machines
         api_params['command'] = 'listVirtualMachines'
     if app.pargs.list:
         # List all virtual machines
         api_params['command'] = 'listVirtualMachines'
+
         json_response = json.loads(api_call (base_url, build_request(secret_key, api_params)))
 
         print 'miracloud: listing virtual machines'