From a550403352b06ca422e247a475e1c7ff746ec3fd Mon Sep 17 00:00:00 2001 From: Quentin Castel Date: Wed, 11 May 2022 10:14:53 +0200 Subject: [PATCH] [sc-80976] Add a parameter 'architecture' to the cluster create API --- dataikuapi/dssclient.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dataikuapi/dssclient.py b/dataikuapi/dssclient.py index 4ec11866..96cdd080 100644 --- a/dataikuapi/dssclient.py +++ b/dataikuapi/dssclient.py @@ -590,20 +590,22 @@ def get_cluster(self, cluster_id): """ return DSSCluster(self, cluster_id) - def create_cluster(self, cluster_name, cluster_type='manual', params=None): + def create_cluster(self, cluster_name, cluster_type='manual', params=None, cluster_architecture='HADOOP'): """ Create a cluster, and return a handle to interact with it :param cluster_name: the name of the new cluster :param cluster_type: the type of the new cluster :param params: the parameters of the new cluster, as a JSON object - + :param cluster_architecture: the architecture of the new cluster. 'HADOOP' or 'KUBERNETES' + :returns: A :class:`dataikuapi.dss.admin.DSSCluster` cluster handle """ definition = {} definition['name'] = cluster_name definition['type'] = cluster_type + definition['architecture'] = cluster_architecture definition['params'] = params if params is not None else {} resp = self._perform_json( "POST", "/admin/clusters/", body=definition)