Coverage for ocp_resources/project_request.py: 0%
18 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, Optional
4from ocp_resources.resource import Resource
5from ocp_resources.project_project_openshift_io import Project
8class ProjectRequest(Resource):
9 """
10 ProjectRequest is the set of options necessary to fully qualify a project request
12 Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
13 """
15 api_group: str = Resource.ApiGroup.PROJECT_OPENSHIFT_IO
17 def __init__(
18 self,
19 description: Optional[str] = "",
20 display_name: Optional[str] = "",
21 **kwargs: Any,
22 ) -> None:
23 """
24 Args:
25 description (str): Description is the description to apply to a project
27 display_name (str): DisplayName is the display name to apply to a project
29 """
30 super().__init__(**kwargs)
32 self.description = description
33 self.display_name = display_name
35 def to_dict(self) -> None:
36 super().to_dict()
38 if not self.kind_dict and not self.yaml_file:
39 if self.description:
40 self.res["description"] = self.description
42 if self.display_name:
43 self.res["displayName"] = self.display_name
45 # End of generated code
47 def clean_up(self, wait: bool = True, timeout: Optional[int] = None) -> bool:
48 return Project(name=self.name).clean_up(wait=wait, timeout=timeout)