def test_validate_2switch_2host_l2(topology):

    ops1 = topology.get("ops1")
    ops2 = topology.get("ops2")
    hs1 = topology.get("hs1")
    hs2 = topology.get("hs2")
    topology_2switch_2host(ops1, ops2, hs1, hs2)
    config_2switch_l2(ops1, ops2, vlan_id_s1, vlan_id_s2)
    config_hosts_l2(hs1, hs2, ip_hs1_bitlength, ip_hs2_bitlength)
    for portlbl in ["1", "6"]:
        wait_until_interface_up(ops1, portlbl)
    for portlbl in ["1", "6"]:
        wait_until_interface_up(ops2, portlbl)
    ping_test(hs1, ip_hs2)
    ops1("show run")
    ops2("show run")
示例#2
0
def test_validate_2switch_2host_l2(topology):

    ops1 = topology.get('ops1')
    ops2 = topology.get('ops2')
    hs1 = topology.get('hs1')
    hs2 = topology.get('hs2')
    topology_2switch_2host(ops1, ops2, hs1, hs2)
    config_2switch_l2(ops1, ops2, vlan_id_s1, vlan_id_s2)
    config_hosts_l2(hs1, hs2, ip_hs1_bitlength, ip_hs2_bitlength)
    for portlbl in ['1', '6']:
        wait_until_interface_up(ops1, portlbl)
    for portlbl in ['1', '6']:
        wait_until_interface_up(ops2, portlbl)
    ping_test(hs1, ip_hs2)
    ops1('show run')
    ops2('show run')
def test_validate_2switch_2host_l3(topology):

    ops1 = topology.get('ops1')
    ops2 = topology.get('ops2')
    hs1 = topology.get('hs1')
    hs2 = topology.get('hs2')
    topology_2switch_2host(ops1, ops2, hs1, hs2)
    config_switches_l3(ops1, ops2, ip_ops1_int1, ip_ops2_int1, ip_ops1_int6,
                       ip_ops2_int6, ip_route_ops1, ip_route_ops2)
    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)
    for portlbl in ['1', '6']:
        wait_until_interface_up(ops2, portlbl)

    ping_test(hs1, ip_only_hs2)
    ops1('show run')
    ops2('show run')
def test_validate_2switch_2host_l3(topology):

    ops1 = topology.get('ops1')
    ops2 = topology.get('ops2')
    hs1 = topology.get('hs1')
    hs2 = topology.get('hs2')
    topology_2switch_2host(ops1, ops2, hs1, hs2)
    config_switches_l3(
                ops1, ops2, ip_ops1_int1, ip_ops2_int1, ip_ops1_int6,
                ip_ops2_int6, ip_route_ops1, ip_route_ops2
                )
    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)
    for portlbl in ['1', '6']:
        wait_until_interface_up(ops2, portlbl)

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