From f42a1bad0e2e5c29e2bf808aa570ce8849fcf93d Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 20 Aug 2024 12:57:53 -0400 Subject: [PATCH] Allow passing zk_only into VM snapshot creation --- daemon-common/vm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon-common/vm.py b/daemon-common/vm.py index 1e437047..2d568b8b 100644 --- a/daemon-common/vm.py +++ b/daemon-common/vm.py @@ -1235,7 +1235,7 @@ def get_list( # # VM Snapshot Tasks # -def create_vm_snapshot(zkhandler, domain, snapshot_name=None): +def create_vm_snapshot(zkhandler, domain, snapshot_name=None, zk_only=False): # Validate that VM exists in cluster dom_uuid = getDomainUUID(zkhandler, domain) if not dom_uuid: @@ -1277,7 +1277,9 @@ def create_vm_snapshot(zkhandler, domain, snapshot_name=None): # Iterrate through and create a snapshot for each RBD volume for rbd in rbd_list: pool, volume = rbd.split("/") - ret, msg = ceph.add_snapshot(zkhandler, pool, volume, snapshot_name) + ret, msg = ceph.add_snapshot( + zkhandler, pool, volume, snapshot_name, zk_only=zk_only + ) if not ret: cleanup_failure() return False, msg