Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parameter-list-no-elements #8

Merged
merged 1 commit into from Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion plugins/modules/cs_disk_offering.py
Expand Up @@ -93,6 +93,7 @@
description:
- The storage tags for this disk offering.
type: list
elements: str
aliases: [ storage_tag ]
display_offering:
description:
Expand Down Expand Up @@ -348,7 +349,7 @@ def main():
iops_min=dict(type='int'),
provisioning_type=dict(choices=['thin', 'sparse', 'fat']),
storage_type=dict(choices=['local', 'shared']),
storage_tags=dict(type='list', aliases=['storage_tag']),
storage_tags=dict(type='list', elements='str', aliases=['storage_tag']),
state=dict(choices=['present', 'absent'], default='present'),
))

Expand Down
6 changes: 4 additions & 2 deletions plugins/modules/cs_firewall.py
Expand Up @@ -49,6 +49,7 @@
description:
- List of CIDRs (full notation) to be used for firewall rule.
- Since version 2.5, it is a list of CIDR.
elements: str
type: list
default: 0.0.0.0/0
aliases: [ cidr ]
Expand Down Expand Up @@ -100,6 +101,7 @@
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "To delete all tags, set an empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
extends_documentation_fragment:
- ngine_io.cloudstack.cloudstack
Expand Down Expand Up @@ -384,7 +386,7 @@ def main():
argument_spec.update(dict(
ip_address=dict(),
network=dict(),
cidrs=dict(type='list', default='0.0.0.0/0', aliases=['cidr']),
cidrs=dict(type='list', elements='str', default='0.0.0.0/0', aliases=['cidr']),
protocol=dict(choices=['tcp', 'udp', 'icmp', 'all'], default='tcp'),
type=dict(choices=['ingress', 'egress'], default='ingress'),
icmp_type=dict(type='int'),
Expand All @@ -397,7 +399,7 @@ def main():
account=dict(),
project=dict(),
poll_async=dict(type='bool', default=True),
tags=dict(type='list', aliases=['tag'], default=None),
tags=dict(type='list', elements='dict', aliases=['tag']),
))

required_together = cs_required_together()
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cs_host.py
Expand Up @@ -62,6 +62,7 @@
description:
- Tags of the host.
type: list
elements: str
aliases: [ host_tag ]
state:
description:
Expand Down Expand Up @@ -590,7 +591,7 @@ def main():
allocation_state=dict(choices=['enabled', 'disabled', 'maintenance']),
pod=dict(),
cluster=dict(),
host_tags=dict(type='list', aliases=['host_tag']),
host_tags=dict(type='list', elements='str', aliases=['host_tag']),
zone=dict(),
state=dict(choices=['present', 'absent'], default='present'),
))
Expand Down
15 changes: 10 additions & 5 deletions plugins/modules/cs_instance.py
Expand Up @@ -92,6 +92,7 @@
description:
- List of networks to use for the new instance.
type: list
elements: str
aliases: [ network ]
ip_address:
description:
Expand All @@ -106,6 +107,7 @@
- "List of mappings in the form I({'network': NetworkName, 'ip': 1.2.3.4})"
- Mutually exclusive with I(networks) option.
type: list
elements: dict
aliases: [ ip_to_network ]
disk_offering:
description:
Expand All @@ -124,6 +126,7 @@
description:
- List of security groups the instance to be applied to.
type: list
elements: str
aliases: [ security_group ]
host:
description:
Expand Down Expand Up @@ -156,6 +159,7 @@
description:
- Affinity groups names to be applied to the new instance.
type: list
elements: str
aliases: [ affinity_group ]
user_data:
description:
Expand All @@ -178,6 +182,7 @@
- List of tags. Tags are a list of dictionaries having keys C(key) and C(value).
- "If you want to delete all tags, set a empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
poll_async:
description:
Expand Down Expand Up @@ -1013,8 +1018,8 @@ def main():
aliases=['iso_filter'],
choices=['all', 'featured', 'self', 'selfexecutable', 'sharedexecutable', 'executable', 'community']
),
networks=dict(type='list', aliases=['network']),
ip_to_networks=dict(type='list', aliases=['ip_to_network']),
networks=dict(type='list', elements='str', aliases=['network']),
ip_to_networks=dict(type='list', elements='dict', aliases=['ip_to_network']),
ip_address=dict(),
ip6_address=dict(),
disk_offering=dict(),
Expand All @@ -1023,16 +1028,16 @@ def main():
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(),
host=dict(),
security_groups=dict(type='list', aliases=['security_group']),
affinity_groups=dict(type='list', aliases=['affinity_group']),
security_groups=dict(type='list', elements='str', aliases=['security_group']),
affinity_groups=dict(type='list', elements='str', aliases=['affinity_group']),
domain=dict(),
account=dict(),
project=dict(),
user_data=dict(),
zone=dict(),
ssh_key=dict(),
force=dict(type='bool', default=False),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
details=dict(type='dict'),
poll_async=dict(type='bool', default=True),
allow_root_disk_shrink=dict(type='bool', default=False),
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cs_ip_address.py
Expand Up @@ -66,6 +66,7 @@
- Tags can be used as an unique identifier for the IP Addresses.
- In this case, at least one of them must be unique to ensure idempotency.
type: list
elements: dict
aliases: [ tag ]
poll_async:
description:
Expand Down Expand Up @@ -243,7 +244,7 @@ def main():
domain=dict(),
account=dict(),
project=dict(),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
poll_async=dict(type='bool', default=True),
))

Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cs_iso.py
Expand Up @@ -105,6 +105,7 @@
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "To delete all tags, set a empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
extends_documentation_fragment:
- ngine_io.cloudstack.cloudstack
Expand Down Expand Up @@ -406,7 +407,7 @@ def main():
is_dynamically_scalable=dict(type='bool'),
state=dict(choices=['present', 'absent'], default='present'),
poll_async=dict(type='bool', default=True),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
))

