Skip to content

Commit d6f6e4c

Browse files
committed
publish the terminate param of the stop cluster call [ch41091]
1 parent 8266274 commit d6f6e4c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

dataikuapi/dss/admin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,14 +681,16 @@ def start(self):
681681
raise Exception('Cluster operation failed : %s' % (json.dumps(resp.get('messages', {}).get('messages', {}))))
682682
return resp
683683

684-
def stop(self):
684+
def stop(self, terminate=True):
685685
"""
686686
Stops or detaches the cluster
687687
688688
This operation is only valid for a managed cluster.
689+
:param boolean terminate: whether to delete the cluster after stopping it
689690
"""
690691
resp = self.client._perform_json(
691-
"POST", "/admin/clusters/%s/actions/stop" % (self.cluster_id))
692+
"POST", "/admin/clusters/%s/actions/stop" % (self.cluster_id),
693+
params = {'terminate':terminate})
692694
if resp is None:
693695
raise Exception('Env update returned no data')
694696
if resp.get('messages', {}).get('error', False):

0 commit comments

Comments
 (0)