mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
cloudstack: fix E326 (#54657)
* cloudstack: remove choice list for hypervisor param * cloudstack: streamline network_type with returned value by the API * cloudstack: remove E326 * add changelog fragment
This commit is contained in:
@@ -42,8 +42,8 @@ options:
|
||||
description:
|
||||
- Name the hypervisor to be used.
|
||||
- Required if I(state=present).
|
||||
- Possible values are C(KVM), C(VMware), C(BareMetal), C(XenServer), C(LXC), C(HyperV), C(UCS), C(OVM), C(Simulator).
|
||||
type: str
|
||||
choices: [ KVM, VMware, BareMetal, XenServer, LXC, HyperV, UCS, OVM ]
|
||||
url:
|
||||
description:
|
||||
- URL for the cluster
|
||||
@@ -206,7 +206,6 @@ from ansible.module_utils.cloudstack import (
|
||||
AnsibleCloudStack,
|
||||
cs_argument_spec,
|
||||
cs_required_together,
|
||||
CS_HYPERVISORS
|
||||
)
|
||||
|
||||
|
||||
@@ -350,7 +349,7 @@ def main():
|
||||
zone=dict(),
|
||||
pod=dict(),
|
||||
cluster_type=dict(choices=['CloudManaged', 'ExternalManaged']),
|
||||
hypervisor=dict(choices=CS_HYPERVISORS),
|
||||
hypervisor=dict(),
|
||||
state=dict(choices=['present', 'enabled', 'disabled', 'absent'], default='present'),
|
||||
url=dict(),
|
||||
username=dict(),
|
||||
|
||||
@@ -53,8 +53,8 @@ options:
|
||||
description:
|
||||
- Name of the cluster.
|
||||
- Required if I(state=present) and host does not yet exist.
|
||||
- Possible values are C(KVM), C(VMware), C(BareMetal), C(XenServer), C(LXC), C(HyperV), C(UCS), C(OVM), C(Simulator).
|
||||
type: str
|
||||
choices: [ KVM, VMware, BareMetal, XenServer, LXC, HyperV, UCS, OVM, Simulator ]
|
||||
allocation_state:
|
||||
description:
|
||||
- Allocation state of the host.
|
||||
@@ -330,7 +330,6 @@ from ansible.module_utils.cloudstack import (
|
||||
AnsibleCloudStack,
|
||||
cs_argument_spec,
|
||||
cs_required_together,
|
||||
CS_HYPERVISORS
|
||||
)
|
||||
import time
|
||||
|
||||
@@ -592,7 +591,7 @@ def main():
|
||||
url=dict(),
|
||||
password=dict(no_log=True),
|
||||
username=dict(),
|
||||
hypervisor=dict(choices=CS_HYPERVISORS),
|
||||
hypervisor=dict(),
|
||||
allocation_state=dict(choices=['enabled', 'disabled', 'maintenance']),
|
||||
pod=dict(),
|
||||
cluster=dict(),
|
||||
|
||||
@@ -88,8 +88,8 @@ options:
|
||||
- Name the hypervisor to be used for creating the new instance.
|
||||
- Relevant when using I(state=present), but only considered if not set on ISO/template.
|
||||
- If not set or found on ISO/template, first found hypervisor will be used.
|
||||
- Possible values are C(KVM), C(VMware), C(BareMetal), C(XenServer), C(LXC), C(HyperV), C(UCS), C(OVM), C(Simulator).
|
||||
type: str
|
||||
choices: [ KVM, kvm, VMware, vmware, BareMetal, baremetal, XenServer, xenserver, LXC, lxc, HyperV, hyperv, UCS, ucs, OVM, ovm, Simulator, simulator ]
|
||||
keyboard:
|
||||
description:
|
||||
- Keyboard device type for the instance.
|
||||
@@ -424,7 +424,6 @@ from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.cloudstack import (
|
||||
AnsibleCloudStack,
|
||||
CS_HYPERVISORS,
|
||||
cs_argument_spec,
|
||||
cs_required_together
|
||||
)
|
||||
@@ -1041,7 +1040,7 @@ def main():
|
||||
disk_size=dict(type='int'),
|
||||
root_disk_size=dict(type='int'),
|
||||
keyboard=dict(type='str', choices=['de', 'de-ch', 'es', 'fi', 'fr', 'fr-be', 'fr-ch', 'is', 'it', 'jp', 'nl-be', 'no', 'pt', 'uk', 'us']),
|
||||
hypervisor=dict(choices=CS_HYPERVISORS),
|
||||
hypervisor=dict(),
|
||||
host=dict(),
|
||||
security_groups=dict(type='list', aliases=['security_group']),
|
||||
affinity_groups=dict(type='list', aliases=['affinity_group']),
|
||||
|
||||
@@ -58,8 +58,8 @@ options:
|
||||
hypervisor:
|
||||
description:
|
||||
- Required when creating a zone scoped pool.
|
||||
- Possible values are C(KVM), C(VMware), C(BareMetal), C(XenServer), C(LXC), C(HyperV), C(UCS), C(OVM), C(Simulator).
|
||||
type: str
|
||||
choices: [ KVM, VMware, BareMetal, XenServer, LXC, HyperV, UCS, OVM, Simulator ]
|
||||
storage_tags:
|
||||
description:
|
||||
- Tags associated with this storage pool.
|
||||
@@ -234,7 +234,6 @@ from ansible.module_utils.cloudstack import (
|
||||
AnsibleCloudStack,
|
||||
cs_argument_spec,
|
||||
cs_required_together,
|
||||
CS_HYPERVISORS,
|
||||
)
|
||||
|
||||
|
||||
@@ -468,7 +467,7 @@ def main():
|
||||
pod=dict(),
|
||||
cluster=dict(),
|
||||
scope=dict(choices=['zone', 'cluster']),
|
||||
hypervisor=dict(choices=CS_HYPERVISORS),
|
||||
hypervisor=dict(),
|
||||
provider=dict(default='DefaultPrimary'),
|
||||
capacity_bytes=dict(type='int'),
|
||||
capacity_iops=dict(type='int'),
|
||||
|
||||
@@ -121,26 +121,8 @@ options:
|
||||
description:
|
||||
- Name the hypervisor to be used for creating the new template.
|
||||
- Relevant when using I(state=present).
|
||||
- Possible values are C(KVM), C(VMware), C(BareMetal), C(XenServer), C(LXC), C(HyperV), C(UCS), C(OVM), C(Simulator).
|
||||
type: str
|
||||
choices:
|
||||
- KVM
|
||||
- kvm
|
||||
- VMware
|
||||
- vmware
|
||||
- BareMetal
|
||||
- baremetal
|
||||
- XenServer
|
||||
- xenserver
|
||||
- LXC
|
||||
- lxc
|
||||
- HyperV
|
||||
- hyperv
|
||||
- UCS
|
||||
- ucs
|
||||
- OVM
|
||||
- ovm
|
||||
- Simulator
|
||||
- simulator
|
||||
requires_hvm:
|
||||
description:
|
||||
- Whether the template requires HVM or not.
|
||||
@@ -400,7 +382,6 @@ from ansible.module_utils.cloudstack import (
|
||||
AnsibleCloudStack,
|
||||
cs_argument_spec,
|
||||
cs_required_together,
|
||||
CS_HYPERVISORS
|
||||
)
|
||||
|
||||
|
||||
@@ -712,7 +693,7 @@ def main():
|
||||
checksum=dict(),
|
||||
template_filter=dict(default='self', choices=['all', 'featured', 'self', 'selfexecutable', 'sharedexecutable', 'executable', 'community']),
|
||||
template_find_options=dict(type='list', choices=['display_text', 'checksum', 'cross_zones'], aliases=['template_find_option'], default=[]),
|
||||
hypervisor=dict(choices=CS_HYPERVISORS),
|
||||
hypervisor=dict(),
|
||||
requires_hvm=dict(type='bool'),
|
||||
password_enabled=dict(type='bool'),
|
||||
template_tag=dict(),
|
||||
|
||||
@@ -46,8 +46,8 @@ options:
|
||||
description:
|
||||
- Network type of the zone.
|
||||
type: str
|
||||
default: basic
|
||||
choices: [ basic, advanced ]
|
||||
default: Basic
|
||||
choices: [ Basic, Advanced ]
|
||||
dns1:
|
||||
description:
|
||||
- First DNS for the zone.
|
||||
@@ -348,7 +348,7 @@ def main():
|
||||
internal_dns2=dict(),
|
||||
dns1_ipv6=dict(),
|
||||
dns2_ipv6=dict(),
|
||||
network_type=dict(default='basic', choices=['Basic', 'basic', 'Advanced', 'advanced']),
|
||||
network_type=dict(default='Basic', choices=['Basic', 'Advanced']),
|
||||
network_domain=dict(),
|
||||
guest_cidr_address=dict(),
|
||||
dhcp_provider=dict(),
|
||||
|
||||
Reference in New Issue
Block a user