Skip to content

Commit

Permalink
completions: add ocp get-error-injection command
Browse files Browse the repository at this point in the history
The set-error-injection command will be added separately.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t committed Jul 7, 2024
1 parent f31d638 commit 5fc6262
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions completions/_nvme
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,18 @@ _nvme () {
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp tcg-configuration-log options" _ocp_tcg_configuration_log
;;
(get-error-injection)
local _get_error_injection
_get_error_injection=(
/dev/nvme':supply a device to use (required)'
--sel=':0-3: current/default/saved/supported/changed:'
-s':alias for --sel'
--no-uuid':Skip UUID index search'
-n':alias for --no-uuid'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp get-error-injection options" _get_error_injection
;;
(*)
_files
;;
Expand Down Expand Up @@ -2502,6 +2514,7 @@ _nvme () {
telemetry-string-log':Retrieve Telemetry string Log Page'
set-telemetry-profile':Set Telemetry Profile'
tcg-configuration-log':tcg configuration log'
get-error-injection':get error injection'
)
_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 @@ -1478,6 +1478,9 @@ plugin_ocp_opts () {
"tcg-configuration-log")
opts+=" --output-file= -o"
;;
"get-error-injection")
opts+=" --sel= -s --no-uuid -n"
;;
"help")
opts+=$NO_OPTS
;;
Expand Down Expand Up @@ -1555,7 +1558,8 @@ _nvme_subcmds () {
vs-fw-activate-history device-capability-log \
set-dssd-power-state-feature get-dssd-power-state-feature \
telemetry-string-log set-telemetry-profile \
set-dssd-async-event-config get-dssd-async-event-config"
set-dssd-async-event-config get-dssd-async-event-config \
get-error-injection"
)

# Associative array mapping plugins to corresponding option completions
Expand Down

0 comments on commit 5fc6262

Please sign in to comment.