Exemple #1
0
def compare_show_ip_route_vrf(rname, expected):
    """
    Calls 'show ip ospf vrf [rname]-cust1 route' for router `rname` and compare the obtained
    result with the expected output.
    """
    tgen = get_topogen()
    vrf_name = "{0}-cust1".format(rname)
    current = topotest.ip4_route_zebra(tgen.gears[rname], vrf_name)
    ret = topotest.difflines(
        current, expected, title1="Current output", title2="Expected output"
    )
    return ret
Exemple #2
0
def compare_show_ip_route_vrf(rname, expected, vrf_name):
    """
    Calls 'show ip route vrf [vrf_name] route' and compare the obtained
    result with the expected output.
    """
    tgen = get_topogen()
    current = topotest.ip4_route_zebra(tgen.gears[rname], vrf_name)
    ret = topotest.difflines(current,
                             expected,
                             title1="Current output",
                             title2="Expected output")
    return ret
Exemple #3
0
def compare_show_ip_route_vrf(rname, expected):
    """
    Calls 'show ip ospf vrf [rname]-cust1 route' for router `rname` and compare the obtained
    result with the expected output.
    """
    tgen = get_topogen()
    vrf_name = '{0}-cust1'.format(rname)
    current = topotest.ip4_route_zebra(tgen.gears[rname], vrf_name)
    ret = topotest.difflines(current, expected,
                             title1="Current output",
                             title2="Expected output")
    return ret