File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md
2+
3+ from __future__ import annotations
4+
5+ from typing import Any
6+ from ocp_resources .resource import NamespacedResource
7+
8+
9+ class Notebook (NamespacedResource ):
10+ """Notebook is the CR for Kubeflow Notebooks 1.x (and OpenShift AI Workbenches)."""
11+
12+ api_group : str = NamespacedResource .ApiGroup .KUBEFLOW_ORG
13+
14+ def __init__ (
15+ self ,
16+ template : dict [str , Any ] | None = None ,
17+ ** kwargs : Any ,
18+ ) -> None :
19+ """
20+ Args:
21+ template (dict[str, Any]): Pod template for the notebook pod.
22+ """
23+ super ().__init__ (** kwargs )
24+
25+ self .template = template
26+
27+ def to_dict (self ) -> None :
28+ super ().to_dict ()
29+
30+ if not self .kind_dict and not self .yaml_file :
31+ self .res ["spec" ] = {}
32+ _spec = self .res ["spec" ]
33+
34+ if self .template is not None :
35+ _spec ["template" ] = self .template
36+
37+ # End of generated code
Original file line number Diff line number Diff line change @@ -345,6 +345,7 @@ class ApiGroup:
345345 K8S_MARIADB_COM : str = "k8s.mariadb.com"
346346 K8S_OVN_ORG : str = "k8s.ovn.org"
347347 K8S_V1_CNI_CNCF_IO : str = "k8s.v1.cni.cncf.io"
348+ KUBEFLOW_ORG : str = "kubeflow.org"
348349 KUBERNETES_IO : str = "kubernetes.io"
349350 KUBEVIRT_IO : str = "kubevirt.io"
350351 KUBEVIRT_KUBEVIRT_IO : str = "kubevirt.kubevirt.io"
You can’t perform that action at this time.
0 commit comments