diff --git a/lib/ansible/modules/cloud/cloudstack/cs_account.py b/lib/ansible/modules/cloud/cloudstack/cs_account.py index 73303414da5..a35089d54ff 100644 --- a/lib/ansible/modules/cloud/cloudstack/cs_account.py +++ b/lib/ansible/modules/cloud/cloudstack/cs_account.py @@ -178,7 +178,13 @@ domain: ''' # 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): @@ -190,8 +196,8 @@ class AnsibleCloudStackAccount(AnsibleCloudStack): } self.account = None self.account_types = { - 'user': 0, - 'root_admin': 1, + 'user': 0, + 'root_admin': 1, 'domain_admin': 2, } @@ -336,14 +342,14 @@ def main(): name=dict(required=True), state=dict(choices=['present', 'absent', 'enabled', 'disabled', 'locked', 'unlocked'], default='present'), account_type=dict(choices=['user', 'root_admin', 'domain_admin'], default='user'), - network_domain=dict(default=None), + network_domain=dict(), domain=dict(default='ROOT'), - email=dict(default=None), - first_name=dict(default=None), - last_name=dict(default=None), - username=dict(default=None), - password=dict(default=None, no_log=True), - timezone=dict(default=None), + email=dict(), + first_name=dict(), + last_name=dict(), + username=dict(), + password=dict(no_log=True), + timezone=dict(), poll_async=dict(type='bool', default=True), )) @@ -380,7 +386,6 @@ def main(): module.exit_json(**result) -# import module snippets -from ansible.module_utils.basic import * + if __name__ == '__main__': main() diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index fa47b76c840..3e3c5f05102 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -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/centurylink/clc_loadbalancer.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_domain.py lib/ansible/modules/cloud/cloudstack/cs_facts.py