Replace choices=BOOLEANS by type='bool', fix #1326

reviewable/pr18780/r1
Michael Scherer 9 years ago
parent 1ae3b6a020
commit 2f3dc1352f

@ -1684,7 +1684,7 @@ def main():
type='str' type='str'
), ),
container_log=dict( container_log=dict(
choices=BOOLEANS, type='bool',
default='false' default='false'
), ),
container_log_level=dict( container_log_level=dict(
@ -1696,11 +1696,11 @@ def main():
required=False required=False
), ),
clone_snapshot=dict( clone_snapshot=dict(
choices=BOOLEANS, type='bool',
default='false' default='false'
), ),
archive=dict( archive=dict(
choices=BOOLEANS, type='bool',
default='false' default='false'
), ),
archive_path=dict( archive_path=dict(

@ -273,7 +273,7 @@ def main():
api_user = dict(required=True), api_user = dict(required=True),
api_password = dict(no_log=True), api_password = dict(no_log=True),
vmid = dict(required=True), vmid = dict(required=True),
validate_certs = dict(type='bool', choices=BOOLEANS, default='no'), validate_certs = dict(type='bool', default='no'),
node = dict(), node = dict(),
password = dict(no_log=True), password = dict(no_log=True),
hostname = dict(), hostname = dict(),
@ -284,13 +284,13 @@ def main():
swap = dict(type='int', default=0), swap = dict(type='int', default=0),
netif = dict(), netif = dict(),
ip_address = dict(), ip_address = dict(),
onboot = dict(type='bool', choices=BOOLEANS, default='no'), onboot = dict(type='bool', default='no'),
storage = dict(default='local'), storage = dict(default='local'),
cpuunits = dict(type='int', default=1000), cpuunits = dict(type='int', default=1000),
nameserver = dict(), nameserver = dict(),
searchdomain = dict(), searchdomain = dict(),
timeout = dict(type='int', default=30), timeout = dict(type='int', default=30),
force = dict(type='bool', choices=BOOLEANS, default='no'), force = dict(type='bool', default='no'),
state = dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']), state = dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']),
) )
) )

@ -156,14 +156,14 @@ def main():
api_host = dict(required=True), api_host = dict(required=True),
api_user = dict(required=True), api_user = dict(required=True),
api_password = dict(no_log=True), api_password = dict(no_log=True),
validate_certs = dict(type='bool', choices=BOOLEANS, default='no'), validate_certs = dict(type='bool', default='no'),
node = dict(), node = dict(),
src = dict(), src = dict(),
template = dict(), template = dict(),
content_type = dict(default='vztmpl', choices=['vztmpl','iso']), content_type = dict(default='vztmpl', choices=['vztmpl','iso']),
storage = dict(default='local'), storage = dict(default='local'),
timeout = dict(type='int', default=30), timeout = dict(type='int', default=30),
force = dict(type='bool', choices=BOOLEANS, default='no'), force = dict(type='bool', default='no'),
state = dict(default='present', choices=['present', 'absent']), state = dict(default='present', choices=['present', 'absent']),
) )
) )

@ -112,9 +112,9 @@ def main():
name = dict(required=True), name = dict(required=True),
state = dict(required=False, choices=['present', 'absent'], default='present'), state = dict(required=False, choices=['present', 'absent'], default='present'),
type = dict(required=True), type = dict(required=True),
autostart = dict(required=False, choices=BOOLEANS, default=False), autostart = dict(required=False, type='bool', default=False),
extra_info = dict(required=False, default=""), extra_info = dict(required=False, default=""),
port_open = dict(required=False, choices=BOOLEANS, default=False), port_open = dict(required=False, type='bool', default=False),
login_name = dict(required=True), login_name = dict(required=True),
login_password = dict(required=True), login_password = dict(required=True),
machine = dict(required=False, default=False), machine = dict(required=False, default=False),

@ -112,7 +112,7 @@ def main():
state = dict(required=False, choices=['present', 'absent'], default='present'), state = dict(required=False, choices=['present', 'absent'], default='present'),
# You can specify an IP address or hostname. # You can specify an IP address or hostname.
host = dict(required=True), host = dict(required=True),
https = dict(required=False, choices=BOOLEANS, default=False), https = dict(required=False, type='bool', default=False),
subdomains = dict(required=False, default=[]), subdomains = dict(required=False, default=[]),
site_apps = dict(required=False, default=[]), site_apps = dict(required=False, default=[]),
login_name = dict(required=True), login_name = dict(required=True),

@ -120,9 +120,9 @@ def main():
login_host = dict(default='localhost', type='str'), login_host = dict(default='localhost', type='str'),
login_port = dict(default='15672', type='str'), login_port = dict(default='15672', type='str'),
vhost = dict(default='/', type='str'), vhost = dict(default='/', type='str'),
durable = dict(default=True, choices=BOOLEANS, type='bool'), durable = dict(default=True, type='bool'),
auto_delete = dict(default=False, choices=BOOLEANS, type='bool'), auto_delete = dict(default=False, type='bool'),
internal = dict(default=False, choices=BOOLEANS, type='bool'), internal = dict(default=False, type='bool'),
exchange_type = dict(default='direct', aliases=['type'], type='str'), exchange_type = dict(default='direct', aliases=['type'], type='str'),
arguments = dict(default=dict(), type='dict') arguments = dict(default=dict(), type='dict')
), ),

