Skip to content

Commit eb659fe

Browse files
ikegami-tigaw
authored andcommitted
completions: add ocp get-error-injection command
The set-error-injection command will be added separately. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
1 parent 5a52f60 commit eb659fe

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

completions/_nvme

+13
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,18 @@ _nvme () {
317317
_arguments '*:: :->subcmds'
318318
_describe -t commands "nvme ocp tcg-configuration-log options" _ocp_tcg_configuration_log
319319
;;
320+
(get-error-injection)
321+
local _get_error_injection
322+
_get_error_injection=(
323+
/dev/nvme':supply a device to use (required)'
324+
--sel=':0-3: current/default/saved/supported/changed:'
325+
-s':alias for --sel'
326+
--no-uuid':Skip UUID index search'
327+
-n':alias for --no-uuid'
328+
)
329+
_arguments '*:: :->subcmds'
330+
_describe -t commands "nvme ocp get-error-injection options" _get_error_injection
331+
;;
320332
(*)
321333
_files
322334
;;
@@ -2547,6 +2559,7 @@ _nvme () {
25472559
telemetry-string-log':Retrieve Telemetry string Log Page'
25482560
set-telemetry-profile':Set Telemetry Profile'
25492561
tcg-configuration-log':tcg configuration log'
2562+
get-error-injection':get error injection'
25502563
)
25512564
_arguments '*:: :->subcmds'
25522565
_describe -t commands "nvme ocp options" _ocp

completions/bash-nvme-completion.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,9 @@ plugin_ocp_opts () {
14871487
"tcg-configuration-log")
14881488
opts+=" --output-file= -o"
14891489
;;
1490+
"get-error-injection")
1491+
opts+=" --sel= -s --no-uuid -n"
1492+
;;
14901493
"help")
14911494
opts+=$NO_OPTS
14921495
;;
@@ -1564,7 +1567,8 @@ _nvme_subcmds () {
15641567
vs-fw-activate-history device-capability-log \
15651568
set-dssd-power-state-feature get-dssd-power-state-feature \
15661569
telemetry-string-log set-telemetry-profile \
1567-
set-dssd-async-event-config get-dssd-async-event-config"
1570+
set-dssd-async-event-config get-dssd-async-event-config \
1571+
get-error-injection"
15681572
)
15691573

15701574
# Associative array mapping plugins to corresponding option completions

0 commit comments

Comments
 (0)