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:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user