SHA256
1
0
forked from pool/salt
salt/fix-virt.update-with-cpu-defined-263.patch

32 lines
1.0 KiB
Diff

From c05d571058b9520dbaf4aba3de001b1aefe8e2c2 Mon Sep 17 00:00:00 2001
From: Cedric Bosdonnat <cbosdonnat@suse.com>
Date: Tue, 15 Sep 2020 16:03:30 +0200
Subject: [PATCH] Fix virt.update with cpu defined (#263)
In case the cpu was defined the rest of the definition wasn't completely
updated.
---
salt/modules/virt.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/salt/modules/virt.py b/salt/modules/virt.py
index c042738370..c1a73fcb7f 100644
--- a/salt/modules/virt.py
+++ b/salt/modules/virt.py
@@ -2441,9 +2441,9 @@ def update(
data = {k: v for k, v in locals().items() if bool(v)}
if boot_dev:
data["boot_dev"] = {i + 1: dev for i, dev in enumerate(boot_dev.split())}
- need_update = need_update or salt.utils.xmlutil.change_xml(
+ need_update = salt.utils.xmlutil.change_xml(
desc, data, params_mapping
- )
+ ) or need_update
# Update the XML definition with the new disks and diff changes
devices_node = desc.find("devices")
--
2.29.2