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

[feat]: add format option for pouch ps and integrate/unit test #3037

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

cxz66666
Copy link
Collaborator

Ⅰ. Describe what this PR did

similar as #2844
for the issue #2827. CLI compatibility between Pouch and Docker

solve the pouch ps --format option.
if other command(such as pouch history/images/network/volume/stats/version) also need --format option.
can done similarly

Ⅱ. Does this pull request fix one issue?

fixes #2827,

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

have add unit test and integration test

Ⅳ. Describe how to verify it

root@ahsh-main:~/go/src/github.com/alibaba/pouch# pouch ps
Name ID Status Created Image Runtime
58b7de 58b7de Up 40 minutes 40 minutes ago registry.hub.docker.com/library/ubuntu:latest runc
root@ahsh-main:~/go/src/github.com/alibaba/pouch# pouch ps -a --format "table {{.ID}}\t{{.Status}}\t{{.Created}}"
ID Status Created
58b7de Up 11 seconds 11 seconds ago
root@ahsh-main:~/go/src/github.com/alibaba/pouch# pouch ps -a --format "table {{.ID}}\t{{.Status}}\t{{.Created}}\t{{.Name}}"
ID Status Created Name
58b7de Up 40 minutes 40 minutes ago 58b7de
root@ahsh-main:~/go/src/github.com/alibaba/pouch# pouch ps -a --format "raw"
Name:58b7de
ID:58b7de
Status:Up 4 seconds
Created:4 seconds ago
Image:registry.hub.docker.com/library/ubuntu:latest
Runtime:runc

Ⅴ. Special notes for reviews

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2022

CLA assistant check
All committers have signed the CLA.

@cxz66666 cxz66666 marked this pull request as ready for review July 18, 2022 08:17
@rudyfly
Copy link
Collaborator

rudyfly commented Jul 20, 2022

LGTM

@rudyfly rudyfly merged commit add6a9f into AliyunContainerService:master Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] CLI compatibility between Pouch and Docker
3 participants