ctr: snapshot->snapshots cmd, add aliases

Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
This commit is contained in:
Jess Valarezo
2017-11-22 14:24:25 -05:00
parent 59bd196711
commit 61c8fe2307
8 changed files with 21 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ import (
var Command = cli.Command{
Name: "containers",
Usage: "manage containers",
Aliases: []string{"c"},
Aliases: []string{"c", "container"},
Subcommands: []cli.Command{
deleteCommand,
infoCommand,

View File

@@ -15,8 +15,9 @@ import (
// Command is the cli command for displaying containerd events
var Command = cli.Command{
Name: "events",
Usage: "display containerd events",
Name: "events",
Aliases: []string{"event"},
Usage: "display containerd events",
Action: func(context *cli.Context) error {
client, ctx, cancel, err := commands.NewClient(context)
if err != nil {

View File

@@ -19,8 +19,9 @@ import (
// Command is the cli command for managing images
var Command = cli.Command{
Name: "images",
Usage: "manage images",
Name: "images",
Aliases: []string{"image"},
Usage: "manage images",
Subcommands: cli.Commands{
checkCommand,
exportCommand,

View File

@@ -16,8 +16,9 @@ import (
// Command is the cli command for managing namespaces
var Command = cli.Command{
Name: "namespaces",
Usage: "manage namespaces",
Name: "namespaces",
Aliases: []string{"namespace"},
Usage: "manage namespaces",
Subcommands: cli.Commands{
createCommand,
listCommand,

View File

@@ -18,8 +18,9 @@ import (
// Command is a cli command that outputs plugin information
var Command = cli.Command{
Name: "plugins",
Usage: "provides information about containerd plugins",
Name: "plugins",
Aliases: []string{"plugin"},
Usage: "provides information about containerd plugins",
Flags: []cli.Flag{
cli.BoolFlag{
Name: "quiet,q",

View File

@@ -1,4 +1,4 @@
package snapshot
package snapshots
import (
gocontext "context"
@@ -19,9 +19,10 @@ import (
// Command is the cli command for managing snapshots
var Command = cli.Command{
Name: "snapshot",
Usage: "manage snapshots",
Flags: commands.SnapshotterFlags,
Name: "snapshots",
Aliases: []string{"snapshot"},
Usage: "manage snapshots",
Flags: commands.SnapshotterFlags,
Subcommands: cli.Commands{
commitCommand,
infoCommand,

View File

@@ -14,7 +14,7 @@ type resizer interface {
var Command = cli.Command{
Name: "tasks",
Usage: "manage tasks",
Aliases: []string{"t"},
Aliases: []string{"t", "task"},
Subcommands: []cli.Command{
attachCommand,
checkpointCommand,