Add guard rails against manipulating mirrors

Snapshot mirrors should normally be promoted using "mirror promote", and
not started manually. This adds guard rails against that to the "start",
"stop", and "disable" state commands to prevent changing mirror states
without an explicit "--force" option.
This commit is contained in:
2024-10-08 23:51:48 -04:00
parent 3ea7421f09
commit 1d90b066bc
5 changed files with 59 additions and 21 deletions

View File

@ -383,8 +383,8 @@ def vm_state(config, vm, target_state, force=False, wait=False):
"""
params = {
"state": target_state,
"force": str(force).lower(),
"wait": str(wait).lower(),
"force": force,
"wait": wait,
}
response = call_api(config, "post", "/vm/{vm}/state".format(vm=vm), params=params)