Refactor the cli for pods
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
219fb703dc
commit
ea77713223
1 changed files with 15 additions and 7 deletions
|
@ -195,12 +195,11 @@ func main() {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "ocic"
|
app.Name = "ocic"
|
||||||
app.Usage = "client for ocid"
|
app.Usage = "client for ocid"
|
||||||
|
app.Version = "0.0.1"
|
||||||
|
|
||||||
app.Commands = []cli.Command{
|
app.Commands = []cli.Command{
|
||||||
|
podSandboxCommand,
|
||||||
runtimeVersionCommand,
|
runtimeVersionCommand,
|
||||||
createPodSandboxCommand,
|
|
||||||
stopPodSandboxCommand,
|
|
||||||
removePodSandboxCommand,
|
|
||||||
createContainerCommand,
|
createContainerCommand,
|
||||||
startContainerCommand,
|
startContainerCommand,
|
||||||
stopContainerCommand,
|
stopContainerCommand,
|
||||||
|
@ -264,9 +263,18 @@ var runtimeVersionCommand = cli.Command{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var podSandboxCommand = cli.Command{
|
||||||
|
Name: "pod",
|
||||||
|
Subcommands: []cli.Command{
|
||||||
|
createPodSandboxCommand,
|
||||||
|
stopPodSandboxCommand,
|
||||||
|
removePodSandboxCommand,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
var createPodSandboxCommand = cli.Command{
|
var createPodSandboxCommand = cli.Command{
|
||||||
Name: "createpodsandbox",
|
Name: "create",
|
||||||
Usage: "create a pod sandbox",
|
Usage: "create a pod",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "config",
|
Name: "config",
|
||||||
|
@ -293,7 +301,7 @@ var createPodSandboxCommand = cli.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
var stopPodSandboxCommand = cli.Command{
|
var stopPodSandboxCommand = cli.Command{
|
||||||
Name: "stoppodsandbox",
|
Name: "stop",
|
||||||
Usage: "stop a pod sandbox",
|
Usage: "stop a pod sandbox",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
@ -320,7 +328,7 @@ var stopPodSandboxCommand = cli.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
var removePodSandboxCommand = cli.Command{
|
var removePodSandboxCommand = cli.Command{
|
||||||
Name: "removepodsandbox",
|
Name: "remove",
|
||||||
Usage: "remove a pod sandbox",
|
Usage: "remove a pod sandbox",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
|
Loading…
Reference in a new issue