Skip to content
Snippets Groups Projects
Commit 69426986 authored by Aaron Weaver's avatar Aaron Weaver
Browse files

Adding ID search to tools

parent 6a61c0d1
Branches
Tags 1.0.8
No related merge requests found
...@@ -105,3 +105,4 @@ config/config.json ...@@ -105,3 +105,4 @@ config/config.json
test.py test.py
.DS_Store .DS_Store
temp
__version__ = '1.0.7' __version__ = '1.0.8'
...@@ -812,7 +812,7 @@ class DefectDojoAPI(object): ...@@ -812,7 +812,7 @@ class DefectDojoAPI(object):
###### Tool API ####### ###### Tool API #######
def list_tool_types(self, name=None, limit=20): def list_tool_types(self, id=None, name=None, limit=20):
"""Retrieves all the tool types. """Retrieves all the tool types.
:param name_contains: Search by tool type name. :param name_contains: Search by tool type name.
...@@ -824,12 +824,15 @@ class DefectDojoAPI(object): ...@@ -824,12 +824,15 @@ class DefectDojoAPI(object):
if limit: if limit:
params['limit'] = limit params['limit'] = limit
if id:
params['id'] = id
if name: if name:
params['name__contains'] = name params['name__contains'] = name
return self._request('GET', 'tool_types/', params) return self._request('GET', 'tool_types/', params)
def list_tools(self, name=None, tool_type_id=None, url=None, limit=20): def list_tools(self, id=None, name=None, tool_type_id=None, url=None, limit=20):
"""Retrieves all the tool configurations. """Retrieves all the tool configurations.
:param name_contains: Search by tool name. :param name_contains: Search by tool name.
...@@ -843,6 +846,9 @@ class DefectDojoAPI(object): ...@@ -843,6 +846,9 @@ class DefectDojoAPI(object):
if limit: if limit:
params['limit'] = limit params['limit'] = limit
if id:
params['id'] = id
if name: if name:
params['name'] = name params['name'] = name
...@@ -871,6 +877,9 @@ class DefectDojoAPI(object): ...@@ -871,6 +877,9 @@ class DefectDojoAPI(object):
if limit: if limit:
params['limit'] = limit params['limit'] = limit
if id:
params['id'] = id
if name: if name:
params['name'] = name params['name'] = name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment