Skip to content

Commit 23852e9

Browse files
author
Glenn Snyder
authored
Merge pull request #37 from blackducksoftware/gsnyder/add-health-checks
adding health checks
2 parents 66b6af1 + 871f358 commit 23852e9

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

blackduck/HubRestApi.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,14 @@ def delete_unmapped_codelocations(self, limit=1000):
12441244
for c in codelocations:
12451245
response = self.execute_delete(c['_meta']['href'])
12461246

1247+
##
1248+
#
1249+
# Health Stuff
1250+
#
1251+
##
1252+
def get_health_checks(self):
1253+
url = self.get_urlbase() + "/api/health-checks/liveness"
1254+
return self.execute_get(url)
12471255

12481256
##
12491257
#

blackduck/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
VERSION = (0, 0, 22)
2+
VERSION = (0, 0, 23)
33

44
__version__ = '.'.join(map(str, VERSION))

examples/get_health_checks.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from blackduck.HubRestApi import HubInstance
2+
3+
hub = HubInstance()
4+
5+
response = hub.get_health_checks()
6+
7+
print(response.json())

0 commit comments

Comments
 (0)