Remove examples of module antipattern of setting the choices array for boolean types.

This commit is contained in:
Michael DeHaan
2013-10-11 08:45:13 -04:00
parent a9225d0c7a
commit 119b6d73dd
13 changed files with 13 additions and 16 deletions

View File

@@ -373,8 +373,8 @@ def main():
region_id = dict(type='int'),
ssh_key_ids = dict(default=''),
id = dict(aliases=['droplet_id'], type='int'),
unique_name = dict(type='bool', choices=BOOLEANS, default='no'),
wait = dict(type='bool', choices=BOOLEANS, default='yes'),
unique_name = dict(type='bool', default='no'),
wait = dict(type='bool', default=True),
wait_timeout = dict(default=300, type='int'),
ssh_pub_key = dict(type='str'),
),

View File

@@ -444,7 +444,7 @@ def main():
password = dict(type='str'),
ssh_pub_key = dict(type='str'),
swap = dict(type='int', default=512),
wait = dict(type='bool', choices=BOOLEANS, default=True),
wait = dict(type='bool', default=True),
wait_timeout = dict(default=300),
)
)

View File

@@ -247,7 +247,7 @@ def main():
key_name = dict(aliases = ['keypair']),
files = dict(type='dict', default={}),
region = dict(),
wait = dict(type='bool', choices=BOOLEANS),
wait = dict(type='bool'),
wait_timeout = dict(default=300),
)
)

View File

@@ -196,7 +196,7 @@ def main():
type=dict(choices=['primary', 'secondary']),
username=dict(),
virtualenv=dict(),
wait=dict(default=False, choices=BOOLEANS, type='bool'),
wait=dict(default=False, type='bool'),
wait_timeout=dict(default=30, type='int'),
weight=dict(type='int'),
),

View File

@@ -155,7 +155,7 @@ def main():
value = dict(required=False),
aws_secret_key = dict(aliases=['ec2_secret_key', 'secret_key'], no_log=True, required=False),
aws_access_key = dict(aliases=['ec2_access_key', 'access_key'], required=False),
overwrite = dict(required=False, choices=BOOLEANS, type='bool')
overwrite = dict(required=False, type='bool')
)
)