Skip to content

Commit c1ed433

Browse files
author
Agathe Guillemot
committed
Change params in import_bundles method
Also fix a forgotten code style mistake
1 parent ab1dfc1 commit c1ed433

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

dataikuapi/dss/apideployer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_deployment(self, deployment_id, service_id, infra_id, version):
5656
self.client._perform_json("POST", "/api-deployer/deployments", body=settings)
5757
return self.get_deployment(deployment_id)
5858

59-
def list_infras(self, as_objects = True):
59+
def list_infras(self, as_objects=True):
6060
"""
6161
Lists deployment infrastructures on the API Deployer
6262

dataikuapi/dss/projectdeployer.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,22 +360,20 @@ def get_status(self):
360360
light = self.client._perform_json("GET", "/project-deployer/projects/%s" % (self.project_key))
361361
return DSSProjectDeployerProjectStatus(self.client, self.project_key, light)
362362

363-
def import_bundle(self, fp, origin_project_key=None, design_node_url=None, design_node_id=None):
363+
def import_bundle(self, fp, design_node_url=None, design_node_id=None):
364364
"""
365365
Imports a new version for a project from a file-like object pointing
366366
to a bundle Zip file.
367367
:param string fp: A file-like object pointing to a bundle Zip file
368-
:param string origin_project_key: The identifier of the Design node project where the bundle was created
369368
:param string design_node_url: The URL of the Design node where the bundle was created
370369
:param design_node_id: The identifier of the Design node where the bundle was created
371370
"""
372-
if origin_project_key is None and design_node_url is None and design_node_id is None:
371+
if design_node_url is None and design_node_id is None:
373372
params = None
374373
else:
375374
params = {
376-
"projectKey": origin_project_key,
377375
"nodeId": design_node_id,
378-
"url": design_node_url
376+
"nodeUrl": design_node_url
379377
}
380378
return self.client._perform_empty("POST",
381379
"/project-deployer/projects/%s/bundles" % (self.project_key), params=params, files={"file":fp})

0 commit comments

Comments
 (0)