Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cli/cmd/cluster_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ replicated cluster create --distribution eks --version 1.21 --nodes 3 --addon ob

cmd.Flags().BoolVar(&r.args.createClusterDryRun, "dry-run", false, "Dry run")

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

_ = cmd.MarkFlagRequired("distribution")

Expand Down
3 changes: 1 addition & 2 deletions cli/cmd/cluster_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ replicated cluster ls --output wide`,
cmd.Flags().BoolVar(&r.args.lsClusterShowTerminated, "show-terminated", false, "when set, only show terminated clusters")
cmd.Flags().StringVar(&r.args.lsClusterStartTime, "start-time", "", "start time for the query (Format: 2006-01-02T15:04:05Z)")
cmd.Flags().StringVar(&r.args.lsClusterEndTime, "end-time", "", "end time for the query (Format: 2006-01-02T15:04:05Z)")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().BoolVarP(&r.args.lsClusterWatch, "watch", "w", false, "watch clusters")

return cmd
Expand Down Expand Up @@ -97,7 +97,6 @@ func (r *runners) listClusters(_ *cobra.Command, args []string) error {
// Runs until ctrl C is recognized
for range time.Tick(2 * time.Second) {
newClusters, err := r.kotsAPI.ListClusters(r.args.lsClusterShowTerminated, startTime, endTime)

if err != nil {
if err == promptui.ErrInterrupt {
return errors.New("interrupted")
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster_nodegroup_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ replicated cluster nodegroup ls CLUSTER_ID --output wide`,
}
parent.AddCommand(cmd)

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster_port_expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ replicated cluster port expose CLUSTER_ID --port 8080 --protocol https --output
}
cmd.Flags().StringSliceVar(&r.args.clusterExposePortProtocols, "protocol", []string{"http", "https"}, `Protocol to expose (valid values are "http", "https", "ws" and "wss")`)
cmd.Flags().BoolVar(&r.args.clusterExposePortIsWildcard, "wildcard", false, "Create a wildcard DNS entry and TLS certificate for this port")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster_port_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ replicated cluster port ls CLUSTER_ID --output wide`,
}
parent.AddCommand(cmd)

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster_port_rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ replicated cluster port rm CLUSTER_ID --id PORT_ID --output json`,
parent.AddCommand(cmd)

cmd.Flags().StringVar(&r.args.clusterPortRemoveAddonID, "id", "", "ID of the port to remove (required)")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

// Deprecated flags
cmd.Flags().IntVar(&r.args.clusterPortRemovePort, "port", 0, "Port to remove")
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster_update_nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ replicated cluster update nodegroup CLUSTER_ID --nodegroup-id NODEGROUP_ID --min
cmd.Flags().StringVar(&r.args.updateClusterNodeGroupMinCount, "min-nodes", "", "The minimum number of nodes in the nodegroup")
cmd.Flags().StringVar(&r.args.updateClusterNodeGroupMaxCount, "max-nodes", "", "The maximum number of nodes in the nodegroup")

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster_update_ttl.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ replicated cluster update ttl CLUSTER_ID --ttl 24h`,
parent.AddCommand(cmd)

cmd.Flags().StringVar(&r.args.updateClusterTTL, "ttl", "", "Update TTL which starts from the moment the cluster is running (duration, max 48h).")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

cmd.MarkFlagRequired("ttl")

Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ replicated cluster upgrade [CLUSTER_ID] --version 1.31 --wait 30m`,
cmd.Flags().BoolVar(&r.args.upgradeClusterDryRun, "dry-run", false, "Dry run")
cmd.Flags().DurationVar(&r.args.upgradeClusterWaitDuration, "wait", 0, "Wait duration for cluster to be ready (leave empty to not wait)")

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

_ = cmd.MarkFlagRequired("version")

