mirror of
https://github.com/hanzo-ml/kuberay.git
synced 2026-10-30 19:48:47 +00:00
See the description in the corresponding issue for details. Closes: ray-project/kuberay#2492 Signed-off-by: Chi-Sheng Liu <[email protected]>
29 lines
700 B
Go
29 lines
700 B
Go
package get
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/spf13/cobra"
|
|
"k8s.io/cli-runtime/pkg/genericclioptions"
|
|
)
|
|
|
|
func NewGetCommand(streams genericclioptions.IOStreams) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "get",
|
|
Short: "Display one or many Ray resources.",
|
|
Long: `Prints a table of the most important information about the specified Ray resources.`,
|
|
Aliases: []string{"list"},
|
|
SilenceUsage: true,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
if len(args) > 0 {
|
|
fmt.Println(fmt.Errorf("unknown command(s) %q", strings.Join(args, " ")))
|
|
}
|
|
cmd.HelpFunc()(cmd, args)
|
|
},
|
|
}
|
|
|
|
cmd.AddCommand(NewGetClusterCommand(streams))
|
|
return cmd
|
|
}
|