From 4d68431a52f1e67aa5fa8144130057987a3fe2a5 Mon Sep 17 00:00:00 2001 From: Tom Paine Date: Wed, 2 Apr 2025 15:13:08 +0100 Subject: [PATCH 1/3] Update one_vm.py Update updateconf attributes to match latest acceptable values. --- plugins/modules/one_vm.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/modules/one_vm.py b/plugins/modules/one_vm.py index 0b6d27aae9..b3544c6681 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017, Milan Ilic # Copyright (c) 2019, Jan Meerkamp +# Copyright (c) 2025, Tom Paine # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later @@ -658,13 +659,17 @@ from ansible.module_utils.common.dict_transformations import dict_merge from ansible_collections.community.general.plugins.module_utils.opennebula import flatten, render +# https://docs.opennebula.io/6.10/integration_and_development/system_interfaces/api.html?highlight=updateconf#one-vm-updateconf UPDATECONF_ATTRIBUTES = { - "OS": ["ARCH", "MACHINE", "KERNEL", "INITRD", "BOOTLOADER", "BOOT", "SD_DISK_BUS", "UUID"], - "FEATURES": ["ACPI", "PAE", "APIC", "LOCALTIME", "HYPERV", "GUEST_AGENT"], + "OS": ["ARCH", "MACHINE", "KERNEL", "INITRD", "BOOTLOADER", "BOOT", "SD_DISK_BUS", "UUID", "FIRMWARE"], + "CPU_MODEL": ["MODEL", "FEATURES"], + "FEATURES": ["ACPI", "PAE", "APIC", "LOCALTIME", "HYPERV", "GUEST_AGENT", "VIRTIO_BLK_QUEUES", "VIRTIO_SCSI_QUEUES", "IOTHREADS"], "INPUT": ["TYPE", "BUS"], - "GRAPHICS": ["TYPE", "LISTEN", "PASSWD", "KEYMAP"], - "RAW": ["DATA", "DATA_VMX", "TYPE"], + "GRAPHICS": ["TYPE", "LISTEN", "PORT", "PASSWD", "KEYMAP", "COMMAND"], + "VIDEO": ["ATS", "IOMMU", "RESOLUTION", "TYPE", "VRAM"], + "RAW": ["DATA", "DATA_VMX", "TYPE", "VALIDATE"], "CONTEXT": [], + "BACKUP_CONFIG": ["FS_FREEZE", "KEEP_LAST", "BACKUP_VOLATILE", "MODE", "INCREMENT_MODE"] } From 992f00ffc10dc0b558d107110cb5cdff893416be Mon Sep 17 00:00:00 2001 From: Tom Paine Date: Wed, 2 Apr 2025 14:35:18 +0000 Subject: [PATCH 2/3] Add changelog fragment --- ...9959-update-opennebula-onevm-updateconf-params.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 changelogs/fragments/9959-update-opennebula-onevm-updateconf-params.yml diff --git a/changelogs/fragments/9959-update-opennebula-onevm-updateconf-params.yml b/changelogs/fragments/9959-update-opennebula-onevm-updateconf-params.yml new file mode 100644 index 0000000000..955c43647d --- /dev/null +++ b/changelogs/fragments/9959-update-opennebula-onevm-updateconf-params.yml @@ -0,0 +1,11 @@ +minor_changes: + - | + Update `UPDATECONF_ATTRIBUTES` in `one_vm.py` to include new parameters as per the latest OpenNebula API documentation. + Added parameters: + - OS: FIRMWARE + - CPU_MODEL: MODEL, FEATURES + - FEATURES: VIRTIO_BLK_QUEUES, VIRTIO_SCSI_QUEUES, IOTHREADS + - GRAPHICS: PORT, COMMAND + - VIDEO: ATS, IOMMU, RESOLUTION, TYPE, VRAM + - RAW: VALIDATE + - BACKUP_CONFIG: FS_FREEZE, KEEP_LAST, BACKUP_VOLATILE, MODE, INCREMENT_MODE \ No newline at end of file From 93eefadcda5f13490d0c7b7d9a6bdc50cac3d822 Mon Sep 17 00:00:00 2001 From: Tom Paine Date: Wed, 2 Apr 2025 16:45:32 +0100 Subject: [PATCH 3/3] Update plugins/modules/one_vm.py Co-authored-by: Nicola Soranzo --- plugins/modules/one_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/one_vm.py b/plugins/modules/one_vm.py index b3544c6681..c960969732 100644 --- a/plugins/modules/one_vm.py +++ b/plugins/modules/one_vm.py @@ -659,7 +659,7 @@ from ansible.module_utils.common.dict_transformations import dict_merge from ansible_collections.community.general.plugins.module_utils.opennebula import flatten, render -# https://docs.opennebula.io/6.10/integration_and_development/system_interfaces/api.html?highlight=updateconf#one-vm-updateconf +# https://docs.opennebula.io/6.10/integration_and_development/system_interfaces/api.html#one-vm-updateconf UPDATECONF_ATTRIBUTES = { "OS": ["ARCH", "MACHINE", "KERNEL", "INITRD", "BOOTLOADER", "BOOT", "SD_DISK_BUS", "UUID", "FIRMWARE"], "CPU_MODEL": ["MODEL", "FEATURES"],