Use required=True and choices=[].

This commit is contained in:
Ash Wilson 2015-02-23 14:25:51 -06:00 committed by Matt Clay
parent 4b1bdf738e
commit 6b753c5c71
5 changed files with 17 additions and 17 deletions

View file

@ -198,11 +198,11 @@ def main():
argument_spec = rax_argument_spec()
argument_spec.update(
dict(
state=dict(default='present'),
label=dict(),
entity_id=dict(),
check_id=dict(),
notification_plan_id=dict(),
state=dict(default='present', choices=['present', 'absent']),
label=dict(required=True),
entity_id=dict(required=True),
check_id=dict(required=True),
notification_plan_id=dict(required=True),
criteria=dict(),
disabled=dict(type='bool', default=False),
metadata=dict(type='dict')

View file

@ -271,9 +271,9 @@ def main():
argument_spec = rax_argument_spec()
argument_spec.update(
dict(
entity_id=dict(),
label=dict(),
check_type=dict(),
entity_id=dict(required=True),
label=dict(required=True),
check_type=dict(required=True),
monitoring_zones_poll=dict(),
target_hostname=dict(),
target_alias=dict(),
@ -282,7 +282,7 @@ def main():
metadata=dict(type='dict', default={}),
period=dict(type='int'),
timeout=dict(type='int'),
state=dict(default='present')
state=dict(default='present', choices=['present', 'absent'])
)
)

View file

@ -161,8 +161,8 @@ def main():
argument_spec = rax_argument_spec()
argument_spec.update(
dict(
state=dict(default='present'),
label=dict(),
state=dict(default='present', choices=['present', 'absent']),
label=dict(required=True),
agent_id=dict(),
named_ip_addresses=dict(type='dict', default={}),
metadata=dict(type='dict', default={})

View file

@ -154,10 +154,10 @@ def main():
argument_spec = rax_argument_spec()
argument_spec.update(
dict(
state=dict(default='present'),
label=dict(),
notification_type=dict(),
details=dict(type='dict', default={})
state=dict(default='present', choices=['present', 'absent']),
label=dict(required=True),
notification_type=dict(required=True, choices=['webhook', 'email', 'pagerduty']),
details=dict(required=True, type='dict')
)
)

View file

@ -151,8 +151,8 @@ def main():
argument_spec = rax_argument_spec()
argument_spec.update(
dict(
state=dict(default='present'),
label=dict(),
state=dict(default='present', choices=['present', 'absent']),
label=dict(required=True),
critical_state=dict(type='list'),
warning_state=dict(type='list'),
ok_state=dict(type='list')