Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add podman volume create -d short option for driver #16467

Merged
merged 1 commit into from
Nov 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/podman/volumes/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func init() {
flags := createCommand.Flags()

driverFlagName := "driver"
flags.StringVar(&createOpts.Driver, driverFlagName, "local", "Specify volume driver name")
flags.StringVarP(&createOpts.Driver, driverFlagName, "d", "local", "Specify volume driver name")
_ = createCommand.RegisterFlagCompletionFunc(driverFlagName, completion.AutocompleteNone)

labelFlagName := "label"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-volume-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ driver options can be set using the **--opt** flag.

## OPTIONS

#### **--driver**=*driver*
#### **--driver**, **-d**=*driver*

Specify the volume driver name (default **local**).
There are two drivers supported by Podman itself: **local** and **image**.
Expand Down
4 changes: 2 additions & 2 deletions test/system/160-volumes.bats
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function teardown() {
mylabel=$(random_string)

# Create a named volume
run_podman volume create --label l=$mylabel $myvolume
run_podman volume create -d local --label l=$mylabel $myvolume
is "$output" "$myvolume" "output from volume create"

# Confirm that it shows up in 'volume ls', and confirm values
Expand Down Expand Up @@ -246,7 +246,7 @@ EOF
# Podman volume import test
@test "podman volume import test" {
skip_if_remote "volumes import is not applicable on podman-remote"
run_podman volume create my_vol
run_podman volume create --driver local my_vol
run_podman run --rm -v my_vol:/data $IMAGE sh -c "echo hello >> /data/test"
run_podman volume create my_vol2

Expand Down