It would be great if there was a way to list the agents meeting various criteria such as filtering by regular expression on provision_type, location, name, comment, status.
testflinger list-agents --help
usage: testflinger list-agents [-h] [-1] [--summary]
[--status {online,offline,maintenance,waiting,setup,provision,firmware_update,test,allocate,reserve,cleanup}]
[--filter-name FILTER_NAME] [--filter-queues FILTER_QUEUES]
[--filter-location FILTER_LOCATION]
[--filter-provision_type FILTER_PROVISION_TYPE]
[--filter-comment FILTER_COMMENT] [--fields FIELDS]
options:
-h, --help show this help message and exit
-1 Single agent name per line (suitable for piping)
--summary Show summary of online/offline agent counts
--status {online,offline,maintenance,waiting,setup,provision,firmware_update,test,allocate,reserve,cleanup}
Filter agents by status (gross: online/offline/maintenance or fine: waiting, setup,
provision, firmware_update, test, allocate, reserve, cleanup)
--filter-name FILTER_NAME
Filter agents by name (regex)
--filter-queues FILTER_QUEUES
Filter agents by queues (regex, matches any queue)
--filter-location FILTER_LOCATION
Filter agents by location (regex)
--filter-provision_type FILTER_PROVISION_TYPE
Filter agents by provision_type (regex)
--filter-comment FILTER_COMMENT
Filter agents by comment (regex)
--fields FIELDS Fields to display in the agent table (comma-separated). Available fields: name,
status, location, provision_type, comment, job_id, queues. Default:
name,status,location,provision_type,comment
It would be great if there was a way to list the agents meeting various criteria such as filtering by regular expression on provision_type, location, name, comment, status.
The listing should be able to output as a single-name-per-line like
ls -1for easy looping, and display a nice table view in other cases with user-specifiable fields, as well as a summary of the results rather than a list or table.See
list-agentsbranch.