22import json
33from datetime import datetime
44
5- class DSSKubikleObjectListItem (object ):
6- """An item in a list of kubikles . Do not instantiate this class, use :meth:`dataikuapi.dss.project.DSSProject.list_kubikle_objects `"""
5+ class DSSCodeStudioObjectListItem (object ):
6+ """An item in a list of code studios . Do not instantiate this class, use :meth:`dataikuapi.dss.project.DSSProject.list_code_studio_objects `"""
77 def __init__ (self , client , project_key , data ):
88 self .client = client
99 self .project_key = project_key
1010 self ._data = data
1111
12- def to_kubikle_object (self ):
13- """Gets the :class:`DSSKubikleTemplate ` corresponding to this kubikle object """
14- return DSSKubikleObject (self .client , self .project_key , self ._data ["id" ])
12+ def to_code_studio_object (self ):
13+ """Gets the :class:`DSSCodeStudioObject ` corresponding to this code studio object """
14+ return DSSCodeStudioObject (self .client , self .project_key , self ._data ["id" ])
1515
1616 @property
1717 def name (self ):
@@ -33,77 +33,77 @@ def template_description(self):
3333 return self ._data .get ('desc' , {}).get ('shortDesc' , '' )
3434
3535
36- class DSSKubikleObject (object ):
36+ class DSSCodeStudioObject (object ):
3737 """
38- A handle to manage a kubikle object of a project
38+ A handle to manage a code studio object of a project
3939 """
40- def __init__ (self , client , project_key , kubikle_object_id ):
41- """Do not call directly, use :meth:`dataikuapi.dss.project.DSSProject.get_kubikle_object `"""
40+ def __init__ (self , client , project_key , code_studio_object_id ):
41+ """Do not call directly, use :meth:`dataikuapi.dss.project.DSSProject.get_code_studio_object `"""
4242 self .client = client
4343 self .project_key = project_key
44- self .kubikle_object_id = kubikle_object_id
44+ self .code_studio_object_id = code_studio_object_id
4545
4646 def delete (self ):
4747 """
48- Delete the kubikle
48+ Delete the code studio
4949 """
50- self .client ._perform_empty ("DELETE" , "/projects/%s/kubikles /%s" % (self .project_key , self .kubikle_object_id ))
50+ self .client ._perform_empty ("DELETE" , "/projects/%s/code-studios /%s" % (self .project_key , self .code_studio_object_id ))
5151
5252 def get_settings (self ):
5353 """
54- Get the kubikle object's settings
54+ Get the code studio object's settings
5555
56- :returns: a handle to manage the kubikle settings
57- :rtype: :class:`dataikuapi.dss.kubikle.DSSKubikleObjectSettings `
56+ :returns: a handle to manage the code studio settings
57+ :rtype: :class:`dataikuapi.dss.codestudio.DSSCodeStudioObjectSettings `
5858 """
59- settings = self .client ._perform_json ("GET" , "/projects/%s/kubikles /%s" % (self .project_key , self .kubikle_object_id ))
60- return DSSKubikleObjectSettings (self .client , self .project_key , self .kubikle_object_id , settings )
59+ settings = self .client ._perform_json ("GET" , "/projects/%s/code-studios /%s" % (self .project_key , self .code_studio_object_id ))
60+ return DSSCodeStudioObjectSettings (self .client , self .project_key , self .code_studio_object_id , settings )
6161
6262 def get_status (self ):
6363 """
64- Get the kubikle object's state
64+ Get the code studio object's state
6565
66- :returns: a handle to inspect the kubikle state
67- :rtype: :class:`dataikuapi.dss.kubikle.DSSKubikleObjectStatus `
66+ :returns: a handle to inspect the code studio state
67+ :rtype: :class:`dataikuapi.dss.codestudio.DSSCodeStudioObjectStatus `
6868 """
69- status = self .client ._perform_json ("GET" , "/projects/%s/kubikles /%s/status" % (self .project_key , self .kubikle_object_id ))
70- return DSSKubikleObjectStatus (self .client , self .project_key , self .kubikle_object_id , status )
69+ status = self .client ._perform_json ("GET" , "/projects/%s/code-studios /%s/status" % (self .project_key , self .code_studio_object_id ))
70+ return DSSCodeStudioObjectStatus (self .client , self .project_key , self .code_studio_object_id , status )
7171
7272 def stop (self ):
7373 """
74- Stop a running kubikle
74+ Stop a running code studio
7575
7676 :returns: a future to wait on the stop, or None if already stopped
7777 :rtype: :class:`dataikuapi.dss.future.DSSFuture`
7878 """
79- ret = self .client ._perform_json ("POST" , "/projects/%s/kubikles /%s/stop" % (self .project_key , self .kubikle_object_id ))
79+ ret = self .client ._perform_json ("POST" , "/projects/%s/code-studios /%s/stop" % (self .project_key , self .code_studio_object_id ))
8080 if 'jobId' in ret :
8181 return self .client .get_future (ret ["jobId" ])
8282 else :
8383 return None
8484
8585 def restart (self ):
8686 """
87- Restart a kubikle
87+ Restart a code studio
8888
8989 :returns: a future to wait on the start
9090 :rtype: :class:`dataikuapi.dss.future.DSSFuture`
9191 """
92- ret = self .client ._perform_json ("POST" , "/projects/%s/kubikles /%s/restart" % (self .project_key , self .kubikle_object_id ))
92+ ret = self .client ._perform_json ("POST" , "/projects/%s/code-studios /%s/restart" % (self .project_key , self .code_studio_object_id ))
9393 if 'jobId' in ret :
9494 return self .client .get_future (ret ["jobId" ])
9595 else :
9696 return None
9797
98- class DSSKubikleObjectSettings (object ):
98+ class DSSCodeStudioObjectSettings (object ):
9999 """
100- Settings for the kubikle object
100+ Settings for the code studio object
101101 """
102- def __init__ (self , client , project_key , kubikle_object_id , settings ):
103- """Do not call directly, use :meth:`dataikuapi.dss.kubikle.DSSKubikleObject .get_settings`"""
102+ def __init__ (self , client , project_key , code_studio_object_id , settings ):
103+ """Do not call directly, use :meth:`dataikuapi.dss.codestudio.DSSCodeStudioObject .get_settings`"""
104104 self .client = client
105105 self .project_key = project_key
106- self .kubikle_object_id = kubikle_object_id
106+ self .code_studio_object_id = code_studio_object_id
107107 self .settings = settings
108108
109109 def get_raw (self ):
@@ -112,15 +112,15 @@ def get_raw(self):
112112 """
113113 return self .settings
114114
115- class DSSKubikleObjectStatus (object ):
115+ class DSSCodeStudioObjectStatus (object ):
116116 """
117- Status of a kubikle object
117+ Status of a code studio object
118118 """
119- def __init__ (self , client , project_key , kubikle_object_id , status ):
120- """Do not call directly, use :meth:`dataikuapi.dss.kubikle.DSSKubikleObject .get_state`"""
119+ def __init__ (self , client , project_key , code_studio_object_id , status ):
120+ """Do not call directly, use :meth:`dataikuapi.dss.codestudio.DSSCodeStudioObject .get_state`"""
121121 self .client = client
122122 self .project_key = project_key
123- self .kubikle_object_id = kubikle_object_id
123+ self .code_studio_object_id = code_studio_object_id
124124 self .status = status
125125
126126 def get_raw (self ):
0 commit comments