Expand Down
3 changes: 1 addition & 2 deletions cli/cmd/network_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (r *runners) InitNetworkCreate(parent *cobra.Command) *cobra.Command {

cmd.Flags().BoolVar(&r.args.createNetworkDryRun, "dry-run", false, "Dry run")

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down Expand Up @@ -61,7 +61,6 @@ func (r *runners) createNetwork(_ *cobra.Command, args []string) error {
}

return print.Network(r.outputFormat, r.w, network)

}

func (r *runners) createAndWaitForNetwork(opts kotsclient.CreateNetworkOpts) (*types.Network, error) {
Expand Down
3 changes: 1 addition & 2 deletions cli/cmd/network_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *runners) InitNetworkList(parent *cobra.Command) *cobra.Command {

cmd.Flags().StringVar(&r.args.lsNetworkStartTime, "start-time", "", "start time for the query (Format: 2006-01-02T15:04:05Z)")
cmd.Flags().StringVar(&r.args.lsNetworkEndTime, "end-time", "", "end time for the query (Format: 2006-01-02T15:04:05Z)")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().BoolVarP(&r.args.lsNetworkWatch, "watch", "w", false, "watch networks")

return cmd
Expand Down Expand Up @@ -75,7 +75,6 @@ func (r *runners) listNetworks(_ *cobra.Command, args []string) error {
// Runs until ctrl C is recognized
for range time.Tick(2 * time.Second) {
newNetworks, err := r.kotsAPI.ListNetworks(startTime, endTime)

if err != nil {
if err == promptui.ErrInterrupt {
return errors.New("interrupted")
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/vm_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ replicated vm create --distribution ubuntu --version 20.04 --count 5 --instance-

cmd.Flags().BoolVar(&r.args.createVMDryRun, "dry-run", false, "Dry run")

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

_ = cmd.MarkFlagRequired("distribution")

Expand Down
3 changes: 1 addition & 2 deletions cli/cmd/vm_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ replicated vm ls --watch`,
cmd.Flags().BoolVar(&r.args.lsVMShowTerminated, "show-terminated", false, "when set, only show terminated vms")
cmd.Flags().StringVar(&r.args.lsVMStartTime, "start-time", "", "start time for the query (Format: 2006-01-02T15:04:05Z)")
cmd.Flags().StringVar(&r.args.lsVMEndTime, "end-time", "", "end time for the query (Format: 2006-01-02T15:04:05Z)")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().BoolVarP(&r.args.lsVMWatch, "watch", "w", false, "watch vms")

return cmd
Expand Down Expand Up @@ -93,7 +93,6 @@ func (r *runners) listVMs(_ *cobra.Command, args []string) error {
// Runs until ctrl C is recognized
for range time.Tick(2 * time.Second) {
newVMs, err := r.kotsAPI.ListVMs(r.args.lsVMShowTerminated, startTime, endTime)

if err != nil {
if err == promptui.ErrInterrupt {
return errors.New("interrupted")
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/vm_port_expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ replicated vm port expose VM_ID --port 8080 --protocol https --output json`,
}
cmd.Flags().StringSliceVar(&r.args.vmExposePortProtocols, "protocol", []string{"http", "https"}, `Protocol to expose (valid values are "http", "https", "ws" and "wss")`)
cmd.Flags().BoolVar(&r.args.vmExposePortIsWildcard, "wildcard", false, "Create a wildcard DNS entry and TLS certificate for this port")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/vm_port_ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ replicated vm port ls VM_ID --output wide`,
}
parent.AddCommand(cmd)

cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/vm_port_rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ replicated vm port rm VM_ID --id PORT_ID --output json`,
if err != nil {
panic(err)
}
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/vm_update_ttl.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ replicated vm update ttl aaaaa11 --ttl 30m`,
parent.AddCommand(cmd)

cmd.Flags().StringVar(&r.args.updateVMTTL, "ttl", "", "Update TTL which starts from the moment the vm is running (duration, max 48h).")
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table|wide (default: table)")
cmd.Flags().StringVarP(&r.outputFormat, "output", "o", "table", "The output format to use. One of: json|table|wide (default: table)")

cmd.MarkFlagRequired("ttl")

Expand Down