Coverage for ocp_resources/aaq.py: 0%
32 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 Resource
7class AAQ(Resource):
8 """
9 AAQ is the AAQ Operator CRD
10 """
12 api_group: str = Resource.ApiGroup.AAQ_KUBEVIRT_IO
14 def __init__(
15 self,
16 cert_config: Optional[Dict[str, Any]] = None,
17 configuration: Optional[Dict[str, Any]] = None,
18 image_pull_policy: Optional[str] = "",
19 infra: Optional[Dict[str, Any]] = None,
20 namespace_selector: Optional[Dict[str, Any]] = None,
21 priority_class: Optional[str] = "",
22 workload: Optional[Dict[str, Any]] = None,
23 **kwargs: Any,
24 ) -> None:
25 """
26 Args:
27 cert_config (Dict[str, Any]): certificate configuration
29 configuration (Dict[str, Any]): holds aaq configurations.
31 image_pull_policy (str): PullPolicy describes a policy for if/when to pull a container image
33 infra (Dict[str, Any]): Rules on which nodes AAQ infrastructure pods will be scheduled
35 namespace_selector (Dict[str, Any]): namespaces where pods should be gated before scheduling Defaults to
36 targeting namespaces with an "application-aware-quota/enable-
37 gating" label key.
39 priority_class (str): PriorityClass of the AAQ control plane
41 workload (Dict[str, Any]): Restrict on which nodes AAQ workload pods will be scheduled
43 """
44 super().__init__(**kwargs)
46 self.cert_config = cert_config
47 self.configuration = configuration
48 self.image_pull_policy = image_pull_policy
49 self.infra = infra
50 self.namespace_selector = namespace_selector
51 self.priority_class = priority_class
52 self.workload = workload
54 def to_dict(self) -> None:
55 super().to_dict()
57 if not self.kind_dict and not self.yaml_file:
58 self.res["spec"] = {}
59 _spec = self.res["spec"]
61 if self.cert_config:
62 _spec["certConfig"] = self.cert_config
64 if self.configuration:
65 _spec["configuration"] = self.configuration
67 if self.image_pull_policy:
68 _spec["imagePullPolicy"] = self.image_pull_policy
70 if self.infra:
71 _spec["infra"] = self.infra
73 if self.namespace_selector:
74 _spec["namespaceSelector"] = self.namespace_selector
76 if self.priority_class:
77 _spec["priorityClass"] = self.priority_class
79 if self.workload:
80 _spec["workload"] = self.workload
82 # End of generated code