#! /pkg/bin/ksh
# ---------------------------------------------------------------------
# l2vpn_show_tech_evpn - EVPN showtech script
#
# February 2017, Mark Sains
#
# Copyright (c) 2017-2018 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 evpn summary private'
rp__ksh[1]='evpn_show -p 0x7'
rp_exec[2]='show evpn evi no-statistics private'
rp__ksh[2]='evpn_show -n -p 0x5'
rp_exec[3]='show evpn evi mac private'
rp__ksh[3]='evpn_show -p 0x0'
rp_exec[4]='show evpn evi inclusive-multicast private'
rp__ksh[4]='evpn_show -p 0x1'
rp_exec[5]='show evpn rd private'
rp__ksh[5]='evpn_show -p 0x4'
rp_exec[6]='show evpn internal-label private'
rp__ksh[6]='evpn_show -p 0x2'
rp_exec[7]='show evpn ethernet-segment private'
rp__ksh[7]='evpn_show -p 0x3'
rp_exec[8]='show evpn database remote-shg private'
rp__ksh[8]='evpn_show -p 0xc'
rp_exec[9]='show evpn evi ead private'
rp__ksh[9]='evpn_show -p 0x9'
rp_exec[10]='show evpn tep private'
rp__ksh[10]='evpn_show -p 0x10'
rp_exec[11]=''
rp__ksh[11]=''


# 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

