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

@@ -6,8 +6,7 @@ from __future__ import annotations
emc_vnx_argument_spec = {
'sp_address': dict(type='str', required=True),
'sp_user': dict(type='str', required=False, default='sysadmin'),
'sp_password': dict(type='str', required=False, default='sysadmin',
no_log=True),
"sp_address": dict(type="str", required=True),
"sp_user": dict(type="str", required=False, default="sysadmin"),
"sp_password": dict(type="str", required=False, default="sysadmin", no_log=True),
}

View File

@@ -11,7 +11,7 @@ from ansible.module_utils import basic
def convert_to_binary_multiple(size_with_unit):
if size_with_unit is None:
return -1
valid_units = ['MiB', 'GiB', 'TiB']
valid_units = ["MiB", "GiB", "TiB"]
valid_unit = False
for unit in valid_units:
if size_with_unit.strip().endswith(unit):
@@ -22,47 +22,24 @@ def convert_to_binary_multiple(size_with_unit):
if not valid_unit:
raise ValueError(f"{size_with_unit} does not have a valid unit. The unit must be one of {valid_units}")
size = size_with_unit.replace(" ", "").split('iB')[0]
size = size_with_unit.replace(" ", "").split("iB")[0]
size_kib = basic.human_to_bytes(size)
return int(size_kib / (1024 * 1024))
storage_system_spec = {
"storage_system_ip": {
"required": True,
"type": "str"
},
"storage_system_username": {
"required": True,
"type": "str",
"no_log": True
},
"storage_system_password": {
"required": True,
"type": "str",
"no_log": True
},
"secure": {
"type": "bool",
"default": False
}
"storage_system_ip": {"required": True, "type": "str"},
"storage_system_username": {"required": True, "type": "str", "no_log": True},
"storage_system_password": {"required": True, "type": "str", "no_log": True},
"secure": {"type": "bool", "default": False},
}
def cpg_argument_spec():
spec = {
"state": {
"required": True,
"choices": ['present', 'absent'],
"type": 'str'
},
"cpg_name": {
"required": True,
"type": "str"
},
"domain": {
"type": "str"
},
"state": {"required": True, "choices": ["present", "absent"], "type": "str"},
"cpg_name": {"required": True, "type": "str"},
"domain": {"type": "str"},
"growth_increment": {
"type": "str",
},
@@ -72,23 +49,10 @@ def cpg_argument_spec():
"growth_warning": {
"type": "str",
},
"raid_type": {
"required": False,
"type": "str",
"choices": ['R0', 'R1', 'R5', 'R6']
},
"set_size": {
"required": False,
"type": "int"
},
"high_availability": {
"type": "str",
"choices": ['PORT', 'CAGE', 'MAG']
},
"disk_type": {
"type": "str",
"choices": ['FC', 'NL', 'SSD']
}
"raid_type": {"required": False, "type": "str", "choices": ["R0", "R1", "R5", "R6"]},
"set_size": {"required": False, "type": "int"},
"high_availability": {"type": "str", "choices": ["PORT", "CAGE", "MAG"]},
"disk_type": {"type": "str", "choices": ["FC", "NL", "SSD"]},
}
spec.update(storage_system_spec)
return spec