aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/volumes
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-05-17 16:20:30 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-05-19 14:04:22 +0200
commit74f70315b30e9fdd3113181d94b2e64e505a05d5 (patch)
tree8810eccfecb0bdd31dab010b7556a4ee989316a6 /cmd/podman/volumes
parent318e95fd2a9a8b1bcd0f1caec4612335cc1ee591 (diff)
downloadpodman-74f70315b30e9fdd3113181d94b2e64e505a05d5.tar.gz
podman-74f70315b30e9fdd3113181d94b2e64e505a05d5.tar.bz2
podman-74f70315b30e9fdd3113181d94b2e64e505a05d5.zip
shell completion: update podman inspect --type options
Add all option that are supported by the podman inspect --type flag to the completions. Also use the same constants instead of duplicating the strings. In order to do this I had to move the definitions into the common package to prevent an import cycle. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman/volumes')
-rw-r--r--cmd/podman/volumes/export.go3
-rw-r--r--cmd/podman/volumes/import.go3
-rw-r--r--cmd/podman/volumes/inspect.go2
3 files changed, 3 insertions, 5 deletions
diff --git a/cmd/podman/volumes/export.go b/cmd/podman/volumes/export.go
index 1011604de..5086323f9 100644
--- a/cmd/podman/volumes/export.go
+++ b/cmd/podman/volumes/export.go
@@ -6,7 +6,6 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/podman/v4/cmd/podman/common"
- "github.com/containers/podman/v4/cmd/podman/inspect"
"github.com/containers/podman/v4/cmd/podman/registry"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/utils"
@@ -58,7 +57,7 @@ func export(cmd *cobra.Command, args []string) error {
if cliExportOpts.Output == "" {
return errors.New("expects output path, use --output=[path]")
}
- inspectOpts.Type = inspect.VolumeType
+ inspectOpts.Type = common.VolumeType
volumeData, _, err := containerEngine.VolumeInspect(ctx, args, inspectOpts)
if err != nil {
return err
diff --git a/cmd/podman/volumes/import.go b/cmd/podman/volumes/import.go
index 9ff17e5b1..988c5536d 100644
--- a/cmd/podman/volumes/import.go
+++ b/cmd/podman/volumes/import.go
@@ -5,7 +5,6 @@ import (
"os"
"github.com/containers/podman/v4/cmd/podman/common"
- "github.com/containers/podman/v4/cmd/podman/inspect"
"github.com/containers/podman/v4/cmd/podman/parse"
"github.com/containers/podman/v4/cmd/podman/registry"
"github.com/containers/podman/v4/pkg/domain/entities"
@@ -60,7 +59,7 @@ func importVol(cmd *cobra.Command, args []string) error {
tarFile = os.Stdin
}
- inspectOpts.Type = inspect.VolumeType
+ inspectOpts.Type = common.VolumeType
volumeData, _, err := containerEngine.VolumeInspect(ctx, volumes, inspectOpts)
if err != nil {
return err
diff --git a/cmd/podman/volumes/inspect.go b/cmd/podman/volumes/inspect.go
index f21f9c233..7cf363f36 100644
--- a/cmd/podman/volumes/inspect.go
+++ b/cmd/podman/volumes/inspect.go
@@ -48,6 +48,6 @@ func volumeInspect(cmd *cobra.Command, args []string) error {
if (inspectOpts.All && len(args) > 0) || (!inspectOpts.All && len(args) < 1) {
return errors.New("provide one or more volume names or use --all")
}
- inspectOpts.Type = inspect.VolumeType
+ inspectOpts.Type = common.VolumeType
return inspect.Inspect(args, *inspectOpts)
}