diff options
author | Yuichi Ito <ito.yuichi0@gmail.com> | 2014-06-23 14:47:37 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-06-23 17:10:25 +0900 |
commit | 44a8c69350a90ac4d151ccb390c2f8b9beaf2881 (patch) | |
tree | e8e7280f73b72e35f6add87bdf2e6275f4a62acf | |
parent | dd960c9c18d64e6b3f6581444cf09574493479e8 (diff) |
sw test tool: Add default test files (of14: group:all/select)
These test files aim to examine 'group action' of FlowMod message.
This patch only copies ryu/tests/switch/of13/group.
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/tests/switch/of14/group/00_ALL.json | 332 | ||||
-rw-r--r-- | ryu/tests/switch/of14/group/01_SELECT_Ether.json | 341 | ||||
-rw-r--r-- | ryu/tests/switch/of14/group/01_SELECT_IP.json | 341 | ||||
-rw-r--r-- | ryu/tests/switch/of14/group/01_SELECT_Weight_Ether.json | 341 | ||||
-rw-r--r-- | ryu/tests/switch/of14/group/01_SELECT_Weight_IP.json | 341 |
5 files changed, 1696 insertions, 0 deletions
diff --git a/ryu/tests/switch/of14/group/00_ALL.json b/ryu/tests/switch/of14/group/00_ALL.json new file mode 100644 index 00000000..fd4d802d --- /dev/null +++ b/ryu/tests/switch/of14/group/00_ALL.json @@ -0,0 +1,332 @@ +[ + "group: 00_ALL", + { + "description":"2Mbps(ethernet/ipv4/tcp)-->'in_port=1,actions=group:all(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "buckets":[ + { + "OFPBucket":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(proto=6)", + "tcp()", + "str('\\x11' * (1500 - 54))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":2000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":2000 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet/ipv6/tcp)-->'in_port=1,actions=group:all(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "buckets":[ + { + "OFPBucket":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(nxt=6)", + "tcp()", + "str('\\x11' * (1500 - 74))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":2000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":2000 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet/arp)-->'in_port=1,actions=group:all(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "buckets":[ + { + "OFPBucket":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')", + "str('\\x11' * (1500 - 42))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":2000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":2000 + } + ] + } + } + ] + } +] diff --git a/ryu/tests/switch/of14/group/01_SELECT_Ether.json b/ryu/tests/switch/of14/group/01_SELECT_Ether.json new file mode 100644 index 00000000..e9b4fb00 --- /dev/null +++ b/ryu/tests/switch/of14/group/01_SELECT_Ether.json @@ -0,0 +1,341 @@ +[ + "group: 01_SELECT_Ether", + { + "description":"2Mbps(ethernet(dst=random,src=random)/ipv4/tcp)-->'in_port=1,actions=group:select(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), src=netaddr.EUI(randint(0, 2 ** 48 - 1) & 0xfeffffffffff), ethertype=2048)", + "ipv4(proto=6)", + "tcp()", + "str('\\x11' * (1500 - 54))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":1000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1000 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet(dst=random,src=random)/ipv6/tcp)-->'in_port=1,actions=group:select(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), src=netaddr.EUI(randint(0, 2 ** 48 - 1) & 0xfeffffffffff), ethertype=34525)", + "ipv6(nxt=6)", + "tcp()", + "str('\\x11' * (1500 - 74))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":1000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1000 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet(dst=random,src=random)/arp)-->'in_port=1,actions=group:select(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), src=netaddr.EUI(randint(0, 2 ** 48 - 1) & 0xfeffffffffff), ethertype=2054)", + "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')", + "str('\\x11' * (1500 - 42))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":1000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1000 + } + ] + } + } + ] + } +] diff --git a/ryu/tests/switch/of14/group/01_SELECT_IP.json b/ryu/tests/switch/of14/group/01_SELECT_IP.json new file mode 100644 index 00000000..73b966ec --- /dev/null +++ b/ryu/tests/switch/of14/group/01_SELECT_IP.json @@ -0,0 +1,341 @@ +[ + "group: 01_SELECT_IP", + { + "description":"2Mbps(ethernet/ipv4(src=random,dst=random)/tcp(src_port=random,dst_port=random))-->'in_port=1,actions=group:select(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(proto=6, dst=netaddr.IPAddress(randint(0, 2 ** 32 - 1)), src=netaddr.IPAddress(randint(0, 2 ** 32 - 1)))", + "tcp(dst_port=randint(0, 2 ** 16 - 1), src_port=randint(0, 2 ** 16 - 1))", + "str('\\x11' * (1500 - 54))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":1000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1000 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet/ipv6(src=random,dst=random)/tcp(src_port=random,dst_port=random))-->'in_port=1,actions=group:select(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(nxt=6, dst=netaddr.IPAddress(randint(0, 2 ** 128 - 1)), src=netaddr.IPAddress(randint(0, 2 ** 128 - 1)))", + "tcp(dst_port=randint(0, 2 ** 16 - 1), src_port=randint(0, 2 ** 16 - 1))", + "str('\\x11' * (1500 - 74))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":1000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1000 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet/arp(src_ip=random,dst_ip=random)-->'in_port=1,actions=group:select(actions=output:2/actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11', dst_ip=netaddr.IPAddress(randint(0, 2 ** 32 - 1)), src_ip=netaddr.IPAddress(randint(0, 2 ** 32 - 1)))", + "str('\\x11' * (1500 - 42))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":1000 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1000 + } + ] + } + } + ] + } +] diff --git a/ryu/tests/switch/of14/group/01_SELECT_Weight_Ether.json b/ryu/tests/switch/of14/group/01_SELECT_Weight_Ether.json new file mode 100644 index 00000000..b033ab94 --- /dev/null +++ b/ryu/tests/switch/of14/group/01_SELECT_Weight_Ether.json @@ -0,0 +1,341 @@ +[ + "group: 01_SELECT_Weight_Ether", + { + "description":"2Mbps(ethernet(dst=random,src=random)/ipv4/tcp)-->'in_port=1,actions=group:select(weight=1,actions=output:2/weight=2,actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":2, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), src=netaddr.EUI(randint(0, 2 ** 48 - 1) & 0xfeffffffffff), ethertype=2048)", + "ipv4(proto=6)", + "tcp()", + "str('\\x11' * (1500 - 54))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":667 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1333 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet(dst=random,src=random)/ipv6/tcp)-->'in_port=1,actions=group:select(weight=1,actions=output:2/weight=2,actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":2, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), src=netaddr.EUI(randint(0, 2 ** 48 - 1) & 0xfeffffffffff), ethertype=34525)", + "ipv6(nxt=6)", + "tcp()", + "str('\\x11' * (1500 - 74))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":667 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1333 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet(dst=random,src=random)/arp)-->'in_port=1,actions=group:select(weight=1,actions=output:2/weight=2,actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":2, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), src=netaddr.EUI(randint(0, 2 ** 48 - 1) & 0xfeffffffffff), ethertype=2054)", + "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')", + "str('\\x11' * (1500 - 42))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":667 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1333 + } + ] + } + } + ] + } +] diff --git a/ryu/tests/switch/of14/group/01_SELECT_Weight_IP.json b/ryu/tests/switch/of14/group/01_SELECT_Weight_IP.json new file mode 100644 index 00000000..9c048727 --- /dev/null +++ b/ryu/tests/switch/of14/group/01_SELECT_Weight_IP.json @@ -0,0 +1,341 @@ +[ + "group: 01_SELECT_Weight_IP", + { + "description":"2Mbps(ethernet/ipv4(src=random,dst=random)/tcp(src_port=random,dst_port=random))-->'in_port=1,actions=group:select(weight=1,actions=output:2/weight=2,actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":2, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(proto=6, dst=netaddr.IPAddress(randint(0, 2 ** 32 - 1)), src=netaddr.IPAddress(randint(0, 2 ** 32 - 1)))", + "tcp(dst_port=randint(0, 2 ** 16 - 1), src_port=randint(0, 2 ** 16 - 1))", + "str('\\x11' * (1500 - 54))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":667 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1333 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet/ipv6(src=random,dst=random)/tcp(src_port=random,dst_port=random))-->'in_port=1,actions=group:select(weight=1,actions=output:2/weight=2,actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":2, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(nxt=6, dst=netaddr.IPAddress(randint(0, 2 ** 128 - 1)), src=netaddr.IPAddress(randint(0, 2 ** 128 - 1)))", + "tcp(dst_port=randint(0, 2 ** 16 - 1), src_port=randint(0, 2 ** 16 - 1))", + "str('\\x11' * (1500 - 74))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":667 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1333 + } + ] + } + } + ] + }, + { + "description":"2Mbps(ethernet/arp(src_ip=random,dst_ip=random)-->'in_port=1,actions=group:select(weight=1,actions=output:2/weight=2,actions=output:3)'", + "prerequisite":[ + { + "OFPGroupMod":{ + "group_id":0, + "type":1, + "buckets":[ + { + "OFPBucket":{ + "weight":1, + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ] + } + }, + { + "OFPBucket":{ + "weight":2, + "actions":[ + { + "OFPActionOutput":{ + "port":3 + } + } + ] + } + } + ] + } + }, + { + "OFPFlowMod":{ + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionGroup":{ + "group_id":0 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":{ + "packets":{ + "data":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11', dst_ip=netaddr.IPAddress(randint(0, 2 ** 32 - 1)), src_ip=netaddr.IPAddress(randint(0, 2 ** 32 - 1)))", + "str('\\x11' * (1500 - 42))" + ], + "pktps":175, + "duration_time":30 + } + }, + "egress":{ + "throughput":[ + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + }, + "kbps":667 + }, + { + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":3 + } + } + ] + }, + "kbps":1333 + } + ] + } + } + ] + } +] |