From 8611cfe16a89915ac483142bf29512327ee10e58 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Thu, 29 Mar 2018 02:06:12 +0000 Subject: [PATCH] Remove sandbox from user facing descriptions. Signed-off-by: Lantao Liu --- cmd/crictl/container.go | 10 ++++----- cmd/crictl/main.go | 10 ++++----- cmd/crictl/portforward.go | 4 ++-- cmd/crictl/sandbox.go | 46 +++++++++++++++++++-------------------- cmd/crictl/stats.go | 6 ++--- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/cmd/crictl/container.go b/cmd/crictl/container.go index 10276a017f..e132568e0b 100644 --- a/cmd/crictl/container.go +++ b/cmd/crictl/container.go @@ -53,7 +53,7 @@ type createOptions struct { var createContainerCommand = cli.Command{ Name: "create", Usage: "Create a new container", - ArgsUsage: "PODSANDBOX container-config.[json|yaml] podsandbox-config.[json|yaml]", + ArgsUsage: "POD container-config.[json|yaml] pod-config.[json|yaml]", Flags: []cli.Flag{}, Action: func(context *cli.Context) error { if len(context.Args()) != 3 { @@ -264,9 +264,9 @@ var listContainersCommand = cli.Command{ Usage: "Filter by container id", }, cli.StringFlag{ - Name: "podsandbox, p", + Name: "pod, p", Value: "", - Usage: "Filter by pod sandbox id", + Usage: "Filter by pod id", }, cli.StringFlag{ Name: "state", @@ -310,7 +310,7 @@ var listContainersCommand = cli.Command{ opts := listOptions{ id: context.String("id"), - podID: context.String("podsandbox"), + podID: context.String("pod"), state: context.String("state"), verbose: context.Bool("verbose"), quiet: context.Bool("quiet"), @@ -630,7 +630,7 @@ func ListContainers(client pb.RuntimeServiceClient, opts listOptions) error { } fmt.Printf("ID: %s\n", c.Id) - fmt.Printf("PodSandboxID: %s\n", c.PodSandboxId) + fmt.Printf("PodID: %s\n", c.PodSandboxId) if c.Metadata != nil { if c.Metadata.Name != "" { fmt.Printf("Name: %s\n", c.Metadata.Name) diff --git a/cmd/crictl/main.go b/cmd/crictl/main.go index 78ba749865..844d70226f 100644 --- a/cmd/crictl/main.go +++ b/cmd/crictl/main.go @@ -101,20 +101,20 @@ func main() { listImageCommand, containerStatusCommand, imageStatusCommand, - podSandboxStatusCommand, + podStatusCommand, logsCommand, runtimePortForwardCommand, listContainersCommand, pullImageCommand, - runPodSandboxCommand, + runPodCommand, removeContainerCommand, removeImageCommand, - removePodSandboxCommand, - listPodSandboxCommand, + removePodCommand, + listPodCommand, startContainerCommand, runtimeStatusCommand, stopContainerCommand, - stopPodSandboxCommand, + stopPodCommand, updateContainerCommand, configCommand, statsCommand, diff --git a/cmd/crictl/portforward.go b/cmd/crictl/portforward.go index 2513c0e931..c264558d99 100644 --- a/cmd/crictl/portforward.go +++ b/cmd/crictl/portforward.go @@ -35,8 +35,8 @@ import ( var runtimePortForwardCommand = cli.Command{ Name: "port-forward", - Usage: "Forward local port to a pod sandbox", - ArgsUsage: "PODSANDBOX [LOCAL_PORT:]REMOTE_PORT", + Usage: "Forward local port to a pod", + ArgsUsage: "POD [LOCAL_PORT:]REMOTE_PORT", Action: func(context *cli.Context) error { args := context.Args() if len(args) < 2 { diff --git a/cmd/crictl/sandbox.go b/cmd/crictl/sandbox.go index e09d1d6fd3..b3da96b494 100644 --- a/cmd/crictl/sandbox.go +++ b/cmd/crictl/sandbox.go @@ -42,10 +42,10 @@ func (a sandboxByCreated) Less(i, j int) bool { return a[i].CreatedAt > a[j].CreatedAt } -var runPodSandboxCommand = cli.Command{ +var runPodCommand = cli.Command{ Name: "runp", - Usage: "Run a new pod sandbox", - ArgsUsage: "podsandbox-config.[json|yaml]", + Usage: "Run a new pod", + ArgsUsage: "pod-config.[json|yaml]", Action: func(context *cli.Context) error { sandboxSpec := context.Args().First() if sandboxSpec == "" { @@ -70,10 +70,10 @@ var runPodSandboxCommand = cli.Command{ }, } -var stopPodSandboxCommand = cli.Command{ +var stopPodCommand = cli.Command{ Name: "stopp", - Usage: "Stop one or more running pod sandboxes", - ArgsUsage: "PODSANDBOX [PODSANDBOX...]", + Usage: "Stop one or more running pods", + ArgsUsage: "POD [POD...]", Action: func(context *cli.Context) error { if context.NArg() == 0 { return cli.ShowSubcommandHelp(context) @@ -92,10 +92,10 @@ var stopPodSandboxCommand = cli.Command{ }, } -var removePodSandboxCommand = cli.Command{ +var removePodCommand = cli.Command{ Name: "rmp", - Usage: "Remove one or more pod sandboxes", - ArgsUsage: "PODSANDBOX [PODSANDBOX...]", + Usage: "Remove one or more pods", + ArgsUsage: "POD [POD...]", Action: func(context *cli.Context) error { if context.NArg() == 0 { return cli.ShowSubcommandHelp(context) @@ -114,10 +114,10 @@ var removePodSandboxCommand = cli.Command{ }, } -var podSandboxStatusCommand = cli.Command{ +var podStatusCommand = cli.Command{ Name: "inspectp", - Usage: "Display the status of one or more pod sandboxes", - ArgsUsage: "PODSANDBOX [PODSANDBOX...]", + Usage: "Display the status of one or more pods", + ArgsUsage: "POD [POD...]", Flags: []cli.Flag{ cli.StringFlag{ Name: "output, o", @@ -147,29 +147,29 @@ var podSandboxStatusCommand = cli.Command{ }, } -var listPodSandboxCommand = cli.Command{ +var listPodCommand = cli.Command{ Name: "pods", - Usage: "List pod sandboxes", + Usage: "List pods", Flags: []cli.Flag{ cli.StringFlag{ Name: "id", Value: "", - Usage: "filter by pod sandbox id", + Usage: "filter by pod id", }, cli.StringFlag{ Name: "name", Value: "", - Usage: "filter by pod sandbox name", + Usage: "filter by pod name", }, cli.StringFlag{ Name: "namespace", Value: "", - Usage: "filter by pod sandbox namespace", + Usage: "filter by pod namespace", }, cli.StringFlag{ Name: "state, s", Value: "", - Usage: "filter by pod sandbox state", + Usage: "filter by pod state", }, cli.StringSliceFlag{ Name: "label", @@ -177,11 +177,11 @@ var listPodSandboxCommand = cli.Command{ }, cli.BoolFlag{ Name: "verbose, v", - Usage: "show verbose info for pod sandboxes", + Usage: "show verbose info for pods", }, cli.BoolFlag{ Name: "quiet, q", - Usage: "list only pod sandbox IDs", + Usage: "list only pod IDs", }, cli.StringFlag{ Name: "output, o", @@ -189,11 +189,11 @@ var listPodSandboxCommand = cli.Command{ }, cli.BoolFlag{ Name: "latest, l", - Usage: "Show recently created pod sandboxes", + Usage: "Show recently created pods", }, cli.IntFlag{ Name: "last, n", - Usage: "Show last n recently created pod sandboxes", + Usage: "Show last n recently created pods", }, cli.BoolFlag{ Name: "no-trunc", @@ -417,7 +417,7 @@ func ListPodSandboxes(client pb.RuntimeServiceClient, opts listOptions) error { w := tabwriter.NewWriter(os.Stdout, 20, 1, 3, ' ', 0) if !opts.verbose && !opts.quiet { - fmt.Fprintln(w, "PODSANDBOX ID\tCREATED\tSTATE\tNAME\tNAMESPACE\tATTEMPT") + fmt.Fprintln(w, "POD ID\tCREATED\tSTATE\tNAME\tNAMESPACE\tATTEMPT") } for _, pod := range r.Items { if opts.quiet { diff --git a/cmd/crictl/stats.go b/cmd/crictl/stats.go index aed67b903a..a6715d4138 100644 --- a/cmd/crictl/stats.go +++ b/cmd/crictl/stats.go @@ -61,9 +61,9 @@ var statsCommand = cli.Command{ Usage: "Filter by container id", }, cli.StringFlag{ - Name: "podsandbox, p", + Name: "pod, p", Value: "", - Usage: "Filter by pod sandbox id", + Usage: "Filter by pod id", }, cli.StringSliceFlag{ Name: "label", @@ -88,7 +88,7 @@ var statsCommand = cli.Command{ opts := statsOptions{ all: context.Bool("all"), id: context.String("id"), - podID: context.String("podsandbox"), + podID: context.String("pod"), sample: time.Duration(context.Int("seconds")) * time.Second, output: context.String("output"), }