diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-01 10:53:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 10:53:14 -0400 |
commit | 81aabc80545873a1ea6f7707a904997f1b400855 (patch) | |
tree | f918ca6a05abcf0be9e7155ca6554a42549244c8 /cmd/podman/common | |
parent | 285c9ec69b7c48467d183d2507cbd4163b9c21c9 (diff) | |
parent | 2d86051893fc2e813f26c16d13786bb377c26d48 (diff) | |
download | podman-81aabc80545873a1ea6f7707a904997f1b400855.tar.gz podman-81aabc80545873a1ea6f7707a904997f1b400855.tar.bz2 podman-81aabc80545873a1ea6f7707a904997f1b400855.zip |
Merge pull request #11686 from cdoern/podDeviceOptions
Pod Device-Read-BPS support
Diffstat (limited to 'cmd/podman/common')
-rw-r--r-- | cmd/podman/common/create.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index e490fa121..e714b6785 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -164,14 +164,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, ) _ = cmd.RegisterFlagCompletionFunc(deviceCgroupRuleFlagName, completion.AutocompleteNone) - deviceReadBpsFlagName := "device-read-bps" - createFlags.StringSliceVar( - &cf.DeviceReadBPs, - deviceReadBpsFlagName, []string{}, - "Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)", - ) - _ = cmd.RegisterFlagCompletionFunc(deviceReadBpsFlagName, completion.AutocompleteDefault) - deviceReadIopsFlagName := "device-read-iops" createFlags.StringSliceVar( &cf.DeviceReadIOPs, @@ -869,6 +861,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, volumeDesciption, ) _ = cmd.RegisterFlagCompletionFunc(volumeFlagName, AutocompleteVolumeFlag) + deviceFlagName := "device" createFlags.StringSliceVar( &cf.Devices, @@ -876,4 +869,12 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, "Add a host device to the container", ) _ = cmd.RegisterFlagCompletionFunc(deviceFlagName, completion.AutocompleteDefault) + + deviceReadBpsFlagName := "device-read-bps" + createFlags.StringSliceVar( + &cf.DeviceReadBPs, + deviceReadBpsFlagName, []string{}, + "Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)", + ) + _ = cmd.RegisterFlagCompletionFunc(deviceReadBpsFlagName, completion.AutocompleteDefault) } |