cloudstack: cs_account: add state unlocked as alias for enabled

This commit is contained in:
Rene Moser 2015-09-11 19:02:01 +02:00 committed by Matt Clay
parent 25b72ac7e0
commit 497bca48d1

View file

@ -85,9 +85,10 @@ options:
state: state:
description: description:
- State of the account. - State of the account.
- C(unlocked) is an alias for C(enabled).
required: false required: false
default: 'present' default: 'present'
choices: [ 'present', 'absent', 'enabled', 'disabled', 'locked' ] choices: [ 'present', 'absent', 'enabled', 'disabled', 'locked', 'unlocked' ]
poll_async: poll_async:
description: description:
- Poll async jobs until job has finished. - Poll async jobs until job has finished.
@ -350,7 +351,7 @@ def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec = dict( argument_spec = dict(
name = dict(required=True), name = dict(required=True),
state = dict(choices=['present', 'absent', 'enabled', 'disabled', 'locked' ], default='present'), state = dict(choices=['present', 'absent', 'enabled', 'disabled', 'locked', 'unlocked'], default='present'),
account_type = dict(choices=['user', 'root_admin', 'domain_admin'], default='user'), account_type = dict(choices=['user', 'root_admin', 'domain_admin'], default='user'),
network_domain = dict(default=None), network_domain = dict(default=None),
domain = dict(default='ROOT'), domain = dict(default='ROOT'),
@ -385,7 +386,7 @@ def main():
if state in ['absent']: if state in ['absent']:
account = acs_acc.absent_account() account = acs_acc.absent_account()
elif state in ['enabled']: elif state in ['enabled', 'unlocked']:
account = acs_acc.enable_account() account = acs_acc.enable_account()
elif state in ['disabled']: elif state in ['disabled']: