Conversation
| help="Filter agents that have had agent health modified in the last N days (starting from midnight this morning), where N is the value of the parameter.", | ||
| ) | ||
| @click.option( | ||
| "--connected-in-last-days", |
There was a problem hiding this comment.
are --connected-in-last-days and --not-connected-in-last-days able to be used at the same time?
|
do we need to update the version file? |
When we release it, yes. Generally I do the version file update at the same time as the release chore (updating changelog with the date of release etc.) |
| httpserver_auth: HTTPServer, runner | ||
| ): | ||
| query = [ | ||
| ("anyOfAgentOsTypes", "LINUX"), |
There was a problem hiding this comment.
The query for the other one looked like this: "anyOfAgentOsTypes": ["LINUX", "MAC"],. Are both valid and expected?
There was a problem hiding this comment.
Yes, the way that we handle this is when a list is given, we pass the parameter twice, so the url ends up looking like /endpoint?anyOfAgentOsTypes=LINUX&anyOfAgentOsTypes=MAC and so on. The other test tests a query where we give it two values (because of how python dicts work, it's in the serialization logic where this gets converted, otherwise you can't have the same key twice), and here we're only passing one.
Both work successfully in test and in practice.
| "--serial-number", | ||
| type=str, | ||
| default=None, | ||
| help="When specified, returns agents that have this serial number.", |
There was a problem hiding this comment.
minor; will more than one agent ever match a given serial number?
There was a problem hiding this comment.
Yes, you can for example have multiple agent installs sequentially on the same machine (different guids, so different entries on our side, but each will have the same serial number).
Adds missing filters to the agents list commands, including connected/not connected in X number of days, serial number, and agent OS types.