dist subcommands reorganized.

few dist commands reorganized into subcommands "image" and "content".
Fix for #689

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
This commit is contained in:
Kunal Kushwaha 2017-04-13 14:45:07 +09:00
parent bbeaab5ee3
commit 18bcec512e
2 changed files with 26 additions and 9 deletions

5
cmd/dist/images.go vendored
View File

@ -13,8 +13,9 @@ import (
"github.com/urfave/cli"
)
var imagesCommand = cli.Command{
Name: "images",
var imagesListCommand = cli.Command{
Name: "list",
Aliases: []string{"images"},
Usage: "list images known to containerd",
ArgsUsage: "[flags] <ref>",
Description: `List images registered with containerd.`,

30
cmd/dist/main.go vendored
View File

@ -61,16 +61,11 @@ distribution tool
},
}
app.Commands = []cli.Command{
imagesCommand,
rmiCommand,
imageCommand,
contentCommand,
pullCommand,
fetchCommand,
fetchObjectCommand,
ingestCommand,
activeCommand,
getCommand,
deleteCommand,
listCommand,
applyCommand,
rootfsCommand,
}
@ -93,3 +88,24 @@ distribution tool
os.Exit(1)
}
}
var imageCommand = cli.Command{
Name: "image",
Usage: "image management",
Subcommands: cli.Commands{
imagesListCommand,
rmiCommand,
},
}
var contentCommand = cli.Command{
Name: "content",
Usage: "content management",
Subcommands: cli.Commands{
listCommand,
ingestCommand,
activeCommand,
getCommand,
deleteCommand,
},
}