#!/pkg/bin/ksh
# ---------------------------------------------------------------------
# show_rgmgr_tech_script - Redundancy Group Manager show tech-support script
#
# December 2008,  Art Bray
#
# Copyright (c) 2008-2009, 2013, 2017, 2019 by cisco Systems, Inc.
# All rights reserved.
#--------------------------------------------------------------------


# This script fragment contains the code for the following functions
# - print_main_heading
# - print_command_heading
# - run_single_command
# - run_commands
# - run_single_command_on_all_nodes
# - run_commands_on_all_nodes
# - default_parser_function
. /pkg/bin/show_tech_main_fragment

sys_show_exec[1]='show install which comp rgmgr'
sys_show__ksh[1]='instcmd show install which component rgmgr detail'
sys_show_exec[2]='show redundancy-group trace'
sys_show__ksh[2]='rgmgr_show_ltrace'
sys_show_exec[3]='show redundancy-group multi-router aps all'
sys_show__ksh[3]='rgmgr_show -A'
sys_show_exec[4]='show rib clients'
sys_show__ksh[4]='show_ipv4_rib -X 0x1 -r 0x0'
sys_show_exec[5]='show rib opaque ipfrr'
sys_show__ksh[5]='show_ipv4_rib -X 0x1 -Y 0x1 -Z ________ -V ________ -J 0x0'
sys_show_exec[6]='show iccp trace'
sys_show__ksh[6]='iccp_show_trace'

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

display() {
    print_main_heading "show tech-Support Redundancy Group Manager"

    case "$__cardtype" in
    "SYS")
        exec_commands sys_show
        ;;

    *)
        # Do nothing
        ;;
    esac

    print_main_heading "show tech-Support Redundancy Group Manager complete"
}


# 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
