Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gvm/protocols/gmp/_gmpnext.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ def get_active_directory_objects(
or "group". Defaults to "ou", "computer", and "group".
Duplicates are ignored, preserving first-occurrence order.
max_results: Maximum number of objects to fetch after LDAP
filtering, from 1 to 1000. Omit to use the server default.
filtering. Must be a positive integer within the server's
configured limit. Omit to use that limit.
include_disabled_computers: Include disabled computers. Defaults
to True.
targets: Include matching targets for computers. Defaults to False.
Expand Down
5 changes: 3 additions & 2 deletions gvm/protocols/gmp/requests/next/_active_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def get_active_directory_objects(
or "group". Defaults to "ou", "computer", and "group".
Duplicates are ignored, preserving first-occurrence order.
max_results: Maximum number of objects to fetch after LDAP
filtering, from 1 to 1000. Omit to use the server default.
filtering. Must be a positive integer within the server's
configured limit. Omit to use that limit.
include_disabled_computers: Include disabled computers. Defaults
to True.
targets: Include matching targets for computers. Defaults to False.
Expand Down Expand Up @@ -134,7 +135,7 @@ def get_active_directory_objects(
if max_results is not None and (
isinstance(max_results, bool)
or not isinstance(max_results, int)
or not 1 <= max_results <= 1000
or max_results < 1
):
raise InvalidArgument(
function=cls.get_active_directory_objects.__name__,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,6 @@ def test_get_active_directory_objects_with_invalid_max_results(self):
credential_id="credential-id", max_results=0
)

with self.assertRaises(InvalidArgument):
self.gmp.get_active_directory_objects(
credential_id="credential-id", max_results=1001
)

with self.assertRaises(InvalidArgument):
self.gmp.get_active_directory_objects(
credential_id="credential-id", max_results="10"
Expand Down