Coverage for ocp_resources/authorino.py: 0%
61 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-30 10:48 +0200
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-30 10:48 +0200
1# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md
3from typing import Any, Dict, Optional
4from ocp_resources.resource import NamespacedResource, MissingRequiredArgumentError
7class Authorino(NamespacedResource):
8 """
9 Authorino is the Schema for the authorinos API
10 """
12 api_group: str = NamespacedResource.ApiGroup.OPERATOR_AUTHORINO_KUADRANT_IO
14 def __init__(
15 self,
16 auth_config_label_selectors: Optional[str] = "",
17 cluster_wide: Optional[bool] = None,
18 evaluator_cache_size: Optional[int] = None,
19 healthz: Optional[Dict[str, Any]] = None,
20 image: Optional[str] = "",
21 image_pull_policy: Optional[str] = "",
22 listener: Optional[Dict[str, Any]] = None,
23 log_level: Optional[str] = "",
24 log_mode: Optional[str] = "",
25 metrics: Optional[Dict[str, Any]] = None,
26 oidc_server: Optional[Dict[str, Any]] = None,
27 replicas: Optional[int] = None,
28 secret_label_selectors: Optional[str] = "",
29 superseding_host_subsets: Optional[bool] = None,
30 tracing: Optional[Dict[str, Any]] = None,
31 volumes: Optional[Dict[str, Any]] = None,
32 **kwargs: Any,
33 ) -> None:
34 """
35 Args:
36 auth_config_label_selectors (str): No field description from API; please add description
38 cluster_wide (bool): No field description from API; please add description
40 evaluator_cache_size (int): No field description from API; please add description
42 healthz (Dict[str, Any]): No field description from API; please add description
44 image (str): No field description from API; please add description
46 image_pull_policy (str): PullPolicy describes a policy for if/when to pull a container image
48 listener (Dict[str, Any]): No field description from API; please add description
50 log_level (str): No field description from API; please add description
52 log_mode (str): No field description from API; please add description
54 metrics (Dict[str, Any]): No field description from API; please add description
56 oidc_server (Dict[str, Any]): No field description from API; please add description
58 replicas (int): No field description from API; please add description
60 secret_label_selectors (str): No field description from API; please add description
62 superseding_host_subsets (bool): No field description from API; please add description
64 tracing (Dict[str, Any]): No field description from API; please add description
66 volumes (Dict[str, Any]): No field description from API; please add description
68 """
69 super().__init__(**kwargs)
71 self.auth_config_label_selectors = auth_config_label_selectors
72 self.cluster_wide = cluster_wide
73 self.evaluator_cache_size = evaluator_cache_size
74 self.healthz = healthz
75 self.image = image
76 self.image_pull_policy = image_pull_policy
77 self.listener = listener
78 self.log_level = log_level
79 self.log_mode = log_mode
80 self.metrics = metrics
81 self.oidc_server = oidc_server
82 self.replicas = replicas
83 self.secret_label_selectors = secret_label_selectors
84 self.superseding_host_subsets = superseding_host_subsets
85 self.tracing = tracing
86 self.volumes = volumes
88 def to_dict(self) -> None:
89 super().to_dict()
91 if not self.kind_dict and not self.yaml_file:
92 if not self.listener:
93 raise MissingRequiredArgumentError(argument="self.listener")
95 if not self.oidc_server:
96 raise MissingRequiredArgumentError(argument="self.oidc_server")
98 self.res["spec"] = {}
99 _spec = self.res["spec"]
101 _spec["listener"] = self.listener
102 _spec["oidcServer"] = self.oidc_server
104 if self.auth_config_label_selectors:
105 _spec["authConfigLabelSelectors"] = self.auth_config_label_selectors
107 if self.cluster_wide is not None:
108 _spec["clusterWide"] = self.cluster_wide
110 if self.evaluator_cache_size:
111 _spec["evaluatorCacheSize"] = self.evaluator_cache_size
113 if self.healthz:
114 _spec["healthz"] = self.healthz
116 if self.image:
117 _spec["image"] = self.image
119 if self.image_pull_policy:
120 _spec["imagePullPolicy"] = self.image_pull_policy
122 if self.log_level:
123 _spec["logLevel"] = self.log_level
125 if self.log_mode:
126 _spec["logMode"] = self.log_mode
128 if self.metrics:
129 _spec["metrics"] = self.metrics
131 if self.replicas:
132 _spec["replicas"] = self.replicas
134 if self.secret_label_selectors:
135 _spec["secretLabelSelectors"] = self.secret_label_selectors
137 if self.superseding_host_subsets is not None:
138 _spec["supersedingHostSubsets"] = self.superseding_host_subsets
140 if self.tracing:
141 _spec["tracing"] = self.tracing
143 if self.volumes:
144 _spec["volumes"] = self.volumes
146 # End of generated code