Skip to content

Commit

Permalink
completions: add ocp hardware-component-log command
Browse files Browse the repository at this point in the history
The command lists component descriptions.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t authored and igaw committed Sep 16, 2024
1 parent 0a88ebe commit 0c792f0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
19 changes: 19 additions & 0 deletions completions/_nvme
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,24 @@ _nvme () {
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp set-error-injection options" _set_error_injection
;;
(hardware-component-log)
local _hardware_component_log
_hardware_component_log=(
/dev/nvme':supply a device to use (required)'
--comp-id=':component identifier'
-i':alias for --comp-id'
--list':list component descriptions'
-v':alias for --list'
--verbose':Increase the information detail in the output.'
-v':alias for --verbose'
--output-format=':Output format: normal|json|binary'
-o ':alias for --output-format'
--timeout=':value for timeout'
-t ':alias for --timeout'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp hardware-component-log options" _hardware_component_log
;;
(*)
_files
;;
Expand Down Expand Up @@ -2583,6 +2601,7 @@ _nvme () {
tcg-configuration-log':tcg configuration log'
get-error-injection':get error injection'
set-error-injection':set error injection'
hardware-component-log':retrieve hardware component log'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp options" _ocp
Expand Down
7 changes: 6 additions & 1 deletion completions/bash-nvme-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,10 @@ plugin_ocp_opts () {
opts+=" --data= -d --number= -n --no-uuid -N --type= -t \
--nrtdp= -r --verbose -v --output-format -o --timeout="
;;
"hardware-component-log")
opts+=" --comp-id= -i --list -l --verbose -v \
--output-format -o --timeout= -t"
;;
"help")
opts+=$NO_OPTS
;;
Expand Down Expand Up @@ -1602,7 +1606,8 @@ _nvme_subcmds () {
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 \
get-error-injection set-error-injection"
get-error-injection set-error-injection \
hardware-component-log"
)

# Associative array mapping plugins to corresponding option completions
Expand Down

0 comments on commit 0c792f0

Please sign in to comment.