surprising behaviour of tio.agents.list(filter) #884
Labels
as-designed
Is working as intended
question
This is a DX or General question
Tenable.io
Tenable.io Package
upstream-api
The issue is related to the calling API or API Docs
Describe the bug
Hi,
I brought myself in a bad situation the other day and, while this behaviour is not the sole source of that, it surely contributed a little bit. I'm also not ruling out that I'm misunderstanding how that function should work.
When calling tio.agents.list() with an incorrect filter - the function returns ALL agents instead of either raising an exception or returning no agent iterator objects at all. That's especially bad if you plan to unlink only a certain subset of agents and not all agents linked to your container.
To Reproduce
Steps to reproduce the behavior:
output:
when I'm directly supplying the tuple it works are expected:
output:
As a side note: the documentation states, that one can pass multiple filters without stating exactly how. My first assumption was to either pass a tuple of tuples or a list of tuples. Neither of which works. Apparently you should just supply one tuple with all filters concatenated?
Expected behavior
if a filter syntactically wrong or of the wrong type an exception should be raised.
System Information (please complete the following information):
The text was updated successfully, but these errors were encountered: