── storage list ─────────────────────────────────────────────────────────────
()
| 70 | // ── storage list ───────────────────────────────────────────────────────────── |
| 71 | |
| 72 | func newStorageListCmd() *cobra.Command { |
| 73 | cmd := &cobra.Command{ |
| 74 | Use: "list", |
| 75 | Short: "List storages", |
| 76 | Long: `List storages across the cluster. |
| 77 | |
| 78 | Without --node, each (storage, node) pair is its own row — shared storages appear |
| 79 | once per node they are active on, matching the TUI storage browser layout.`, |
| 80 | Example: ` pvetui storage list |
| 81 | pvetui storage list --node pve01 |
| 82 | pvetui storage list --output table`, |
| 83 | RunE: runStorageList, |
| 84 | } |
| 85 | |
| 86 | cmd.Flags().String("node", "", "Filter to a specific node") |
| 87 | cmd.Flags().StringP("output", "o", "json", "Output format: json or table") |
| 88 | |
| 89 | return cmd |
| 90 | } |
| 91 | |
| 92 | func runStorageList(cmd *cobra.Command, _ []string) error { |
| 93 | ctx := context.Background() |