Skip to content

Commit

Permalink
completions: Add bash completion for DSSD Power state feature(FID: C7h)
Browse files Browse the repository at this point in the history
Signed-off-by: Arunpandian J <[email protected]>
  • Loading branch information
Arunpandian15 authored and igaw committed Sep 4, 2023
1 parent 72e41cf commit 8081609
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions completions/_nvme
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,20 @@ _nvme () {
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp device-capability-log options" _device_capability_log
;;
(set-dssd-power-state-feature)
local _set_dssd_power_state_feature
_set_dssd_power_state_feature=(
/dev/nvme':supply a device to use (required)'
--power-state=':DSSD Power State to set in watts'
-p':alias for --power-state'
--save':Specifies that the controller shall save the attribute'
-s':alias for --save'
--no-uuid':Skip UUID index search'
-n':alias for --no-uuid'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp set-dssd-power-state-feature options" _set_dssd_power_state_feature
;;
(*)
_files
;;
Expand Down Expand Up @@ -1993,6 +2007,7 @@ _nvme () {
clear-pcie-correctable-error-counters':Clear PCIe correctable error counters'
vs-fw-activate-history':Get firmware activation history log'
device-capability-log':Get Device capability log'
set-dssd-power-state-feature':Set DSSD Power State'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp options" _ocp
Expand Down
6 changes: 5 additions & 1 deletion completions/bash-nvme-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,9 @@ plugin_ocp_opts () {
"device-capability-log")
opts+=" --output-format= -o"
;;
"set-dssd-power-state-feature")
opts+=" --power-state= -p --no-uuid -n --save -s"
;;
"help")
opts+=$NO_OPTS
;;
Expand Down Expand Up @@ -1416,7 +1419,8 @@ _nvme_subcmds () {
set-latency-monitor-feature internal-log \
clear-fw-activate-history eol-plp-failure-mode \
clear-pcie-correctable-error-counters \
vs-fw-activate-history device-capability-log"
vs-fw-activate-history device-capability-log \
set-dssd-power-state-feature"
)

# Associative array mapping plugins to coresponding option completions
Expand Down

0 comments on commit 8081609

Please sign in to comment.