Skip to content

Commit 05fca8a

Browse files
committed
Merge branch 'release/7.0' into release/8.0
2 parents a399f04 + 1fa5685 commit 05fca8a

File tree

8 files changed

+37
-6
lines changed

8 files changed

+37
-6
lines changed

dataikuapi/dss/apideployer.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,15 @@ def get_settings(self):
166166

167167
return DSSAPIDeployerInfraSettings(self.client, self.infra_id, settings)
168168

169+
def delete(self):
170+
"""
171+
Deletes this infra
172+
You may only delete an infra if it has no deployments on it anymore.
173+
"""
174+
self.client._perform_empty(
175+
"DELETE", "/api-deployer/infras/%s" % (self.infra_id))
176+
177+
169178
class DSSAPIDeployerInfraSettings(object):
170179
"""The settings of an API Deployer Infra.
171180
@@ -191,6 +200,18 @@ def add_apinode(self, url, api_key, graphite_prefix=None):
191200
}
192201
self.settings["apiNodes"].append(new_node)
193202

203+
def remove_apinode(self, node_url):
204+
"""
205+
Removes a node from the list of nodes of this infra.
206+
Only applicable to STATIC infrastructures
207+
208+
:param str node_url: URL of the node to remove
209+
"""
210+
api_nodes = list(self.settings["apiNodes"])
211+
for node in api_nodes:
212+
if node.get("url") == node_url:
213+
self.settings["apiNodes"].remove(node)
214+
194215
def get_raw(self):
195216
"""
196217
Gets the raw settings of this infra. This returns a reference to the raw settings, not a copy,

dataikuapi/dss/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import time
22
import sys
3-
from dataikuapi.utils import DataikuException
3+
from ..utils import DataikuException
44

55
class DSSJob(object):
66
"""

dataikuapi/dss/macro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import time
22
import sys, json
3-
from dataikuapi.utils import DataikuException
3+
from ..utils import DataikuException
44

55
class DSSMacro(object):
66
"""

dataikuapi/dss/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from .analysis import DSSAnalysis
1919
from .flow import DSSProjectFlow
2020
from .app import DSSAppManifest
21-
from dataikuapi.utils import DataikuException
21+
from ..utils import DataikuException
2222

2323

2424
class DSSProject(object):

dataikuapi/dss/scenario.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from datetime import datetime
22
import time, warnings
3-
from dataikuapi.utils import DataikuException
3+
from ..utils import DataikuException
44
from .discussion import DSSObjectDiscussions
55
from .utils import DSSTaggableObjectListItem
66

@@ -637,4 +637,4 @@ def to_scenario(self):
637637

638638
@property
639639
def id(self):
640-
return self._data["name"]
640+
return self._data["name"]

dataikuapi/dss/wiki.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from .discussion import DSSObjectDiscussions
2-
from dataikuapi.utils import DataikuException
2+
from ..utils import DataikuException
33
import json
44
import sys
55
import copy

meta/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
galaxy_info:
3+
author: Dataiku
4+
description: Dataiku API Client
5+
company: Dataiku
6+
license: Apache 2.0
7+
min_ansible_version: 2.5
8+
galaxy_tags: ["dataiku","dss","data-science-studio"]
9+
dependencies: []

module_utils/dataikuapi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../dataikuapi

0 commit comments

Comments
 (0)