Use required=True and choices=[].

reviewable/pr18780/r1
Ash Wilson 10 years ago
parent 65a1129ef9
commit 205e4e5530

@ -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')

@ -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'])
) )
) )

@ -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={})

@ -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')
) )
) )

@ -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')

Loading…
Cancel
Save