#! /pkg/bin/ksh
# ---------------------------------------------------------------------
# l2vpn_show_tech_pwhe - PWHE l2vpn showtech script
#
# February 2017, Mark Sains
#
# Copyright (c) 2017-2018 by cisco Systems, Inc.
# All rights reserved.
#----------------------------------------------------------------------


. /pkg/bin/show_tech_main_fragment

# Password flag to indicate whether log will include pw or not


# Parse the arguments to the script.
default_parser_function "$@"


sys_exec[1]='show l2vpn ma pwhe trace'
sys__ksh[1]='vif_ma_show_ltrace pwhe-ma'
sys_exec[2]='show l2vpn ma pwhe private'
sys__ksh[2]='show_pwhe_ma -p 0x1'
sys_exec[3]='show l2vpn ma pwhe peer private'
sys__ksh[3]='show_pwhe_ma -p 0x4'
sys_exec[4]='show proc pwhe_ma txgroup peer all detail'
sys__ksh[4]='txlib_show -E pwhe_ma -P -d -a '
sys_exec[5]='show l2vpn ma pwhe api-statistics all detail'
sys__ksh[5]='pwhe_ma_api_stats_cmd all -d'
sys_exec[6]='show proc pwhe_ma'
sys__ksh[6]='sysmgr_show -o -p pwhe_ma'
sys_exec[7]='show system statistics component ma'
sys__ksh[7]='ship_show -c ma'
sys_exec[8]='show system statistics component ma errors'
sys__ksh[8]='ship_show -c ma -e'
sys_exec[9]=''
sys__ksh[9]=''


lc_exec[1]='show l2vpn ea pwhe trace location $location'
lc__ksh[1]='pwhe_ea_show_ltrace -i $fq_nodeid pwhe_ea'
lc_exec[2]='show l2vpn ea pwhe idb private location $location'
lc__ksh[2]='pwhe_ea_show -n $fq_nodeid -p'
lc_exec[3]=''
lc__ksh[3]=''
 

display() {
    case "$__cardtype" in
    "SYS")
        exec_commands sys
        ;;

    "LC")
        exec_commands lc
        ;;
    esac
}

# This function calls the display() function and sends the output to file if
# the file option has been set. 
. /pkg/bin/show_tech_file_fragment

