Coverage for ocp_resources/data_science_cluster.py: 0%

14 statements  

« 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 

2 

3from typing import Any, Dict, Optional 

4from ocp_resources.resource import Resource 

5 

6 

7class DataScienceCluster(Resource): 

8 """ 

9 DataScienceCluster is the Schema for the datascienceclusters API. 

10 """ 

11 

12 api_group: str = Resource.ApiGroup.DATASCIENCECLUSTER_OPENDATAHUB_IO 

13 

14 def __init__( 

15 self, 

16 components: Optional[Dict[str, Any]] = None, 

17 **kwargs: Any, 

18 ) -> None: 

19 """ 

20 Args: 

21 components (Dict[str, Any]): Override and fine tune specific component configurations. 

22 

23 """ 

24 super().__init__(**kwargs) 

25 

26 self.components = components 

27 

28 def to_dict(self) -> None: 

29 super().to_dict() 

30 

31 if not self.kind_dict and not self.yaml_file: 

32 self.res["spec"] = {} 

33 _spec = self.res["spec"] 

34 

35 if self.components: 

36 _spec["components"] = self.components 

37 

38 # End of generated code