test 1.28 KB
Newer Older
1 2 3
tb_prerun("tbprerun",0);
# Check DB state.
@result = (
4
["lan2","25.00","100000","0.000","node3:1"],
5
["lan2","25.00","100000","0.000","node4:0"],
6 7 8 9 10
["lan3","50.00","100000","0.000","node1:0"],
["lan3","50.00","100000","0.000","node2:0"],
["lan3","50.00","100000","0.000","node3:0"],
["link1","0.00","100000","0.000","node4:1"],
["link1","0.00","100000","0.000","node5:0"],
11 12 13 14 15 16
["link2","0.00","100000","0.025","node4:2"],
["link2","0.00","100000","0.025","node5:1"],
["link3","0.00","100000","0.000","node5:2"],
["link3","0.00","100000","0.000","node6:0"],
["link4","500.00","45000","0.000","node1:1"],
["link4","500.00","45000","0.000","node6:1"],
17
);
18

19
tb_compare("SELECT vname,delay,bandwidth,lossrate,member from virt_lans" .
Robert Ricci's avatar
Robert Ricci committed
20
    " where pid=\"testbed\" and eid=\"test\" " .
21
    "order by vname,member",
22 23
    \@result);
@result = (
24 25 26 27 28 29
["0:10.1.5.2 1:10.1.4.3","node1","pc"],
["0:10.1.5.3","node2","pc"],
["0:10.1.5.4 1:10.1.3.3","node3","pc"],
["0:10.1.3.2 1:10.1.6.2 2:10.1.1.2","node4","pc"],
["0:10.1.6.3 1:10.1.1.3 2:10.1.2.3","node5","pc"],
["0:10.1.2.2 1:10.1.4.2","node6","pc"],
30 31 32 33
);
tb_compare("SELECT ips,vname,type from virt_nodes" .
    " where pid=\"testbed\" and eid=\"test\"",
    \@result);
34 35 36 37
tb_run("tbswap in",0);
tb_run("tbswap out",0);
tb_run("tbswap in",0);
tb_run("tbswap out",0);
38
tb_run("tbend",0);