Skip to content

Commit a550403

Browse files
committed
[sc-80976] Add a parameter 'architecture' to the cluster create API
1 parent 9243611 commit a550403

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dataikuapi/dssclient.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,20 +590,22 @@ def get_cluster(self, cluster_id):
590590
"""
591591
return DSSCluster(self, cluster_id)
592592

593-
def create_cluster(self, cluster_name, cluster_type='manual', params=None):
593+
def create_cluster(self, cluster_name, cluster_type='manual', params=None, cluster_architecture='HADOOP'):
594594
"""
595595
Create a cluster, and return a handle to interact with it
596596
597597
:param cluster_name: the name of the new cluster
598598
:param cluster_type: the type of the new cluster
599599
:param params: the parameters of the new cluster, as a JSON object
600-
600+
:param cluster_architecture: the architecture of the new cluster. 'HADOOP' or 'KUBERNETES'
601+
601602
:returns: A :class:`dataikuapi.dss.admin.DSSCluster` cluster handle
602603
603604
"""
604605
definition = {}
605606
definition['name'] = cluster_name
606607
definition['type'] = cluster_type
608+
definition['architecture'] = cluster_architecture
607609
definition['params'] = params if params is not None else {}
608610
resp = self._perform_json(
609611
"POST", "/admin/clusters/", body=definition)

0 commit comments

Comments
 (0)