Add id to state command to return single container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
58c5eb5ecb
commit
76d69b4ed8
8 changed files with 100 additions and 78 deletions
|
@ -59,7 +59,9 @@ var stateCommand = cli.Command{
|
|||
Usage: "get a raw dump of the containerd state",
|
||||
Action: func(context *cli.Context) {
|
||||
c := getClient(context)
|
||||
resp, err := c.State(netcontext.Background(), &types.StateRequest{})
|
||||
resp, err := c.State(netcontext.Background(), &types.StateRequest{
|
||||
Id: context.Args().First(),
|
||||
})
|
||||
if err != nil {
|
||||
fatal(err.Error(), 1)
|
||||
}
|
||||
|
@ -79,7 +81,9 @@ var listCommand = cli.Command{
|
|||
|
||||
func listContainers(context *cli.Context) {
|
||||
c := getClient(context)
|
||||
resp, err := c.State(netcontext.Background(), &types.StateRequest{})
|
||||
resp, err := c.State(netcontext.Background(), &types.StateRequest{
|
||||
Id: context.Args().First(),
|
||||
})
|
||||
if err != nil {
|
||||
fatal(err.Error(), 1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue