Esempio n. 1
0
def bgp_rr_traffic_pre_config():
    global topo
    st.banner("BGP RR WITH TRAFFIC CLASS CONFIG - START")

    # underlay config - configure physical interfaces
    bgplib.l3tc_underlay_config_unconfig(config='yes')

    # config ip on underlay interface
    bgplib.l3tc_vrfipv4v6_address_leafspine_config_unconfig(config='yes',
                                                            config_type='all')

    # Ping Verification
    if not bgplib.l3tc_vrfipv4v6_address_leafspine_ping_test(config_type='all',
                                                             ping_count=3):
        st.error("Ping failed in between Spine - Leaf")
        st.report_fail('test_case_failed')

    bgplib.l3tc_vrfipv4v6_address_leafspine_rr_tg_bgp_config(config='yes',
                                                             rr_enable='true')
    bgplib.l3tc_vrfipv4v6_address_leafspine_bgp_config(config='yes',
                                                       rr_enable='true')
    # BGP Neighbor Verification
    if not poll_wait(bgplib.l3tc_vrfipv4v6_address_leafspine_bgp_check,
                     10,
                     config_type='all'):
        st.error("Neighbour is failed to Establish between Spine - Leaf")
        st.report_fail('test_case_failed')

    st.log(
        "Getting all topology info related to connectivity / TG and other parameters between duts"
    )
    topo = bgplib.get_leaf_spine_topology_info()
    st.banner("BGP RR WITH TRAFFIC CLASS CONFIG - END")
Esempio n. 2
0
def bgp_rr_traffic_pre_config_cleanup():
    st.banner("BGP RR WITH TRAFFIC CLASS CONFIG CLEANUP - START")
    bgplib.l3tc_vrfipv4v6_address_leafspine_bgp_config(config='no',
                                                       rr_enable='true')
    bgplib.l3tc_vrfipv4v6_address_leafspine_config_unconfig(config='no')
    bgpapi.cleanup_router_bgp(st.get_dut_names())
    ipapi.clear_ip_configuration(st.get_dut_names(), family='all', thread=True)
    bgplib.l3tc_underlay_config_unconfig(config='no')
    bgplib.l3tc_vrfipv4v6_address_leafspine_rr_tg_bgp_config(config='no',
                                                             rr_enable='true')
    st.banner("BGP RR WITH TRAFFIC CLASS CONFIG CLEANUP - END")