Support date ranges with awxkit --created --modified parameters
#8517 opened on Nov 2, 2020
Description
ISSUE TYPE
- Feature Idea
SUMMARY
Currently the --modified and --created options for awxkit are not useful, as they require an exact match. I.e. this returns the results of the one job modified at exactly this microsecond timestamp:
awx job list --modified "2020-07-04T03:50:03.895868Z"
But it is not possible to get a list of jobs created/modified on this day. This returns nothing:
awx job list --modified "2020-07-04"
As far as I can tell there is NO way to list jobs via the CLI in a way that I can just get the most recent x jobs (by count, or hour, or other duration) or the jobs in a general range without getting ALL the jobs and sorting externally.
Date parameters should support the ISO 8601 Time intervals such that:
2020-07-04means "any time on 2020-07-04"2020-07-04T03means "any time within hour 3 of 2020-07-04"P60Mmeans "any time within the last 60 minutes"P1Hmeans "any time within the current hour"2020-07-03/04means "any time on 2020-07-03 or 2020-07-04"
I realize it may be difficult to fully support the complete time interval specs, but I think the first two in that list (truncation) would be sufficient for most use-cases.