Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sandbox from user facing descriptions. #278

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmd/crictl/container.go
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 5 additions & 5 deletions cmd/crictl/main.go
Original file line number Diff line number Diff line change
@@ -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,
4 changes: 2 additions & 2 deletions cmd/crictl/portforward.go
Original file line number Diff line number Diff line change
@@ -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 {
46 changes: 23 additions & 23 deletions cmd/crictl/sandbox.go
Original file line number Diff line number Diff line change
@@ -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,53 +147,53 @@ 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",
Usage: "filter by key=value label",
},
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",
Usage: "Output format, One of: json|yaml|table",
},
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 {
6 changes: 3 additions & 3 deletions cmd/crictl/stats.go
Original file line number Diff line number Diff line change
@@ -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"),
}