'version:show the program version'
'ocp:OCP cloud SSD extensions'
'solidigm:Solidigm plug-in extensions'
+ 'fdp:FDP plug-in extensions'
'micron:Micron plug-in extensions'
'dapustor:DapuStor plug-in extensions'
'help:print brief descriptions of all nvme commands'
;;
esac
;;
+ (fdp)
+ case ${words[2]} in
+ (feature)
+ local _feature
+ _feature=(
+ --endgrp-id=':Endurance group ID'
+ -e':alias for --endgrp-id'
+ --enable-conf-idx=':FDP configuration index to enable'
+ -c':alias for --enable-conf-idx'
+ --disable=':Disable current FDP configuration'
+ -d':alias for --disable'
+ --verbose=':Increase output verbosity'
+ -v':alias for --verbose'
+ )
+ _arguments '*:: :->subcmds'
+ _describe -t commands "nvme fdp feature options" _feature
+ ;;
+ (*)
+ _files
+ ;;
+ esac
+ ;;
(dapustor)
case ${words[2]} in
(smart-log-add)
-v':alias for --verbose'
--output-format=':Output format: normal|json|binary'
-o ':alias for --output-format'
+ )
+ _arguments '*:: :->subcmds'
_describe -t commands "nvme rotational-media-info-log" _rmi_log
+ ;;
(changed-alloc-ns-list-log)
local _changed_alloc_ns_list_log
_changed_alloc_ns_list_log=(
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm options" _solidigm
;;
+ (fdp)
+ local _fdp
+ _fdp=(
+ feature':Show, enable or disable FDP configuration'
+ version':Shows the plug-in version'
+ help':Display this help'
+ )
+ _arguments '*:: :->subcmds'
+ _describe -t commands "nvme fdp options" _fdp
+ ;;
(micron)
local micron
_micron=(
subsystem-reset ns-rescan get-lba-status dsm discover connect-all connect
dim disconnect disconnect-all gen-hostnqn show-hostnqn tls-key dir-receive
dir-send virt-mgmt rpmb version ocp solidigm dapustor mgmt-addr-list-log
- rotational-media-info-log changed-alloc-ns-list-log
+ rotational-media-info-log changed-alloc-ns-list-log fdp
)
_arguments '*:: :->subcmds'
_describe -t commands "help: infos on a specific nvme command, or provide no option to see a synopsis of all nvme commands" _h
return 0
}
+plugin_fdp_opts () {
+ local opts=""
+ local compargs=""
+
+ local nonopt_args=0
+ for (( i=0; i < ${#words[@]}-1; i++ )); do
+ if [[ ${words[i]} != -* ]]; then
+ let nonopt_args+=1
+ fi
+ done
+
+ if [ $nonopt_args -eq 3 ]; then
+ opts="/dev/nvme* "
+ fi
+
+ opts+=" "
+
+ case "$1" in
+ "feature")
+ opts+=" --endgrp-id= -e --enable-conf-idx= -c \
+ --disable -d --verbose -v"
+ ;;
+ "version")
+ opts+=$NO_OPTS
+ ;;
+ "help")
+ opts+=$NO_OPTS
+ ;;
+ esac
+
+ COMPREPLY+=( $( compgen $compargs -W "$opts" -- $cur ) )
+
+ return 0
+}
+
plugin_transcend_opts () {
local opts=""
local compargs=""
clear-fw-activate-history vs-fw-activate-history log-page-directory \
vs-drive-info cloud-SSDplugin-version market-log \
smart-log-add temp-stats workload-tracker version help"
+ [fdp]="feature version help"
[transcend]="healthvalue badblock"
[dapustor]="smart-log-add"
[zns]="id-ctrl id-ns zone-mgmt-recv \
[dera]="plugin_dera_opts"
[sfx]="plugin_sfx_opts"
[solidigm]="plugin_solidigm_opts"
+ [fdp]="plugin_fdp_opts"
[transcend]="plugin_transcend_opts"
[dapustor]="plugin_dapustor_opts"
[zns]="plugin_zns_opts"