Up timeout when setting VM state

Ensures the API won't time out immediately especially during a
wait-flagged or disable action.
This commit is contained in:
2021-11-06 04:15:10 -04:00
parent dd8f07526f
commit 1cf8706a52
2 changed files with 11 additions and 5 deletions

View File

@@ -382,7 +382,9 @@ def vm_state(config, vm, target_state, force=False, wait=False):
"force": str(force).lower(),
"wait": str(wait).lower(),
}
response = call_api(config, "post", "/vm/{vm}/state".format(vm=vm), params=params)
response = call_api(
config, "post", "/vm/{vm}/state".format(vm=vm), params=params, timeout=120
)
if response.status_code == 200:
retstatus = True