Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support date ranges with awxkit --created --modified parameters #8517

Open
philipsd6 opened this issue Nov 2, 2020 · 1 comment
Open

Support date ranges with awxkit --created --modified parameters #8517

philipsd6 opened this issue Nov 2, 2020 · 1 comment

Comments

@philipsd6
Copy link
Contributor

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-04 means "any time on 2020-07-04"
  • 2020-07-04T03 means "any time within hour 3 of 2020-07-04"
  • P60M means "any time within the last 60 minutes"
  • P1H means "any time within the current hour"
  • 2020-07-03/04 means "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.

@ryanpetrello
Copy link
Contributor

Date parameters should support the ISO 8601 Time intervals such that:

Hey, https://en.wikipedia.org/wiki/ISO_8601#Time_intervals is a neat thing I didn't know about. This is a good idea, thanks for filing it @philipsd6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants