()
| 29 | ) |
| 30 | |
| 31 | func newCASBackendListCmd() *cobra.Command { |
| 32 | cmd := &cobra.Command{ |
| 33 | Use: "list", |
| 34 | Aliases: []string{"ls"}, |
| 35 | Short: "List CAS Backends from your organization", |
| 36 | RunE: func(cmd *cobra.Command, args []string) error { |
| 37 | res, err := action.NewCASBackendList(ActionOpts).Run() |
| 38 | if err != nil { |
| 39 | return err |
| 40 | } |
| 41 | |
| 42 | return output.EncodeOutput(flagOutputFormat, res, casBackendListTableOutput) |
| 43 | }, |
| 44 | } |
| 45 | |
| 46 | cmd.Flags().BoolVar(&full, "full", false, "show the full output") |
| 47 | return cmd |
| 48 | } |
| 49 | |
| 50 | func casBackendItemTableOutput(backend *action.CASBackendItem) error { |
| 51 | return casBackendListTableOutput([]*action.CASBackendItem{backend}) |
no test coverage detected