Port ctr to use client

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-05 16:17:37 -07:00
parent bdf9f5f738
commit 4c1af8fdd8
26 changed files with 526 additions and 1179 deletions

View File

@@ -9,9 +9,7 @@ import (
"github.com/urfave/cli"
)
var (
extraCmds = []cli.Command{}
)
var extraCmds = []cli.Command{}
func init() {
cli.VersionPrinter = func(c *cli.Context) {
@@ -30,7 +28,7 @@ func main() {
/ /__/ /_/ /
\___/\__/_/
containerd client
containerd CLI
`
app.Flags = []cli.Flag{
cli.BoolFlag{
@@ -53,10 +51,9 @@ containerd client
EnvVar: "CONTAINERD_NAMESPACE",
},
}
app.Commands = []cli.Command{
app.Commands = append([]cli.Command{
checkpointCommand,
runCommand,
eventsCommand,
deleteCommand,
namespacesCommand,
listCommand,
@@ -69,8 +66,7 @@ containerd client
snapshotCommand,
versionCommand,
psCommand,
}
app.Commands = append(app.Commands, extraCmds...)
}, extraCmds...)
app.Before = func(context *cli.Context) error {
if context.GlobalBool("debug") {
logrus.SetLevel(logrus.DebugLevel)