[5.0.0] Bump version to 5.0.0, remove deprecated features (#4516)

* Remove deprecated features.

* Fix changelog.

* Remove ignore.txt entries.

* One more.

* Remove state=get tests.
This commit is contained in:
Felix Fontein 2022-04-26 11:45:15 +02:00 committed by GitHub
parent 29c49febd9
commit 54b2f0819d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 79 additions and 500 deletions

View file

@ -1187,7 +1187,7 @@ def main():
module.fail_json(msg="Can't get the next vmid for VM {0} automatically. Ensure your cluster state is good".format(name))
else:
clone_target = clone or name
vmid = proxmox.get_vmid(clone_target, ignore_missing=True, choose_first_if_multiple=True)
vmid = proxmox.get_vmid(clone_target, ignore_missing=True)
if clone is not None:
# If newid is not defined then retrieve the next free id from ProxmoxAPI
@ -1205,7 +1205,7 @@ def main():
proxmox.get_vm(vmid)
# Ensure the choosen VM name doesn't already exist when cloning
existing_vmid = proxmox.get_vmid(name, ignore_missing=True, choose_first_if_multiple=True)
existing_vmid = proxmox.get_vmid(name, ignore_missing=True)
if existing_vmid:
module.exit_json(changed=False, vmid=existing_vmid, msg="VM with name <%s> already exists" % name)
@ -1231,8 +1231,8 @@ def main():
try:
if proxmox.get_vm(vmid, ignore_missing=True) and not (update or clone):
module.exit_json(changed=False, vmid=vmid, msg="VM with vmid <%s> already exists" % vmid)
elif proxmox.get_vmid(name, ignore_missing=True, choose_first_if_multiple=True) and not (update or clone):
module.exit_json(changed=False, vmid=proxmox.get_vmid(name, choose_first_if_multiple=True), msg="VM with name <%s> already exists" % name)
elif proxmox.get_vmid(name, ignore_missing=True) and not (update or clone):
module.exit_json(changed=False, vmid=proxmox.get_vmid(name), msg="VM with name <%s> already exists" % name)
elif not (node, name):
module.fail_json(msg='node, name is mandatory for creating/updating vm')
elif not proxmox.get_node(node):