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

[feature request] pouch [ps|containers list API] with filter functionality #1562

Closed
fuweid opened this issue Jun 21, 2018 · 2 comments · Fixed by #1595
Closed

[feature request] pouch [ps|containers list API] with filter functionality #1562

fuweid opened this issue Jun 21, 2018 · 2 comments · Fixed by #1595
Assignees
Labels
kind/feature kind/feature-request This is a feature request from community for PouchContainer

Comments

@fuweid
Copy link
Contributor

fuweid commented Jun 21, 2018

Ⅰ. Issue Description

For now, the pouch list containers API doesn't support filter function. It's very useful for the monitor or schedule system. PouchContainer has the following requirements:

  • [* ] id - Container’s ID
  • [*] name - Container’s
  • [*] status - One of created, restarting, running, removing, paused, exited, or dead
  • [*] label - An arbitrary string representing either a key or a key-value pair.

For example, we can use the following command to filter container by id:

pouch ps --filter id=fcd6279d2069

Ⅱ. Describe what happened

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@pouchrobot pouchrobot added kind/feature kind/feature-request This is a feature request from community for PouchContainer labels Jun 21, 2018
@yyb196
Copy link
Collaborator

yyb196 commented Jun 21, 2018

filter according to label name and value is another requirment, moby only support filter by label euqals, we need filter by label doesn't equal.
eg:

pouch ps --filter "label=color!=blue"

@Ace-Tang
Copy link
Contributor

Already support the follow:

  • id - Container’s ID
  • name - Container’s
  • status - One of created, restarting, running, removing, paused, exited, or dead
  • label - An arbitrary string representing either a key or a key-value pair.

also support unequal condition, like pouch ps --filter "label=color!=blue"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature kind/feature-request This is a feature request from community for PouchContainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants