2021-01-08 13:41:50 +01:00
|
|
|
From c05d571058b9520dbaf4aba3de001b1aefe8e2c2 Mon Sep 17 00:00:00 2001
|
2020-09-16 14:19:07 +02:00
|
|
|
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
|
2021-01-08 13:41:50 +01:00
|
|
|
index c042738370..c1a73fcb7f 100644
|
2020-09-16 14:19:07 +02:00
|
|
|
--- a/salt/modules/virt.py
|
|
|
|
+++ b/salt/modules/virt.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -2441,9 +2441,9 @@ def update(
|
|
|
|
data = {k: v for k, v in locals().items() if bool(v)}
|
2020-09-16 14:19:07 +02:00
|
|
|
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")
|
|
|
|
--
|
2021-01-08 13:41:50 +01:00
|
|
|
2.29.2
|
2020-09-16 14:19:07 +02:00
|
|
|
|
|
|
|
|