1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

proxmox_kvm: pool parameter not supported by qemu/<vmid>/config API endpoint (#1258)

* proxmox_kvm: pool parameter not supported by API on update

* added changelog fragment

* format fix and pull request link added

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
thetuxkeeper 2020-11-14 11:52:01 +01:00 committed by GitHub
parent 0109310aa2
commit 726aa5ecf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- proxmox_kvm - ignore unsupported ``pool`` parameter on update (https://github.com/ansible-collections/community.general/pull/1258).

View file

@ -414,6 +414,7 @@ options:
- If C(yes), the VM will be updated with new value. - If C(yes), the VM will be updated with new value.
- Cause of the operations of the API and security reasons, I have disabled the update of the following parameters - Cause of the operations of the API and security reasons, I have disabled the update of the following parameters
- C(net, virtio, ide, sata, scsi). Per example updating C(net) update the MAC address and C(virtio) create always new disk... - C(net, virtio, ide, sata, scsi). Per example updating C(net) update the MAC address and C(virtio) create always new disk...
- Update of C(pool) is disabled. It needs an additional API endpoint not covered by this module.
type: bool type: bool
default: 'no' default: 'no'
validate_certs: validate_certs:
@ -828,6 +829,7 @@ def create_vm(module, proxmox, vmid, newid, node, name, memory, cpu, cores, sock
del kwargs[p] del kwargs[p]
# If update, don't update disk (virtio, ide, sata, scsi) and network interface # If update, don't update disk (virtio, ide, sata, scsi) and network interface
# pool parameter not supported by qemu/<vmid>/config endpoint on "update" (PVE 6.2) - only with "create"
if update: if update:
if 'virtio' in kwargs: if 'virtio' in kwargs:
del kwargs['virtio'] del kwargs['virtio']
@ -841,6 +843,8 @@ def create_vm(module, proxmox, vmid, newid, node, name, memory, cpu, cores, sock
del kwargs['net'] del kwargs['net']
if 'force' in kwargs: if 'force' in kwargs:
del kwargs['force'] del kwargs['force']
if 'pool' in kwargs:
del kwargs['pool']
# Convert all dict in kwargs to elements. For hostpci[n], ide[n], net[n], numa[n], parallel[n], sata[n], scsi[n], serial[n], virtio[n] # Convert all dict in kwargs to elements. For hostpci[n], ide[n], net[n], numa[n], parallel[n], sata[n], scsi[n], serial[n], virtio[n]
for k in list(kwargs.keys()): for k in list(kwargs.keys()):