def test_validate_2switch_2host_lag_l3(topology):

    ops1 = topology.get('ops1')
    ops2 = topology.get('ops2')
    hs1 = topology.get('hs1')
    hs2 = topology.get('hs2')
    topology_2switch_2host_lag(ops1, ops2, hs1, hs2)
    config_switches_l3_lag(
                ops1, ops2, ip_ops1_int1, ip_ops2_int2, ip_ops1_lag,
                ip_ops2_lag, ip_route_ops1, ip_route_ops2, lag_id_s1,
                lag_id_s2
                )
    config_hosts_l3(
                hs1, hs2, ip_hs1, ip_hs2,
                hs1_ip_route, hs2_ip_route
                )
    # Wait until interfaces are up
    for switch, portlbl in [(ops1, '1'), (ops1, '5'), (ops1, '6')]:
        wait_until_interface_up(switch, portlbl)
    for switch, portlbl in [(ops2, '1'), (ops2, '5'), (ops2, '6')]:
        wait_until_interface_up(switch, portlbl)

    ping_test(hs1, ip_only_hs2)
    ops1('show run')
    ops2('show run')
示例#2
0
def test_validate_1switch_2host_l3(topology):

    ops1 = topology.get('ops1')
    hs1 = topology.get('hs1')
    hs2 = topology.get('hs2')
    topology_1switch_2host(ops1, hs1, hs2)
    config_switch_l3(ops1, ip_ops1_int1, ip_ops1_int2)
    ops1('show run')
    config_hosts_l3(hs1, hs2, ip_hs1, ip_hs2, hs1_ip_route, hs2_ip_route)
    for portlbl in ['1', '6']:
        wait_until_interface_up(ops1, portlbl)
    ping_test(hs1, ip_only_hs2)
    ops1('show run')
def test_validate_1switch_2host_l3(topology):

    ops1 = topology.get('ops1')
    hs1 = topology.get('hs1')
    hs2 = topology.get('hs2')
    topology_1switch_2host(ops1, hs1, hs2)
    config_switch_l3(ops1, ip_ops1_int1, ip_ops1_int2)
    ops1('show run')
    config_hosts_l3(
                hs1, hs2, ip_hs1, ip_hs2,
                hs1_ip_route, hs2_ip_route
                )
    for portlbl in ['1', '6']:
        wait_until_interface_up(ops1, portlbl)
    ping_test(hs1, ip_only_hs2)
    ops1('show run')
def test_validate_2switch_2host_lag_l3(topology):

    ops1 = topology.get('ops1')
    ops2 = topology.get('ops2')
    hs1 = topology.get('hs1')
    hs2 = topology.get('hs2')
    topology_2switch_2host_lag(ops1, ops2, hs1, hs2)
    config_switches_l3_lag(ops1, ops2, ip_ops1_int1, ip_ops2_int2, ip_ops1_lag,
                           ip_ops2_lag, ip_route_ops1, ip_route_ops2,
                           lag_id_s1, lag_id_s2)
    config_hosts_l3(hs1, hs2, ip_hs1, ip_hs2, hs1_ip_route, hs2_ip_route)
    # Wait until interfaces are up
    for switch, portlbl in [(ops1, '1'), (ops1, '5'), (ops1, '6')]:
        wait_until_interface_up(switch, portlbl)
    for switch, portlbl in [(ops2, '1'), (ops2, '5'), (ops2, '6')]:
        wait_until_interface_up(switch, portlbl)

    ping_test(hs1, ip_only_hs2)
    ops1('show run')
    ops2('show run')