diff --git a/class_generator/schema/__resources-mappings.json.gz b/class_generator/schema/__resources-mappings.json.gz index 6df739924e..173d041708 100644 Binary files a/class_generator/schema/__resources-mappings.json.gz and b/class_generator/schema/__resources-mappings.json.gz differ diff --git a/ocp_resources/file_restore_operator.py b/ocp_resources/file_restore_operator.py new file mode 100644 index 0000000000..e2fda6a03e --- /dev/null +++ b/ocp_resources/file_restore_operator.py @@ -0,0 +1,49 @@ +# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/class_generator/README.md + + +from typing import Any + +from ocp_resources.resource import NamespacedResource + + +class FileRestoreOperator(NamespacedResource): + """ + FileRestoreOperator is the Schema for the filerestoreoperators API + """ + + api_group: str = NamespacedResource.ApiGroup.FILERESTORE_KUBEVIRT_IO + + def __init__( + self, + image_pull_policy: str | None = None, + tls_security_profile: dict[str, Any] | None = None, + **kwargs: Any, + ) -> None: + r""" + Args: + image_pull_policy (str): ImagePullPolicy describes a policy for if/when to pull container + images + + tls_security_profile (dict[str, Any]): TLSSecurityProfile configures TLS settings for metrics server + + """ + super().__init__(**kwargs) + + self.image_pull_policy = image_pull_policy + self.tls_security_profile = tls_security_profile + + def to_dict(self) -> None: + + super().to_dict() + + if not self.kind_dict and not self.yaml_file: + self.res["spec"] = {} + _spec = self.res["spec"] + + if self.image_pull_policy is not None: + _spec["imagePullPolicy"] = self.image_pull_policy + + if self.tls_security_profile is not None: + _spec["tlsSecurityProfile"] = self.tls_security_profile + + # End of generated code diff --git a/ocp_resources/resource.py b/ocp_resources/resource.py index 279b52cc94..e9c07318c0 100644 --- a/ocp_resources/resource.py +++ b/ocp_resources/resource.py @@ -514,6 +514,7 @@ class ApiGroup: EVENTS_K8S_IO: str = "events.k8s.io" EXPORT_KUBEVIRT_IO: str = "export.kubevirt.io" FENCE_AGENTS_REMEDIATION_MEDIK8S_IO: str = "fence-agents-remediation.medik8s.io" + FILERESTORE_KUBEVIRT_IO: str = "filerestore.kubevirt.io" FORKLIFT_KONVEYOR_IO: str = "forklift.konveyor.io" FRRK8S_METALLB_IO = "frrk8s.metallb.io" GATEWAY_NETWORKING_K8S_IO: str = "gateway.networking.k8s.io"