mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
[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:
parent
29c49febd9
commit
54b2f0819d
28 changed files with 79 additions and 500 deletions
|
@ -626,7 +626,7 @@ def main():
|
|||
if not vmid and state == 'present':
|
||||
vmid = proxmox.get_nextvmid()
|
||||
elif not vmid and hostname:
|
||||
vmid = proxmox.get_vmid(hostname, choose_first_if_multiple=True)
|
||||
vmid = proxmox.get_vmid(hostname)
|
||||
elif not vmid:
|
||||
module.exit_json(changed=False, msg="Vmid could not be fetched for the following action: %s" % state)
|
||||
|
||||
|
@ -637,9 +637,9 @@ def main():
|
|||
module.exit_json(changed=False, msg="VM with vmid = %s is already exists" % vmid)
|
||||
# If no vmid was passed, there cannot be another VM named 'hostname'
|
||||
if (not module.params['vmid'] and
|
||||
proxmox.get_vmid(hostname, ignore_missing=True, choose_first_if_multiple=True) and
|
||||
proxmox.get_vmid(hostname, ignore_missing=True) and
|
||||
not module.params['force']):
|
||||
vmid = proxmox.get_vmid(hostname, choose_first_if_multiple=True)
|
||||
vmid = proxmox.get_vmid(hostname)
|
||||
module.exit_json(changed=False, msg="VM with hostname %s already exists and has ID number %s" % (hostname, vmid))
|
||||
elif not proxmox.get_node(node):
|
||||
module.fail_json(msg="node '%s' not exists in cluster" % node)
|
||||
|
@ -681,9 +681,9 @@ def main():
|
|||
module.exit_json(changed=False, msg="VM with vmid = %s is already exists" % vmid)
|
||||
# If no vmid was passed, there cannot be another VM named 'hostname'
|
||||
if (not module.params['vmid'] and
|
||||
proxmox.get_vmid(hostname, ignore_missing=True, choose_first_if_multiple=True) and
|
||||
proxmox.get_vmid(hostname, ignore_missing=True) and
|
||||
not module.params['force']):
|
||||
vmid = proxmox.get_vmid(hostname, choose_first_if_multiple=True)
|
||||
vmid = proxmox.get_vmid(hostname)
|
||||
module.exit_json(changed=False, msg="VM with hostname %s already exists and has ID number %s" % (hostname, vmid))
|
||||
if not proxmox.get_vm(clone, ignore_missing=True):
|
||||
module.exit_json(changed=False, msg="Container to be cloned does not exist")
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -197,7 +197,7 @@ def main():
|
|||
|
||||
# If hostname is set get the VM id from ProxmoxAPI
|
||||
if not vmid and hostname:
|
||||
vmid = proxmox.get_vmid(hostname, choose_first_if_multiple=True)
|
||||
vmid = proxmox.get_vmid(hostname)
|
||||
elif not vmid:
|
||||
module.exit_json(changed=False, msg="Vmid could not be fetched for the following action: %s" % state)
|
||||
|
||||
|
|
|
@ -34,14 +34,6 @@ options:
|
|||
- The name of the serverless framework project stage to deploy to.
|
||||
- This uses the serverless framework default "dev".
|
||||
type: str
|
||||
functions:
|
||||
description:
|
||||
- A list of specific functions to deploy.
|
||||
- If this is not provided, all functions in the service will be deployed.
|
||||
- Deprecated parameter, it will be removed in community.general 5.0.0.
|
||||
type: list
|
||||
elements: str
|
||||
default: []
|
||||
region:
|
||||
description:
|
||||
- AWS region to deploy the service to.
|
||||
|
@ -159,8 +151,6 @@ def main():
|
|||
argument_spec=dict(
|
||||
service_path=dict(type='path', required=True),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present']),
|
||||
functions=dict(type='list', elements='str',
|
||||
removed_in_version="5.0.0", removed_from_collection="community.general"),
|
||||
region=dict(type='str', default=''),
|
||||
stage=dict(type='str', default=''),
|
||||
deploy=dict(type='bool', default=True),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue