mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
cli: podman run/create --device-{read,write}-iops use StringArray()
This option accepts a file path so we should allow commas in it. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -898,7 +898,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
|
||||
}
|
||||
if mode == entities.CreateMode || mode == entities.UpdateMode {
|
||||
deviceReadIopsFlagName := "device-read-iops"
|
||||
createFlags.StringSliceVar(
|
||||
createFlags.StringArrayVar(
|
||||
&cf.DeviceReadIOPs,
|
||||
deviceReadIopsFlagName, []string{},
|
||||
"Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000)",
|
||||
@ -906,7 +906,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
|
||||
_ = cmd.RegisterFlagCompletionFunc(deviceReadIopsFlagName, completion.AutocompleteDefault)
|
||||
|
||||
deviceWriteIopsFlagName := "device-write-iops"
|
||||
createFlags.StringSliceVar(
|
||||
createFlags.StringArrayVar(
|
||||
&cf.DeviceWriteIOPs,
|
||||
deviceWriteIopsFlagName, []string{},
|
||||
"Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000)",
|
||||
|
Reference in New Issue
Block a user