#! /pkg/bin/ksh
# ---------------------------------------------------------------------
# l2vpn_show_tech_l2rib - L2RIB showtech script
#
# July 2017
#
# Copyright (c) 2017 by cisco Systems, Inc.
# All rights reserved.
#----------------------------------------------------------------------

. /pkg/bin/show_tech_main_fragment


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


rp_exec[1]='show process l2rib location $ext_node_name'
rp__ksh[1]='sysmgr_show -o -p l2rib -n $ext_node_name'
rp_exec[2]='show process l2rib txgroup peer all detail location $ext_node_name'
rp__ksh[2]='txlib_show -N $fq_nodeid -E l2rib -P -d -a'
rp_exec[3]='show l2route summary'
rp__ksh[3]='l2rib_show 0x4'
rp_exec[4]='show l2route evpn mac all detail'
rp__ksh[4]='l2rib_show -A -d 0x6'
rp_exec[5]='show l2route evpn mac-ip all detail'
rp__ksh[5]='l2rib_show -A -d 0xb'
rp_exec[6]=''
rp__ksh[6]=''


# A function called display() must be provided that calls the functions to 
# run the required show commands. The display() function is called in 
# /pkg/bin/show_tech_comp_file_frag
display() {
    case "$__cardtype" in
    "RP")
        exec_commands rp
        ;;
    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