@ -134,8 +134,8 @@ def main():
login_host = dict(default='localhost', type='str'), login_host = dict(default='localhost', type='str'),
login_port = dict(default='15672', type='str'), login_port = dict(default='15672', type='str'),
vhost = dict(default='/', type='str'), vhost = dict(default='/', type='str'),
durable = dict(default=True, choices=BOOLEANS, type='bool'), durable = dict(default=True, type='bool'),
auto_delete = dict(default=False, choices=BOOLEANS, type='bool'), auto_delete = dict(default=False, type='bool'),
message_ttl = dict(default=None, type='int'), message_ttl = dict(default=None, type='int'),
auto_expires = dict(default=None, type='int'), auto_expires = dict(default=None, type='int'),
max_length = dict(default=None, type='int'), max_length = dict(default=None, type='int'),

@ -144,12 +144,12 @@ def main():
query=dict(required=False), query=dict(required=False),
message=dict(required=False, default=None), message=dict(required=False, default=None),
silenced=dict(required=False, default=None, type='dict'), silenced=dict(required=False, default=None, type='dict'),
notify_no_data=dict(required=False, default=False, choices=BOOLEANS), notify_no_data=dict(required=False, default=False, type='bool'),
no_data_timeframe=dict(required=False, default=None), no_data_timeframe=dict(required=False, default=None),
timeout_h=dict(required=False, default=None), timeout_h=dict(required=False, default=None),
renotify_interval=dict(required=False, default=None), renotify_interval=dict(required=False, default=None),
escalation_message=dict(required=False, default=None), escalation_message=dict(required=False, default=None),
notify_audit=dict(required=False, default=False, choices=BOOLEANS), notify_audit=dict(required=False, default=False, type='bool'),
thresholds=dict(required=False, type='dict', default={'ok': 1, 'critical': 1, 'warning': 1}), thresholds=dict(required=False, type='dict', default={'ok': 1, 'critical': 1, 'warning': 1}),
) )
) )

@ -177,8 +177,8 @@ def main():
argument_spec = dict( argument_spec = dict(
state = dict(default='present', choices=['present', 'installed', 'absent', 'removed', 'latest']), state = dict(default='present', choices=['present', 'installed', 'absent', 'removed', 'latest']),
name = dict(type='list'), name = dict(type='list'),
update_cache = dict(default='no', choices=BOOLEANS, type='bool'), update_cache = dict(default='no', type='bool'),
upgrade = dict(default='no', choices=BOOLEANS, type='bool'), upgrade = dict(default='no', type='bool'),
), ),
required_one_of = [['name', 'update_cache', 'upgrade']], required_one_of = [['name', 'update_cache', 'upgrade']],
supports_check_mode = True supports_check_mode = True

@ -78,7 +78,7 @@ def main():
] ]
), ),
accept_licenses=dict( accept_licenses=dict(
choices=BOOLEANS, type='bool',
default=False, default=False,
aliases=['accept_licences', 'accept'], aliases=['accept_licences', 'accept'],
), ),

@ -77,8 +77,8 @@ def main():
argument_spec=dict( argument_spec=dict(
name=dict(required=True, aliases=['publisher']), name=dict(required=True, aliases=['publisher']),
state=dict(default='present', choices=['present', 'absent']), state=dict(default='present', choices=['present', 'absent']),
sticky=dict(choices=BOOLEANS), sticky=dict(type='bool'),
enabled=dict(choices=BOOLEANS), enabled=dict(type='bool'),
# search_after=dict(), # search_after=dict(),
# search_before=dict(), # search_before=dict(),
origin=dict(type='list'), origin=dict(type='list'),

@ -309,7 +309,7 @@ def main():
array_add=dict( array_add=dict(
default=False, default=False,
required=False, required=False,
choices=BOOLEANS, type='bool',
), ),
value=dict( value=dict(
default=None, default=None,

@ -240,8 +240,8 @@ def main():
argument_spec = dict( argument_spec = dict(
name = dict(required=True), name = dict(required=True),
state = dict(choices=['started', 'stopped', 'restarted', 'killed', 'reloaded', 'once']), state = dict(choices=['started', 'stopped', 'restarted', 'killed', 'reloaded', 'once']),
enabled = dict(required=False, type='bool', choices=BOOLEANS), enabled = dict(required=False, type='bool'),
downed = dict(required=False, type='bool', choices=BOOLEANS), downed = dict(required=False, type='bool'),
dist = dict(required=False, default='daemontools'), dist = dict(required=False, default='daemontools'),
service_dir = dict(required=False, default='/service'), service_dir = dict(required=False, default='/service'),
service_src = dict(required=False, default='/etc/service'), service_src = dict(required=False, default='/etc/service'),

Loading…
Cancel
Save