Skip to content

Commit d127846

Browse files
authored
Merge pull request #278 from Random-Liu/remove-sandbox-from-description
Remove sandbox from user facing descriptions.
2 parents 7962f60 + 8611cfe commit d127846

File tree

5 files changed

+38
-38
lines changed

5 files changed

+38
-38
lines changed

cmd/crictl/container.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type createOptions struct {
5353
var createContainerCommand = cli.Command{
5454
Name: "create",
5555
Usage: "Create a new container",
56-
ArgsUsage: "PODSANDBOX container-config.[json|yaml] podsandbox-config.[json|yaml]",
56+
ArgsUsage: "POD container-config.[json|yaml] pod-config.[json|yaml]",
5757
Flags: []cli.Flag{},
5858
Action: func(context *cli.Context) error {
5959
if len(context.Args()) != 3 {
@@ -264,9 +264,9 @@ var listContainersCommand = cli.Command{
264264
Usage: "Filter by container id",
265265
},
266266
cli.StringFlag{
267-
Name: "podsandbox, p",
267+
Name: "pod, p",
268268
Value: "",
269-
Usage: "Filter by pod sandbox id",
269+
Usage: "Filter by pod id",
270270
},
271271
cli.StringFlag{
272272
Name: "state",
@@ -310,7 +310,7 @@ var listContainersCommand = cli.Command{
310310

311311
opts := listOptions{
312312
id: context.String("id"),
313-
podID: context.String("podsandbox"),
313+
podID: context.String("pod"),
314314
state: context.String("state"),
315315
verbose: context.Bool("verbose"),
316316
quiet: context.Bool("quiet"),
@@ -630,7 +630,7 @@ func ListContainers(client pb.RuntimeServiceClient, opts listOptions) error {
630630
}
631631

632632
fmt.Printf("ID: %s\n", c.Id)
633-
fmt.Printf("PodSandboxID: %s\n", c.PodSandboxId)
633+
fmt.Printf("PodID: %s\n", c.PodSandboxId)
634634
if c.Metadata != nil {
635635
if c.Metadata.Name != "" {
636636
fmt.Printf("Name: %s\n", c.Metadata.Name)

cmd/crictl/main.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ func main() {
101101
listImageCommand,
102102
containerStatusCommand,
103103
imageStatusCommand,
104-
podSandboxStatusCommand,
104+
podStatusCommand,
105105
logsCommand,
106106
runtimePortForwardCommand,
107107
listContainersCommand,
108108
pullImageCommand,
109-
runPodSandboxCommand,
109+
runPodCommand,
110110
removeContainerCommand,
111111
removeImageCommand,
112-
removePodSandboxCommand,
113-
listPodSandboxCommand,
112+
removePodCommand,
113+
listPodCommand,
114114
startContainerCommand,
115115
runtimeStatusCommand,
116116
stopContainerCommand,
117-
stopPodSandboxCommand,
117+
stopPodCommand,
118118
updateContainerCommand,
119119
configCommand,
120120
statsCommand,

cmd/crictl/portforward.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ import (
3535

3636
var runtimePortForwardCommand = cli.Command{
3737
Name: "port-forward",
38-
Usage: "Forward local port to a pod sandbox",
39-
ArgsUsage: "PODSANDBOX [LOCAL_PORT:]REMOTE_PORT",
38+
Usage: "Forward local port to a pod",
39+
ArgsUsage: "POD [LOCAL_PORT:]REMOTE_PORT",
4040
Action: func(context *cli.Context) error {
4141
args := context.Args()
4242
if len(args) < 2 {

cmd/crictl/sandbox.go

+23-23
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ func (a sandboxByCreated) Less(i, j int) bool {
4242
return a[i].CreatedAt > a[j].CreatedAt
4343
}
4444

45-
var runPodSandboxCommand = cli.Command{
45+
var runPodCommand = cli.Command{
4646
Name: "runp",
47-
Usage: "Run a new pod sandbox",
48-
ArgsUsage: "podsandbox-config.[json|yaml]",
47+
Usage: "Run a new pod",
48+
ArgsUsage: "pod-config.[json|yaml]",
4949
Action: func(context *cli.Context) error {
5050
sandboxSpec := context.Args().First()
5151
if sandboxSpec == "" {
@@ -70,10 +70,10 @@ var runPodSandboxCommand = cli.Command{
7070
},
7171
}
7272

73-
var stopPodSandboxCommand = cli.Command{
73+
var stopPodCommand = cli.Command{
7474
Name: "stopp",
75-
Usage: "Stop one or more running pod sandboxes",
76-
ArgsUsage: "PODSANDBOX [PODSANDBOX...]",
75+
Usage: "Stop one or more running pods",
76+
ArgsUsage: "POD [POD...]",
7777
Action: func(context *cli.Context) error {
7878
if context.NArg() == 0 {
7979
return cli.ShowSubcommandHelp(context)
@@ -92,10 +92,10 @@ var stopPodSandboxCommand = cli.Command{
9292
},
9393
}
9494

95-
var removePodSandboxCommand = cli.Command{
95+
var removePodCommand = cli.Command{
9696
Name: "rmp",
97-
Usage: "Remove one or more pod sandboxes",
98-
ArgsUsage: "PODSANDBOX [PODSANDBOX...]",
97+
Usage: "Remove one or more pods",
98+
ArgsUsage: "POD [POD...]",
9999
Action: func(context *cli.Context) error {
100100
if context.NArg() == 0 {
101101
return cli.ShowSubcommandHelp(context)
@@ -114,10 +114,10 @@ var removePodSandboxCommand = cli.Command{
114114
},
115115
}
116116

117-
var podSandboxStatusCommand = cli.Command{
117+
var podStatusCommand = cli.Command{
118118
Name: "inspectp",
119-
Usage: "Display the status of one or more pod sandboxes",
120-
ArgsUsage: "PODSANDBOX [PODSANDBOX...]",
119+
Usage: "Display the status of one or more pods",
120+
ArgsUsage: "POD [POD...]",
121121
Flags: []cli.Flag{
122122
cli.StringFlag{
123123
Name: "output, o",
@@ -147,53 +147,53 @@ var podSandboxStatusCommand = cli.Command{
147147
},
148148
}
149149

150-
var listPodSandboxCommand = cli.Command{
150+
var listPodCommand = cli.Command{
151151
Name: "pods",
152-
Usage: "List pod sandboxes",
152+
Usage: "List pods",
153153
Flags: []cli.Flag{
154154
cli.StringFlag{
155155
Name: "id",
156156
Value: "",
157-
Usage: "filter by pod sandbox id",
157+
Usage: "filter by pod id",
158158
},
159159
cli.StringFlag{
160160
Name: "name",
161161
Value: "",
162-
Usage: "filter by pod sandbox name",
162+
Usage: "filter by pod name",
163163
},
164164
cli.StringFlag{
165165
Name: "namespace",
166166
Value: "",
167-
Usage: "filter by pod sandbox namespace",
167+
Usage: "filter by pod namespace",
168168
},
169169
cli.StringFlag{
170170
Name: "state, s",
171171
Value: "",
172-
Usage: "filter by pod sandbox state",
172+
Usage: "filter by pod state",
173173
},
174174
cli.StringSliceFlag{
175175
Name: "label",
176176
Usage: "filter by key=value label",
177177
},
178178
cli.BoolFlag{
179179
Name: "verbose, v",
180-
Usage: "show verbose info for pod sandboxes",
180+
Usage: "show verbose info for pods",
181181
},
182182
cli.BoolFlag{
183183
Name: "quiet, q",
184-
Usage: "list only pod sandbox IDs",
184+
Usage: "list only pod IDs",
185185
},
186186
cli.StringFlag{
187187
Name: "output, o",
188188
Usage: "Output format, One of: json|yaml|table",
189189
},
190190
cli.BoolFlag{
191191
Name: "latest, l",
192-
Usage: "Show recently created pod sandboxes",
192+
Usage: "Show recently created pods",
193193
},
194194
cli.IntFlag{
195195
Name: "last, n",
196-
Usage: "Show last n recently created pod sandboxes",
196+
Usage: "Show last n recently created pods",
197197
},
198198
cli.BoolFlag{
199199
Name: "no-trunc",
@@ -417,7 +417,7 @@ func ListPodSandboxes(client pb.RuntimeServiceClient, opts listOptions) error {
417417

418418
w := tabwriter.NewWriter(os.Stdout, 20, 1, 3, ' ', 0)
419419
if !opts.verbose && !opts.quiet {
420-
fmt.Fprintln(w, "PODSANDBOX ID\tCREATED\tSTATE\tNAME\tNAMESPACE\tATTEMPT")
420+
fmt.Fprintln(w, "POD ID\tCREATED\tSTATE\tNAME\tNAMESPACE\tATTEMPT")
421421
}
422422
for _, pod := range r.Items {
423423
if opts.quiet {

cmd/crictl/stats.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ var statsCommand = cli.Command{
6161
Usage: "Filter by container id",
6262
},
6363
cli.StringFlag{
64-
Name: "podsandbox, p",
64+
Name: "pod, p",
6565
Value: "",
66-
Usage: "Filter by pod sandbox id",
66+
Usage: "Filter by pod id",
6767
},
6868
cli.StringSliceFlag{
6969
Name: "label",
@@ -88,7 +88,7 @@ var statsCommand = cli.Command{
8888
opts := statsOptions{
8989
all: context.Bool("all"),
9090
id: context.String("id"),
91-
podID: context.String("podsandbox"),
91+
podID: context.String("pod"),
9292
sample: time.Duration(context.Int("seconds")) * time.Second,
9393
output: context.String("output"),
9494
}

0 commit comments

Comments
 (0)