Coverage for ocp_resources/project_config_openshift_io.py: 0%
17 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 Project(Resource):
8 """
9 Project holds cluster-wide information about Project. The canonical name is `cluster`
10 Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
11 """
13 api_group: str = Resource.ApiGroup.CONFIG_OPENSHIFT_IO
15 def __init__(
16 self,
17 project_request_message: Optional[str] = "",
18 project_request_template: Optional[Dict[str, Any]] = None,
19 **kwargs: Any,
20 ) -> None:
21 """
22 Args:
23 project_request_message (str): projectRequestMessage is the string presented to a user if they are
24 unable to request a project via the projectrequest api endpoint
26 project_request_template (Dict[str, Any]): projectRequestTemplate is the template to use for creating projects in
27 response to projectrequest. This must point to a template in
28 'openshift-config' namespace. It is optional. If it is not
29 specified, a default template is used.
31 """
32 super().__init__(**kwargs)
34 self.project_request_message = project_request_message
35 self.project_request_template = project_request_template
37 def to_dict(self) -> None:
38 super().to_dict()
40 if not self.kind_dict and not self.yaml_file:
41 self.res["spec"] = {}
42 _spec = self.res["spec"]
44 if self.project_request_message:
45 _spec["projectRequestMessage"] = self.project_request_message
47 if self.project_request_template:
48 _spec["projectRequestTemplate"] = self.project_request_template
50 # End of generated code