|
49 | 49 | ip2 = IPAddr('10.0.0.2')
|
50 | 50 | ip3 = IPAddr('10.0.0.3')
|
51 | 51 |
|
52 |
| -fwding_single_3 = ( (match(dstip=ip1) >> fwd(1)) + |
53 |
| - (match(dstip=ip2) >> fwd(2)) + |
54 |
| - (match(dstip=ip3) >> fwd(3)) ) |
55 |
| -fwding_cycle_3_3 = ( (match(dstip=ip1) >> match(switch=1) >> fwd(3)) + |
56 |
| - (match(dstip=ip1) >> match(switch=2) >> fwd(1)) + |
57 |
| - (match(dstip=ip1) >> match(switch=3) >> fwd(2)) + |
58 |
| - (match(dstip=ip2) >> match(switch=1) >> fwd(1)) + |
59 |
| - (match(dstip=ip2) >> match(switch=2) >> fwd(3)) + |
60 |
| - (match(dstip=ip2) >> match(switch=3) >> fwd(2)) + |
61 |
| - (match(dstip=ip3) >> match(switch=1) >> fwd(2)) + |
62 |
| - (match(dstip=ip3) >> match(switch=2) >> fwd(1)) + |
63 |
| - (match(dstip=ip3) >> match(switch=3) >> fwd(3)) ) |
64 |
| - |
65 |
| -def static_fwding_single(): |
66 |
| - return fwding_single_3 |
67 |
| - |
68 |
| -def static_fwding_cycle(): |
69 |
| - return fwding_cycle_3_3 |
| 52 | +def static_fwding_single_3(): |
| 53 | + return ( (match(dstip=ip1) >> fwd(1)) + |
| 54 | + (match(dstip=ip2) >> fwd(2)) + |
| 55 | + (match(dstip=ip3) >> fwd(3)) ) |
| 56 | + |
| 57 | +def static_fwding_cycle_3_3(): |
| 58 | + return ( (match(dstip=ip1) >> match(switch=1) >> fwd(3)) + |
| 59 | + (match(dstip=ip1) >> match(switch=2) >> fwd(1)) + |
| 60 | + (match(dstip=ip1) >> match(switch=3) >> fwd(2)) + |
| 61 | + (match(dstip=ip2) >> match(switch=1) >> fwd(1)) + |
| 62 | + (match(dstip=ip2) >> match(switch=2) >> fwd(3)) + |
| 63 | + (match(dstip=ip2) >> match(switch=3) >> fwd(2)) + |
| 64 | + (match(dstip=ip3) >> match(switch=1) >> fwd(2)) + |
| 65 | + (match(dstip=ip3) >> match(switch=2) >> fwd(1)) + |
| 66 | + (match(dstip=ip3) >> match(switch=3) >> fwd(3)) ) |
70 | 67 |
|
71 | 68 | class QueryTest(CountBucket):
|
72 | 69 |
|
|
0 commit comments