Reformat everything.

This commit is contained in:
Felix Fontein
2025-11-01 12:08:41 +01:00
parent 3f2213791a
commit 340ff8586d
1008 changed files with 61301 additions and 58309 deletions

View File

@@ -118,15 +118,19 @@ msg:
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import execute_pyxcli_command, \
connect_ssl, spectrum_accelerate_spec, is_pyxcli_installed
from ansible_collections.community.general.plugins.module_utils.ibm_sa_utils import (
execute_pyxcli_command,
connect_ssl,
spectrum_accelerate_spec,
is_pyxcli_installed,
)
def main():
argument_spec = spectrum_accelerate_spec()
argument_spec.update(
dict(
state=dict(default='present', choices=['present', 'absent']),
state=dict(default="present", choices=["present", "absent"]),
domain=dict(required=True),
size=dict(),
max_dms=dict(),
@@ -137,7 +141,7 @@ def main():
max_volumes=dict(),
perf_class=dict(),
hard_capacity=dict(),
soft_capacity=dict()
soft_capacity=dict(),
)
)
@@ -146,19 +150,16 @@ def main():
is_pyxcli_installed(module)
xcli_client = connect_ssl(module)
domain = xcli_client.cmd.domain_list(
domain=module.params['domain']).as_single_element
state = module.params['state']
domain = xcli_client.cmd.domain_list(domain=module.params["domain"]).as_single_element
state = module.params["state"]
state_changed = False
msg = f"Domain '{module.params['domain']}'"
if state == 'present' and not domain:
state_changed = execute_pyxcli_command(
module, 'domain_create', xcli_client)
if state == "present" and not domain:
state_changed = execute_pyxcli_command(module, "domain_create", xcli_client)
msg += " created successfully."
elif state == 'absent' and domain:
state_changed = execute_pyxcli_command(
module, 'domain_delete', xcli_client)
elif state == "absent" and domain:
state_changed = execute_pyxcli_command(module, "domain_delete", xcli_client)
msg += " deleted successfully."
else:
msg += " state unchanged."
@@ -166,5 +167,5 @@ def main():
module.exit_json(changed=state_changed, msg=msg)
if __name__ == '__main__':
if __name__ == "__main__":
main()