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
No related branches found
No related tags found
No related merge requests found
......@@ -105,3 +105,4 @@ config/config.json
test.py
.DS_Store
temp
__version__ = '1.0.7'
__version__ = '1.0.8'
......@@ -812,7 +812,7 @@ class DefectDojoAPI(object):
###### 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.
:param name_contains: Search by tool type name.
......@@ -824,12 +824,15 @@ class DefectDojoAPI(object):
if limit:
params['limit'] = limit
if id:
params['id'] = id
if name:
params['name__contains'] = name
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.
:param name_contains: Search by tool name.
......@@ -843,6 +846,9 @@ class DefectDojoAPI(object):
if limit:
params['limit'] = limit
if id:
params['id'] = id
if name:
params['name'] = name
......@@ -871,6 +877,9 @@ class DefectDojoAPI(object):
if limit:
params['limit'] = limit
if id:
params['id'] = id
if 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