Merge pull request #180 from 0xFelix/running-run-strategy

fix(kubevirt_vm): Allow switching between running and run_strategy
This commit is contained in:
kubevirt-bot
2025-04-29 12:02:27 +02:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

@@ -347,7 +347,9 @@ def create_vm(params: Dict) -> Dict:
if (run_strategy := params.get("run_strategy")) is not None:
vm["spec"]["runStrategy"] = run_strategy
vm["spec"]["running"] = None
else:
vm["spec"]["runStrategy"] = None
vm["spec"]["running"] = (
running if (running := params.get("running")) is not None else True
)