(deps commandDeps)
| 94 | } |
| 95 | |
| 96 | func newProviderModelsStatusCommand(deps commandDeps) *cobra.Command { |
| 97 | cmd := &cobra.Command{ |
| 98 | Use: "status [provider]", |
| 99 | Short: "Show provider model catalog source status", |
| 100 | Args: optionalProviderArg(), |
| 101 | RunE: func(cmd *cobra.Command, args []string) error { |
| 102 | client, err := clientFromDeps(deps) |
| 103 | if err != nil { |
| 104 | return err |
| 105 | } |
| 106 | record, err := client.ProviderModelStatus(cmd.Context(), providerArgValue(args)) |
| 107 | if err != nil { |
| 108 | return err |
| 109 | } |
| 110 | return writeCommandOutput(cmd, providerModelStatusBundle(record)) |
| 111 | }, |
| 112 | } |
| 113 | return cmd |
| 114 | } |
| 115 | |
| 116 | func providerModelListBundle(record ProviderModelListRecord) outputBundle { |
| 117 | return listBundle( |
no test coverage detected