module = AnsibleModule(
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/cs_loadbalancer_rule.py
Expand Up @@ -47,7 +47,6 @@
- Required when using I(state=present).
- Can not be changed once the rule exists due API limitation.
type: int
required: true
ip_address:
description:
- Public IP address from where the network traffic will be load balanced from.
Expand Down Expand Up @@ -101,6 +100,7 @@
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "To delete all tags, set a empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
network:
description:
Expand Down Expand Up @@ -339,7 +339,7 @@ def main():
cidr=dict(),
project=dict(),
open_firewall=dict(type='bool', default=False),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
zone=dict(),
domain=dict(),
account=dict(),
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cs_loadbalancer_rule_member.py
Expand Up @@ -34,6 +34,7 @@
description:
- List of VMs to assign to or remove from the rule.
type: list
elements: str
required: true
aliases: [ vm ]
state:
Expand Down Expand Up @@ -312,7 +313,7 @@ def main():
argument_spec.update(dict(
name=dict(required=True),
ip_address=dict(aliases=['public_ip']),
vms=dict(required=True, aliases=['vm'], type='list'),
vms=dict(required=True, aliases=['vm'], type='list', elements='str'),
state=dict(choices=['present', 'absent'], default='present'),
zone=dict(),
domain=dict(),
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cs_network.py
Expand Up @@ -149,6 +149,7 @@
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "To delete all tags, set a empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
extends_documentation_fragment:
- ngine_io.cloudstack.cloudstack
Expand Down Expand Up @@ -593,7 +594,7 @@ def main():
domain=dict(),
account=dict(),
poll_async=dict(type='bool', default=True),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
))
required_together = cs_required_together()
required_together.extend([
Expand Down
6 changes: 4 additions & 2 deletions plugins/modules/cs_network_acl_rule.py
Expand Up @@ -26,6 +26,7 @@
description:
- CIDRs of the rule.
type: list
elements: str
default: [ 0.0.0.0/0 ]
aliases: [ cidr ]
rule_position:
Expand Down Expand Up @@ -90,6 +91,7 @@
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "If you want to delete all tags, set a empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
domain:
description:
Expand Down Expand Up @@ -404,7 +406,7 @@ def main():
network_acl=dict(required=True, aliases=['acl']),
rule_position=dict(required=True, type='int', aliases=['number']),
vpc=dict(required=True),
cidrs=dict(type='list', default=['0.0.0.0/0'], aliases=['cidr']),
cidrs=dict(type='list', elements='str', default=['0.0.0.0/0'], aliases=['cidr']),
protocol=dict(choices=['tcp', 'udp', 'icmp', 'all', 'by_number'], default='tcp'),
protocol_number=dict(type='int'),
traffic_type=dict(choices=['ingress', 'egress'], aliases=['type'], default='ingress'),
Expand All @@ -418,7 +420,7 @@ def main():
domain=dict(),
account=dict(),
project=dict(),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
poll_async=dict(type='bool', default=True),
))

Expand Down
12 changes: 8 additions & 4 deletions plugins/modules/cs_network_offering.py
Expand Up @@ -42,6 +42,7 @@
- Services supported by the network offering.
- A list of one or more items from the choice list.
type: list
elements: str
choices: [ Dns, PortForwarding, Dhcp, SourceNat, UserData, Firewall, StaticNat, Vpn, Lb ]
aliases: [ supported_service ]
traffic_type:
Expand All @@ -62,6 +63,7 @@
- Network offering details in key/value pairs.
- with service provider as a value
type: list
elements: dict
egress_default_policy:
description:
- Whether the default egress policy is allow or to deny.
Expand Down Expand Up @@ -90,6 +92,7 @@
description:
- Desired service capabilities as part of network offering.
type: list
elements: str
aliases: [ service_capability ]
service_offering:
description:
Expand All @@ -100,6 +103,7 @@
- Provider to service mapping.
- If not specified, the provider for the service will be mapped to the default provider on the physical network.
type: list
elements: dict
aliases: [ service_provider ]
specify_ip_ranges:
description:
Expand Down Expand Up @@ -366,7 +370,7 @@ def main():
display_text=dict(),
guest_ip_type=dict(choices=['Shared', 'Isolated']),
name=dict(required=True),
supported_services=dict(type='list', aliases=['supported_service'], choices=[
supported_services=dict(type='list', elements='str', aliases=['supported_service'], choices=[
'Dns',
'PortForwarding',
'Dhcp',
Expand All @@ -380,15 +384,15 @@ def main():
traffic_type=dict(default='Guest'),
availability=dict(),
conserve_mode=dict(type='bool'),
details=dict(type='list'),
details=dict(type='list', elements='dict'),
egress_default_policy=dict(choices=['allow', 'deny']),
persistent=dict(type='bool'),
keepalive_enabled=dict(type='bool'),
max_connections=dict(type='int'),
network_rate=dict(type='int'),
service_capabilities=dict(type='list', aliases=['service_capability']),
service_capabilities=dict(type='list', elements='str', aliases=['service_capability']),
service_offering=dict(),
service_providers=dict(type='list', aliases=['service_provider']),
service_providers=dict(type='list', elements='dict', aliases=['service_provider']),
specify_ip_ranges=dict(type='bool'),
specify_vlan=dict(type='bool'),
for_vpc=dict(type='bool'),
Expand Down
6 changes: 4 additions & 2 deletions plugins/modules/cs_physical_network.py
Expand Up @@ -67,10 +67,12 @@
description:
- List of Network Service Providers to enable.
type: list
elements: str
nsps_disabled:
description:
- List of Network Service Providers to disable.
type: list
elements: str
state:
description:
- State of the physical network.
Expand Down Expand Up @@ -418,8 +420,8 @@ def main():
zone=dict(),
domain=dict(),
vlan=dict(),
nsps_disabled=dict(type='list'),
nsps_enabled=dict(type='list'),
nsps_disabled=dict(type='list', elements='str'),
nsps_enabled=dict(type='list', elements='str'),
network_speed=dict(choices=['1G', '10G']),
broadcast_domain_range=dict(choices=['POD', 'ZONE']),
isolation_method=dict(choices=['VLAN', 'GRE', 'L3']),
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cs_portforward.py
Expand Up @@ -103,6 +103,7 @@
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "To delete all tags, set a empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
extends_documentation_fragment:
- ngine_io.cloudstack.cloudstack
Expand Down Expand Up @@ -362,7 +363,7 @@ def main():
account=dict(),
project=dict(),
poll_async=dict(type='bool', default=True),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
))

module = AnsibleModule(
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cs_project.py
Expand Up @@ -45,6 +45,7 @@
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "If you want to delete all tags, set a empty list e.g. I(tags: [])."
type: list
elements: dict
aliases: [ tag ]
poll_async:
description:
Expand Down Expand Up @@ -240,7 +241,7 @@ def main():
domain=dict(),
account=dict(),
poll_async=dict(type='bool', default=True),
tags=dict(type='list', aliases=['tag']),
tags=dict(type='list', elements='dict', aliases=['tag']),
))

module = AnsibleModule(
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/cs_resourcelimit.py
Expand Up @@ -178,7 +178,7 @@ def get_result(self, resource_limit):
def main():
argument_spec = cs_argument_spec()
argument_spec.update(dict(
resource_type=dict(required=True, choices=RESOURCE_TYPES.keys(), aliases=['type']),
resource_type=dict(required=True, choices=list(RESOURCE_TYPES.keys()), aliases=['type']),
limit=dict(default=-1, aliases=['max'], type='int'),
domain=dict(),
account=dict(),
Expand Down