()
| 624 | } |
| 625 | |
| 626 | func newStorageDownloadOCICmd() *cobra.Command { |
| 627 | cmd := &cobra.Command{ |
| 628 | Use: "oci <node> <storage> <reference>", |
| 629 | Short: "Pull an OCI image into storage", |
| 630 | Args: cobra.ExactArgs(3), |
| 631 | Example: ` pvetui storage download oci pve01 local registry.example.com/myimage:latest |
| 632 | pvetui storage download oci pve01 local registry.example.com/myimage:latest --no-wait`, |
| 633 | RunE: runStorageDownloadOCI, |
| 634 | } |
| 635 | |
| 636 | cmd.Flags().StringP("output", "o", "json", "Output format: json or table") |
| 637 | addNoWaitFlag(cmd) |
| 638 | |
| 639 | cmd.ValidArgsFunction = completeStorageNames |
| 640 | |
| 641 | return cmd |
| 642 | } |
| 643 | |
| 644 | func runStorageDownloadOCI(cmd *cobra.Command, args []string) error { |
| 645 | ctx := context.Background() |
no test coverage detected