MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / newStorageContentListCmd

Function newStorageContentListCmd

internal/cli/storage.go:275–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273}
274
275func newStorageContentListCmd() *cobra.Command {
276 cmd := &cobra.Command{
277 Use: "list <node> <storage>",
278 Short: "List content in a storage",
279 Args: cobra.ExactArgs(2),
280 Example: ` pvetui storage content list pve01 local
281 pvetui storage content list pve01 local --type iso
282 pvetui storage content list pve01 local --output table`,
283 RunE: runStorageContentList,
284 }
285
286 cmd.Flags().String("type", "", "Filter by content type (iso, vztmpl, backup, snippets, images)")
287 cmd.Flags().StringP("output", "o", "json", "Output format: json or table")
288
289 cmd.ValidArgsFunction = completeStorageNames
290
291 return cmd
292}
293
294func runStorageContentList(cmd *cobra.Command, args []string) error {
295 ctx := context.Background()

Callers 1

newStorageContentCmdFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected