#! /pkg/bin/ksh
# ----------------------------------------------------------------------
# show_tech_dpa_util -- DPA show tech-support script utilities
#
# June 2015, Andy Karch
#
# Copyright (c) 2015, 2018-2019, 2022-2023 by cisco Systems, Inc.
# All rights reserved.
#-----------------------------------------------------------------------
. /pkg/bin/show_tech_main_fragment
display_dpa_lc() {
    cmd_index=1
    if [[  "$__showtech_component" !=  "custom" &&
           "$__showtech_component" !=  "custom-traffic" ]]; then
       dpa_lc_exec[$cmd_index]='OFA SHOW LTRACE'
       dpa_lc__ksh[$cmd_index]='ofa_show_ltrace'
       ((cmd_index++))
    fi

    dpa_lc_exec[$cmd_index]='show controller fia trace all location $location'
    dpa_lc__ksh[$cmd_index]='fia_show_ltrace -A 0x270f -l $fq_nodeid'
    ((cmd_index++))

    dpa_lc_exec[$cmd_index]='show ofa resources all location $location'
    dpa_lc__ksh[$cmd_index]='ofa_sysdb_show_resources -r -t 0x270f -l $fq_nodeid'
    ((cmd_index++))

    dpa_lc_exec[$cmd_index]='show ofa statistics all location $location'
    dpa_lc__ksh[$cmd_index]='ofa_sysdb_show_resources -s -t 0x270f -l $fq_nodeid'
    ((cmd_index++))

    # reserved for GRID/LRID
    dpa_lc_exec[$cmd_index]=''
    dpa_lc__ksh[$cmd_index]=''

    dpa_lc_exec[6]='show controllers fia-cfg trace all location'
    dpa_lc__ksh[6]='fia_cfg_show_ctrace -a'

    exec_commands dpa_lc
}
