backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / group / 01_SELECT_Weight_IP.json
diff --git a/ryu/build/lib.linux-armv7l-2.7/ryu/tests/switch/of14/group/01_SELECT_Weight_IP.json b/ryu/build/lib.linux-armv7l-2.7/ryu/tests/switch/of14/group/01_SELECT_Weight_IP.json
new file mode 100644 (file)
index 0000000..77bffa9
--- /dev/null
@@ -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))",
+                            "bytes(b'\\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))",
+                            "bytes(b'\\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)))",
+                            "bytes(b'\\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
+                        }
+                    ]
+                }
+            }
+        ]
+    }
+]