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

@@ -84,37 +84,35 @@ from ansible_collections.community.general.plugins.module_utils.oneview import O
class FcNetworkModule(OneViewModuleBase):
MSG_CREATED = 'FC Network created successfully.'
MSG_UPDATED = 'FC Network updated successfully.'
MSG_DELETED = 'FC Network deleted successfully.'
MSG_ALREADY_PRESENT = 'FC Network is already present.'
MSG_ALREADY_ABSENT = 'FC Network is already absent.'
RESOURCE_FACT_NAME = 'fc_network'
MSG_CREATED = "FC Network created successfully."
MSG_UPDATED = "FC Network updated successfully."
MSG_DELETED = "FC Network deleted successfully."
MSG_ALREADY_PRESENT = "FC Network is already present."
MSG_ALREADY_ABSENT = "FC Network is already absent."
RESOURCE_FACT_NAME = "fc_network"
def __init__(self):
additional_arg_spec = dict(data=dict(required=True, type='dict'),
state=dict(
required=True,
choices=['present', 'absent']))
additional_arg_spec = dict(
data=dict(required=True, type="dict"), state=dict(required=True, choices=["present", "absent"])
)
super().__init__(additional_arg_spec=additional_arg_spec, validate_etag_support=True)
self.resource_client = self.oneview_client.fc_networks
def execute_module(self):
resource = self.get_by_name(self.data['name'])
resource = self.get_by_name(self.data["name"])
if self.state == 'present':
if self.state == "present":
return self._present(resource)
else:
return self.resource_absent(resource)
def _present(self, resource):
scope_uris = self.data.pop('scopeUris', None)
scope_uris = self.data.pop("scopeUris", None)
result = self.resource_present(resource, self.RESOURCE_FACT_NAME)
if scope_uris is not None:
result = self.resource_scopes_set(result, 'fc_network', scope_uris)
result = self.resource_scopes_set(result, "fc_network", scope_uris)
return result
@@ -122,5 +120,5 @@ def main():
FcNetworkModule().run()
if __name__ == '__main__':
if __name__ == "__main__":
main()