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

@@ -74,18 +74,22 @@ RETURN = r"""
"""
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"]),
vol=dict(required=True),
pool=dict(),
size=dict()
size=dict(),
)
)
@@ -95,20 +99,17 @@ def main():
xcli_client = connect_ssl(module)
# required args
volume = xcli_client.cmd.vol_list(
vol=module.params.get('vol')).as_single_element
state = module.params['state']
volume = xcli_client.cmd.vol_list(vol=module.params.get("vol")).as_single_element
state = module.params["state"]
state_changed = False
if state == 'present' and not volume:
state_changed = execute_pyxcli_command(
module, 'vol_create', xcli_client)
elif state == 'absent' and volume:
state_changed = execute_pyxcli_command(
module, 'vol_delete', xcli_client)
if state == "present" and not volume:
state_changed = execute_pyxcli_command(module, "vol_create", xcli_client)
elif state == "absent" and volume:
state_changed = execute_pyxcli_command(module, "vol_delete", xcli_client)
module.exit_json(changed=state_changed)
if __name__ == '__main__':
if __name__ == "__main__":
main()