#! /pkg/bin/ksh
# ---------------------------------------------------------------------
# l2vpn_show_tech_evpn - EVPN showtech script
#
# February 2017, Mark Sains
#
# Copyright (c) 2017-2020 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 location $location'
rp__ksh[1]='evpn_show -p -U $fq_nodeid 0x7'
rp_exec[2]='show evpn evi no-statistics private location $location'
rp__ksh[2]='evpn_show -n -p -U $fq_nodeid 0x5'
rp_exec[3]='show evpn evi mac no-statistics private location $location'
rp__ksh[3]='evpn_show -p -n -U $fq_nodeid 0x0'
rp_exec[4]='show evpn evi inclusive-multicast no-statistics private location $location'
rp__ksh[4]='evpn_show -p -n -U $fq_nodeid 0x1'
rp_exec[5]='show evpn rd private location $location'
rp__ksh[5]='evpn_show -p -U $fq_nodeid 0x4'
rp_exec[6]='show evpn internal-label private location $location'
rp__ksh[6]='evpn_show -p -U $fq_nodeid 0x2'
rp_exec[7]='show evpn ethernet-segment carving detail private location $location'
rp__ksh[7]='evpn_show -d -p -c -U $fq_nodeid 0x3'
rp_exec[8]='show evpn database remote-shg private location $location'
rp__ksh[8]='evpn_show -p -U $fq_nodeid 0xc'
rp_exec[9]='show evpn evi ead no-statistics private location $location'
rp__ksh[9]='evpn_show -p -n -U $fq_nodeid 0x9'
rp_exec[10]='show evpn tep private location $location'
rp__ksh[10]='evpn_show -p -U $fq_nodeid 0x10'
rp_exec[11]='show evpn igmp private location $location'
rp__ksh[11]='evpn_show -p -U $fq_nodeid 0xd'
rp_exec[12]='show evpn evi neighbor etree private location $location'
rp__ksh[12]='evpn_show -p -t -U $fq_nodeid 0x8'
rp_exec[13]='show evpn internal-label path-list private location $location'
rp__ksh[13]='evpn_show -p -U $fq_nodeid 0xb'
rp_exec[14]='show evpn client private location $location'
rp__ksh[14]='evpn_show -p -U $fq_nodeid 0xe'
rp_exec[15]='show evpn group private location $location'
rp__ksh[15]='evpn_show -p -U $fq_nodeid 0xf'
rp_exec[16]='show evpn internal-id private location $location'
rp__ksh[16]='evpn_show -p -U $fq_nodeid 0x11'
rp_exec[17]='show evpn segment-routing srv6 private location $location'
rp__ksh[17]='evpn_show -p -U $fq_nodeid 0x12'
rp_exec[18]=''
rp__ksh[18]=''

# 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
