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 = rax_argument_spec()
argument_spec.update( argument_spec.update(
dict( dict(
state=dict(default='present'), state=dict(default='present', choices=['present', 'absent']),
label=dict(), label=dict(required=True),
entity_id=dict(), entity_id=dict(required=True),
check_id=dict(), check_id=dict(required=True),
notification_plan_id=dict(), notification_plan_id=dict(required=True),
criteria=dict(), criteria=dict(),
disabled=dict(type='bool', default=False), disabled=dict(type='bool', default=False),
metadata=dict(type='dict') metadata=dict(type='dict')

View file

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

View file

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

View file

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