Skip to content
New issue

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

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

Already on GitHub? # to your account

xcute: Improve job's listing #2104

Merged
merged 2 commits into from
Dec 28, 2020

Conversation

AymericDu
Copy link
Member

SUMMARY

Improve job's listing

  • Change information visible when listing jobs
  • Allow to add filters when listing jobs
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • xcute
  • CLI
SDS VERSION
openio 5.7.1.dev9
ADDITIONAL INFORMATION
$ openio-admin xcute job list --date 2020-12-17 --status FINISHED --type rawx-decommission --lock rawx/127.0.0.1:6012
+----------------------------------+----------+-------------------+---------------------+----------+
| ID                               | Status   | Type              | Lock                | Progress |
+----------------------------------+----------+-------------------+---------------------+----------+
| 20201217152503729224-056ec779394 | FINISHED | rawx-decommission | rawx/127.0.0.1:6012 | 100.00%  |
+----------------------------------+----------+-------------------+---------------------+----------+

@AymericDu AymericDu force-pushed the xcute-improve-jobs-listing branch 2 times, most recently from bc36fe9 to 9c00adc Compare December 21, 2020 14:36
parser.add_argument(
'--type',
help='Filter jobs with the specified job type (%s)'
% ', '.join(JOB_TYPES.keys()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use choices instead

continue
if job_type and job_info['job.type'] != job_type:
continue
if job_lock and not fnmatchcase(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it really necessary to use fnmatchcase ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With fnmatchcase, we allow listing a single service type (rawx/*), a single server (*/127.0.0.1), or even a single site.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@AymericDu AymericDu force-pushed the xcute-improve-jobs-listing branch from 9c00adc to 49463d7 Compare December 22, 2020 13:21
@fvennetier fvennetier force-pushed the xcute-improve-jobs-listing branch from 49463d7 to b14730d Compare December 28, 2020 11:03
@fvennetier fvennetier merged commit 0c930e2 into open-io:5.x Dec 28, 2020
@AymericDu AymericDu deleted the xcute-improve-jobs-listing branch January 4, 2021 07:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants