cloudstack: fix pep8 cs_account
This commit is contained in:
parent
e3f75227bc
commit
1778e23fad
2 changed files with 17 additions and 13 deletions
|
@ -178,7 +178,13 @@ domain:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# import cloudstack common
|
# import cloudstack common
|
||||||
from ansible.module_utils.cloudstack import *
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.cloudstack import (
|
||||||
|
AnsibleCloudStack,
|
||||||
|
CloudStackException,
|
||||||
|
cs_argument_spec,
|
||||||
|
cs_required_together
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class AnsibleCloudStackAccount(AnsibleCloudStack):
|
class AnsibleCloudStackAccount(AnsibleCloudStack):
|
||||||
|
@ -190,8 +196,8 @@ class AnsibleCloudStackAccount(AnsibleCloudStack):
|
||||||
}
|
}
|
||||||
self.account = None
|
self.account = None
|
||||||
self.account_types = {
|
self.account_types = {
|
||||||
'user': 0,
|
'user': 0,
|
||||||
'root_admin': 1,
|
'root_admin': 1,
|
||||||
'domain_admin': 2,
|
'domain_admin': 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,14 +342,14 @@ def main():
|
||||||
name=dict(required=True),
|
name=dict(required=True),
|
||||||
state=dict(choices=['present', 'absent', 'enabled', 'disabled', 'locked', 'unlocked'], 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(),
|
||||||
domain=dict(default='ROOT'),
|
domain=dict(default='ROOT'),
|
||||||
email=dict(default=None),
|
email=dict(),
|
||||||
first_name=dict(default=None),
|
first_name=dict(),
|
||||||
last_name=dict(default=None),
|
last_name=dict(),
|
||||||
username=dict(default=None),
|
username=dict(),
|
||||||
password=dict(default=None, no_log=True),
|
password=dict(no_log=True),
|
||||||
timezone=dict(default=None),
|
timezone=dict(),
|
||||||
poll_async=dict(type='bool', default=True),
|
poll_async=dict(type='bool', default=True),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -380,7 +386,6 @@ def main():
|
||||||
|
|
||||||
module.exit_json(**result)
|
module.exit_json(**result)
|
||||||
|
|
||||||
# import module snippets
|
|
||||||
from ansible.module_utils.basic import *
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -164,7 +164,6 @@ lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py
|
||||||
lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork_facts.py
|
lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork_facts.py
|
||||||
lib/ansible/modules/cloud/centurylink/clc_loadbalancer.py
|
lib/ansible/modules/cloud/centurylink/clc_loadbalancer.py
|
||||||
lib/ansible/modules/cloud/cloudscale/cloudscale_server.py
|
lib/ansible/modules/cloud/cloudscale/cloudscale_server.py
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_account.py
|
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_configuration.py
|
lib/ansible/modules/cloud/cloudstack/cs_configuration.py
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_domain.py
|
lib/ansible/modules/cloud/cloudstack/cs_domain.py
|
||||||
lib/ansible/modules/cloud/cloudstack/cs_facts.py
|
lib/ansible/modules/cloud/cloudstack/cs_facts.py
|
||||||
|
|
Loading…
Reference in a new issue