Fixup elements related sanity failures
Change-Id: I6f2bba929af5a148a1f52df26916e00efcc14a07
This commit is contained in:
parent
63e444a324
commit
e39c5d0a9a
@ -25,6 +25,7 @@ options:
|
|||||||
required: false
|
required: false
|
||||||
default: []
|
default: []
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
requirements: [ os-client-config ]
|
requirements: [ os-client-config ]
|
||||||
author: "Monty Taylor (@emonty)"
|
author: "Monty Taylor (@emonty)"
|
||||||
'''
|
'''
|
||||||
@ -55,7 +56,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(argument_spec=dict(
|
module = AnsibleModule(argument_spec=dict(
|
||||||
clouds=dict(required=False, type='list', default=[]),
|
clouds=dict(required=False, type='list', default=[], elements='str'),
|
||||||
))
|
))
|
||||||
|
|
||||||
if not HAS_OS_CLIENT_CONFIG:
|
if not HAS_OS_CLIENT_CONFIG:
|
||||||
|
@ -77,6 +77,12 @@ options:
|
|||||||
- 'A list of network interface cards, eg, " - mac: aa:bb:cc:aa:bb:cc"'
|
- 'A list of network interface cards, eg, " - mac: aa:bb:cc:aa:bb:cc"'
|
||||||
required: true
|
required: true
|
||||||
type: list
|
type: list
|
||||||
|
elements: dict
|
||||||
|
suboptions:
|
||||||
|
mac:
|
||||||
|
description: The MAC address of the network interface card.
|
||||||
|
type: str
|
||||||
|
required: true
|
||||||
properties:
|
properties:
|
||||||
description:
|
description:
|
||||||
- Definition of the physical characteristics of this server, used for scheduling purposes
|
- Definition of the physical characteristics of this server, used for scheduling purposes
|
||||||
@ -229,7 +235,7 @@ def main():
|
|||||||
name=dict(required=False),
|
name=dict(required=False),
|
||||||
driver=dict(required=False),
|
driver=dict(required=False),
|
||||||
driver_info=dict(type='dict', required=True),
|
driver_info=dict(type='dict', required=True),
|
||||||
nics=dict(type='list', required=True),
|
nics=dict(type='list', required=True, elements="dict"),
|
||||||
properties=dict(type='dict', default={}),
|
properties=dict(type='dict', default={}),
|
||||||
ironic_url=dict(required=False),
|
ironic_url=dict(required=False),
|
||||||
chassis_uuid=dict(required=False),
|
chassis_uuid=dict(required=False),
|
||||||
|
@ -117,6 +117,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The name or ID of the subnet the member service is
|
- The name or ID of the subnet the member service is
|
||||||
accessible from.
|
accessible from.
|
||||||
|
elements: dict
|
||||||
type: list
|
type: list
|
||||||
wait:
|
wait:
|
||||||
description:
|
description:
|
||||||
@ -336,7 +337,7 @@ def main():
|
|||||||
vip_subnet=dict(required=False),
|
vip_subnet=dict(required=False),
|
||||||
vip_port=dict(required=False),
|
vip_port=dict(required=False),
|
||||||
vip_address=dict(required=False),
|
vip_address=dict(required=False),
|
||||||
listeners=dict(type='list', default=[]),
|
listeners=dict(type='list', default=[], elements='dict'),
|
||||||
public_ip_address=dict(required=False, default=None),
|
public_ip_address=dict(required=False, default=None),
|
||||||
auto_public_ip=dict(required=False, default=False, type='bool'),
|
auto_public_ip=dict(required=False, default=False, type='bool'),
|
||||||
public_network=dict(required=False),
|
public_network=dict(required=False),
|
||||||
|
@ -32,6 +32,15 @@ options:
|
|||||||
- Desired IP and/or subnet for this port. Subnet is referenced by
|
- Desired IP and/or subnet for this port. Subnet is referenced by
|
||||||
subnet_id and IP is referenced by ip_address.
|
subnet_id and IP is referenced by ip_address.
|
||||||
type: list
|
type: list
|
||||||
|
elements: dict
|
||||||
|
suboptions:
|
||||||
|
ip_address:
|
||||||
|
description: The fixed IP address to attempt to allocate.
|
||||||
|
required: true
|
||||||
|
type: str
|
||||||
|
subnet_id:
|
||||||
|
description: The subnet to attach the IP address to.
|
||||||
|
type: str
|
||||||
admin_state_up:
|
admin_state_up:
|
||||||
description:
|
description:
|
||||||
- Sets admin state.
|
- Sets admin state.
|
||||||
@ -45,6 +54,7 @@ options:
|
|||||||
- Security group(s) ID(s) or name(s) associated with the port (comma
|
- Security group(s) ID(s) or name(s) associated with the port (comma
|
||||||
separated string or YAML list)
|
separated string or YAML list)
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
no_security_groups:
|
no_security_groups:
|
||||||
description:
|
description:
|
||||||
- Do not associate a security group with this port.
|
- Do not associate a security group with this port.
|
||||||
@ -59,6 +69,14 @@ options:
|
|||||||
mac_address: ab:cd:ef:12:34:56
|
mac_address: ab:cd:ef:12:34:56
|
||||||
- ip_address: ..."
|
- ip_address: ..."
|
||||||
type: list
|
type: list
|
||||||
|
elements: dict
|
||||||
|
suboptions:
|
||||||
|
ip_address:
|
||||||
|
description: The IP address.
|
||||||
|
type: str
|
||||||
|
mac_address:
|
||||||
|
description: The MAC address.
|
||||||
|
type: str
|
||||||
extra_dhcp_opts:
|
extra_dhcp_opts:
|
||||||
description:
|
description:
|
||||||
- "Extra dhcp options to be assigned to this port. Extra options are
|
- "Extra dhcp options to be assigned to this port. Extra options are
|
||||||
@ -70,6 +88,20 @@ options:
|
|||||||
ip_version: 4
|
ip_version: 4
|
||||||
- opt_name: ..."
|
- opt_name: ..."
|
||||||
type: list
|
type: list
|
||||||
|
elements: dict
|
||||||
|
suboptions:
|
||||||
|
opt_name:
|
||||||
|
description: The name of the DHCP option to set.
|
||||||
|
type: str
|
||||||
|
required: true
|
||||||
|
opt_value:
|
||||||
|
description: The value of the DHCP option to set.
|
||||||
|
type: str
|
||||||
|
required: true
|
||||||
|
ip_version:
|
||||||
|
description: The IP version this DHCP option is for.
|
||||||
|
type: int
|
||||||
|
required: true
|
||||||
device_owner:
|
device_owner:
|
||||||
description:
|
description:
|
||||||
- The ID of the entity that uses this port.
|
- The ID of the entity that uses this port.
|
||||||
@ -354,13 +386,13 @@ def main():
|
|||||||
argument_spec = openstack_full_argument_spec(
|
argument_spec = openstack_full_argument_spec(
|
||||||
network=dict(required=False),
|
network=dict(required=False),
|
||||||
name=dict(required=False),
|
name=dict(required=False),
|
||||||
fixed_ips=dict(type='list', default=None),
|
fixed_ips=dict(type='list', default=None, elements='dict'),
|
||||||
admin_state_up=dict(type='bool', default=None),
|
admin_state_up=dict(type='bool', default=None),
|
||||||
mac_address=dict(default=None),
|
mac_address=dict(default=None),
|
||||||
security_groups=dict(default=None, type='list'),
|
security_groups=dict(default=None, type='list', elements='str'),
|
||||||
no_security_groups=dict(default=False, type='bool'),
|
no_security_groups=dict(default=False, type='bool'),
|
||||||
allowed_address_pairs=dict(type='list', default=None),
|
allowed_address_pairs=dict(type='list', default=None, elements='dict'),
|
||||||
extra_dhcp_opts=dict(type='list', default=None),
|
extra_dhcp_opts=dict(type='list', default=None, elements='dict'),
|
||||||
device_owner=dict(default=None),
|
device_owner=dict(default=None),
|
||||||
device_id=dict(default=None),
|
device_id=dict(default=None),
|
||||||
state=dict(default='present', choices=['absent', 'present']),
|
state=dict(default='present', choices=['absent', 'present']),
|
||||||
|
@ -38,6 +38,7 @@ options:
|
|||||||
- List of recordset definitions.
|
- List of recordset definitions.
|
||||||
- Required when I(state=present).
|
- Required when I(state=present).
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- Description of the recordset
|
- Description of the recordset
|
||||||
@ -150,7 +151,7 @@ def main():
|
|||||||
zone=dict(required=True),
|
zone=dict(required=True),
|
||||||
name=dict(required=True),
|
name=dict(required=True),
|
||||||
recordset_type=dict(required=False),
|
recordset_type=dict(required=False),
|
||||||
records=dict(required=False, type='list'),
|
records=dict(required=False, type='list', elements='str'),
|
||||||
description=dict(required=False, default=None),
|
description=dict(required=False, default=None),
|
||||||
ttl=dict(required=False, default=None, type='int'),
|
ttl=dict(required=False, default=None, type='int'),
|
||||||
state=dict(default='present', choices=['absent', 'present']),
|
state=dict(default='present', choices=['absent', 'present']),
|
||||||
|
@ -55,6 +55,15 @@ options:
|
|||||||
address to assign on the subnet (ip). If no IP is specified,
|
address to assign on the subnet (ip). If no IP is specified,
|
||||||
one is automatically assigned from that subnet.
|
one is automatically assigned from that subnet.
|
||||||
type: list
|
type: list
|
||||||
|
elements: dict
|
||||||
|
suboptions:
|
||||||
|
ip:
|
||||||
|
description: The fixed IP address to attempt to allocate.
|
||||||
|
required: true
|
||||||
|
type: str
|
||||||
|
subnet:
|
||||||
|
description: The subnet to attach the IP address to.
|
||||||
|
type: str
|
||||||
interfaces:
|
interfaces:
|
||||||
description:
|
description:
|
||||||
- List of subnets to attach to the router internal interface. Default
|
- List of subnets to attach to the router internal interface. Default
|
||||||
@ -62,12 +71,13 @@ options:
|
|||||||
with the router's internal interface.
|
with the router's internal interface.
|
||||||
In order to provide an ip address different from the default
|
In order to provide an ip address different from the default
|
||||||
gateway,parameters are passed as dictionary with keys as network
|
gateway,parameters are passed as dictionary with keys as network
|
||||||
name or ID(net), subnet name or ID (subnet) and the IP of
|
name or ID (I(net)), subnet name or ID (I(subnet)) and the IP of
|
||||||
port (portip) from the network.
|
port (I(portip)) from the network.
|
||||||
User defined portip is often required when a multiple router need
|
User defined portip is often required when a multiple router need
|
||||||
to be connected to a single subnet for which the default gateway has
|
to be connected to a single subnet for which the default gateway has
|
||||||
been already used.
|
been already used.
|
||||||
type: list
|
type: list
|
||||||
|
elements: raw
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 3.6"
|
- "python >= 3.6"
|
||||||
- "openstacksdk"
|
- "openstacksdk"
|
||||||
@ -377,8 +387,8 @@ def main():
|
|||||||
admin_state_up=dict(type='bool', default=True),
|
admin_state_up=dict(type='bool', default=True),
|
||||||
enable_snat=dict(type='bool'),
|
enable_snat=dict(type='bool'),
|
||||||
network=dict(default=None),
|
network=dict(default=None),
|
||||||
interfaces=dict(type='list', default=None),
|
interfaces=dict(type='list', default=None, elements='raw'),
|
||||||
external_fixed_ips=dict(type='list', default=None),
|
external_fixed_ips=dict(type='list', default=None, elements='dict'),
|
||||||
project=dict(default=None)
|
project=dict(default=None)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ options:
|
|||||||
added. This may be a YAML list or a comma separated string.
|
added. This may be a YAML list or a comma separated string.
|
||||||
type: list
|
type: list
|
||||||
default: ['default']
|
default: ['default']
|
||||||
|
elements: str
|
||||||
network:
|
network:
|
||||||
description:
|
description:
|
||||||
- Name or ID of a network to attach this instance to. A simpler
|
- Name or ID of a network to attach this instance to. A simpler
|
||||||
@ -87,6 +88,7 @@ options:
|
|||||||
Eg: nics: "net-id=uuid-1,port-name=myport"
|
Eg: nics: "net-id=uuid-1,port-name=myport"
|
||||||
Only one of network or nics should be supplied.'
|
Only one of network or nics should be supplied.'
|
||||||
type: list
|
type: list
|
||||||
|
elements: raw
|
||||||
suboptions:
|
suboptions:
|
||||||
tag:
|
tag:
|
||||||
description:
|
description:
|
||||||
@ -102,10 +104,12 @@ options:
|
|||||||
description:
|
description:
|
||||||
- list of valid floating IPs that pre-exist to assign to this node
|
- list of valid floating IPs that pre-exist to assign to this node
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
floating_ip_pools:
|
floating_ip_pools:
|
||||||
description:
|
description:
|
||||||
- Name of floating IP pool from which to choose a floating IP
|
- Name of floating IP pool from which to choose a floating IP
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
meta:
|
meta:
|
||||||
description:
|
description:
|
||||||
- 'A list of key value pairs that should be provided as a metadata to
|
- 'A list of key value pairs that should be provided as a metadata to
|
||||||
@ -160,6 +164,7 @@ options:
|
|||||||
- A list of preexisting volumes names or ids to attach to the instance
|
- A list of preexisting volumes names or ids to attach to the instance
|
||||||
default: []
|
default: []
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
scheduler_hints:
|
scheduler_hints:
|
||||||
description:
|
description:
|
||||||
- Arbitrary key/value pairs to the scheduler for custom use
|
- Arbitrary key/value pairs to the scheduler for custom use
|
||||||
@ -628,20 +633,20 @@ class ServerModule(OpenStackModule):
|
|||||||
flavor_ram=dict(default=None, type='int'),
|
flavor_ram=dict(default=None, type='int'),
|
||||||
flavor_include=dict(default=None),
|
flavor_include=dict(default=None),
|
||||||
key_name=dict(default=None),
|
key_name=dict(default=None),
|
||||||
security_groups=dict(default=['default'], type='list'),
|
security_groups=dict(default=['default'], type='list', elements='str'),
|
||||||
network=dict(default=None),
|
network=dict(default=None),
|
||||||
nics=dict(default=[], type='list'),
|
nics=dict(default=[], type='list', elements='raw'),
|
||||||
meta=dict(default=None, type='raw'),
|
meta=dict(default=None, type='raw'),
|
||||||
userdata=dict(default=None, aliases=['user_data']),
|
userdata=dict(default=None, aliases=['user_data']),
|
||||||
config_drive=dict(default=False, type='bool'),
|
config_drive=dict(default=False, type='bool'),
|
||||||
auto_ip=dict(default=True, type='bool', aliases=['auto_floating_ip', 'public_ip']),
|
auto_ip=dict(default=True, type='bool', aliases=['auto_floating_ip', 'public_ip']),
|
||||||
floating_ips=dict(default=None, type='list'),
|
floating_ips=dict(default=None, type='list', elements='str'),
|
||||||
floating_ip_pools=dict(default=None, type='list'),
|
floating_ip_pools=dict(default=None, type='list', elements='str'),
|
||||||
volume_size=dict(default=None, type='int'),
|
volume_size=dict(default=None, type='int'),
|
||||||
boot_from_volume=dict(default=False, type='bool'),
|
boot_from_volume=dict(default=False, type='bool'),
|
||||||
boot_volume=dict(default=None, aliases=['root_volume']),
|
boot_volume=dict(default=None, aliases=['root_volume']),
|
||||||
terminate_volume=dict(default=False, type='bool'),
|
terminate_volume=dict(default=False, type='bool'),
|
||||||
volumes=dict(default=[], type='list'),
|
volumes=dict(default=[], type='list', elements='str'),
|
||||||
scheduler_hints=dict(default=None, type='dict'),
|
scheduler_hints=dict(default=None, type='dict'),
|
||||||
state=dict(default='present', choices=['absent', 'present']),
|
state=dict(default='present', choices=['absent', 'present']),
|
||||||
delete_fip=dict(default=False, type='bool'),
|
delete_fip=dict(default=False, type='bool'),
|
||||||
|
@ -38,6 +38,7 @@ options:
|
|||||||
and soft-affinity.
|
and soft-affinity.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 3.6"
|
- "python >= 3.6"
|
||||||
- "openstacksdk"
|
- "openstacksdk"
|
||||||
@ -119,7 +120,7 @@ def _system_state_change(state, server_group):
|
|||||||
def main():
|
def main():
|
||||||
argument_spec = openstack_full_argument_spec(
|
argument_spec = openstack_full_argument_spec(
|
||||||
name=dict(required=True),
|
name=dict(required=True),
|
||||||
policies=dict(required=False, type='list'),
|
policies=dict(required=False, type='list', elements='str'),
|
||||||
state=dict(default='present', choices=['absent', 'present']),
|
state=dict(default='present', choices=['absent', 'present']),
|
||||||
)
|
)
|
||||||
module_kwargs = openstack_module_kwargs()
|
module_kwargs = openstack_module_kwargs()
|
||||||
|
@ -44,6 +44,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- List of environment files that should be used for the stack creation
|
- List of environment files that should be used for the stack creation
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
parameters:
|
parameters:
|
||||||
description:
|
description:
|
||||||
- Dictionary of parameters for the stack creation
|
- Dictionary of parameters for the stack creation
|
||||||
@ -221,7 +222,7 @@ def main():
|
|||||||
name=dict(required=True),
|
name=dict(required=True),
|
||||||
tag=dict(required=False, default=None),
|
tag=dict(required=False, default=None),
|
||||||
template=dict(default=None),
|
template=dict(default=None),
|
||||||
environment=dict(default=None, type='list'),
|
environment=dict(default=None, type='list', elements='str'),
|
||||||
parameters=dict(default={}, type='dict'),
|
parameters=dict(default={}, type='dict'),
|
||||||
rollback=dict(default=False, type='bool'),
|
rollback=dict(default=False, type='bool'),
|
||||||
timeout=dict(default=3600, type='int'),
|
timeout=dict(default=3600, type='int'),
|
||||||
|
@ -66,6 +66,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- List of DNS nameservers for this subnet.
|
- List of DNS nameservers for this subnet.
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
allocation_pool_start:
|
allocation_pool_start:
|
||||||
description:
|
description:
|
||||||
- From the subnet pool the starting address from which the IP should
|
- From the subnet pool the starting address from which the IP should
|
||||||
@ -80,6 +81,16 @@ options:
|
|||||||
description:
|
description:
|
||||||
- A list of host route dictionaries for the subnet.
|
- A list of host route dictionaries for the subnet.
|
||||||
type: list
|
type: list
|
||||||
|
elements: dict
|
||||||
|
suboptions:
|
||||||
|
destination:
|
||||||
|
description: The destination network (CIDR).
|
||||||
|
type: str
|
||||||
|
required: true
|
||||||
|
nexthop:
|
||||||
|
description: The next hop (aka gateway) for the I(destination).
|
||||||
|
type: str
|
||||||
|
required: true
|
||||||
ipv6_ra_mode:
|
ipv6_ra_mode:
|
||||||
description:
|
description:
|
||||||
- IPv6 router advertisement mode
|
- IPv6 router advertisement mode
|
||||||
@ -239,10 +250,10 @@ def main():
|
|||||||
enable_dhcp=dict(type='bool', default=True),
|
enable_dhcp=dict(type='bool', default=True),
|
||||||
gateway_ip=dict(type='str'),
|
gateway_ip=dict(type='str'),
|
||||||
no_gateway_ip=dict(type='bool', default=False),
|
no_gateway_ip=dict(type='bool', default=False),
|
||||||
dns_nameservers=dict(type='list', default=None),
|
dns_nameservers=dict(type='list', default=None, elements='str'),
|
||||||
allocation_pool_start=dict(type='str'),
|
allocation_pool_start=dict(type='str'),
|
||||||
allocation_pool_end=dict(type='str'),
|
allocation_pool_end=dict(type='str'),
|
||||||
host_routes=dict(type='list', default=None),
|
host_routes=dict(type='list', default=None, elements='dict'),
|
||||||
ipv6_ra_mode=dict(type='str', choices=ipv6_mode_choices),
|
ipv6_ra_mode=dict(type='str', choices=ipv6_mode_choices),
|
||||||
ipv6_address_mode=dict(type='str', choices=ipv6_mode_choices),
|
ipv6_address_mode=dict(type='str', choices=ipv6_mode_choices),
|
||||||
use_default_subnetpool=dict(type='bool', default=False),
|
use_default_subnetpool=dict(type='bool', default=False),
|
||||||
|
@ -44,6 +44,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Master nameservers (only applies if zone_type is secondary)
|
- Master nameservers (only applies if zone_type is secondary)
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Should the resource be present or absent.
|
- Should the resource be present or absent.
|
||||||
@ -168,7 +169,7 @@ def main():
|
|||||||
email=dict(required=False, default=None),
|
email=dict(required=False, default=None),
|
||||||
description=dict(required=False, default=None),
|
description=dict(required=False, default=None),
|
||||||
ttl=dict(required=False, default=None, type='int'),
|
ttl=dict(required=False, default=None, type='int'),
|
||||||
masters=dict(required=False, default=None, type='list'),
|
masters=dict(required=False, default=None, type='list', elements='str'),
|
||||||
state=dict(default='present', choices=['absent', 'present']),
|
state=dict(default='present', choices=['absent', 'present']),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user