Closed FlatKey closed 4 years ago
Your feature needs tests. Why vmid == 0
? I am working on tests to understand the cases we need to cover.
If the forman ansible modules or an API call without vmid
is used, then the vmid == 0
.
https://github.com/theforeman/foreman_fog_proxmox/blob/c112ba30e275feb8b0694869c9c2f5fdb4507216/app/models/foreman_fog_proxmox/proxmox_vm_commands.rb#L31-L35
My thought was, if the vmid
is 0
, the next free vmid
should be used automatically (even if 0
is explicitly specified as vmid
). In this way, another invalid vmid
's can still be specified that lead to an error message (invalid vmid
).
I have added this feature with its tests in commit : https://github.com/theforeman/foreman_fog_proxmox/commit/43d6846558a6858a40c21338a3e25a5ee3d3fdcd. It will be released in 0.12.
Fixes #160