| @@ 10-26 (lines=17) @@ | ||
| 7 | from tests.test_struct import TestMsgDumpFile |
|
| 8 | ||
| 9 | ||
| 10 | class TestAggregateStatsRequest(TestMsgDumpFile): |
|
| 11 | """Test class for TestAggregateStatsRequest.""" |
|
| 12 | ||
| 13 | dumpfile = 'v0x01/ofpt_aggregate_request.dat' |
|
| 14 | ||
| 15 | match = Match(in_port=80, dl_src="01:02:03:04:05:06", |
|
| 16 | dl_dst="01:02:03:04:05:06", dl_vlan=1, |
|
| 17 | dl_vlan_pcp=1, dl_type=1, |
|
| 18 | nw_tos=1, nw_proto=1, |
|
| 19 | nw_src='192.168.0.1', nw_dst='192.168.0.1', |
|
| 20 | tp_src=80, tp_dst=80) |
|
| 21 | request = AggregateStatsRequest(table_id=1, out_port=Port.OFPP_NONE, |
|
| 22 | match=match) |
|
| 23 | obj = StatsRequest(xid=17, |
|
| 24 | body_type=StatsTypes.OFPST_AGGREGATE, |
|
| 25 | flags=0, body=request) |
|
| 26 | min_size = 12 |
|
| 27 | ||
| @@ 8-24 (lines=17) @@ | ||
| 5 | from tests.test_struct import TestMsgDumpFile |
|
| 6 | ||
| 7 | ||
| 8 | class TestFlowStatsRequest(TestMsgDumpFile): |
|
| 9 | """Test class for TestFlowStatsRequest.""" |
|
| 10 | ||
| 11 | dumpfile = 'v0x01/ofpt_flow_stats_request.dat' |
|
| 12 | ||
| 13 | match = Match(in_port=80, dl_src='01:02:03:04:05:06', |
|
| 14 | dl_dst='01:02:03:04:05:06', dl_vlan=1, |
|
| 15 | dl_vlan_pcp=1, dl_type=1, |
|
| 16 | nw_tos=1, nw_proto=1, |
|
| 17 | nw_src='192.168.0.1', nw_dst='192.168.0.1', |
|
| 18 | tp_src=80, tp_dst=80) |
|
| 19 | flow_sr = FlowStatsRequest(match=match, table_id=1, out_port=80) |
|
| 20 | obj = StatsRequest(xid=12, |
|
| 21 | body_type=StatsTypes.OFPST_FLOW, |
|
| 22 | flags=0, body=flow_sr) |
|
| 23 | ||
| 24 | min_size = 12 |
|
| 25 | ||