sw test tool: Remove an unnecessary wrapper method

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Reduce similar classes

TargetSw and TesterSw are merged as OpenFlowSw.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Reduce similar methods of deleting flows

OpenFlowSw.del_test_flow() and OpenFlowSw.del_flows_for_throughput_analysis() are merged as OpenFlowSw.del_flows().

And rename OpenFlowSw.del_test_meter() to OpenFlowSw.del_meters(), like OpenFlowSw.del_flows().

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Reduce similar methods of initializing flows

_test_initialize_flow_tester() is merged into _test_initialize_flow().

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Reduce similar methods of handling events

All of xxx_stats_reply_handler() are merged as stats_reply_handler().

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Reduce similar methods of checking entries exist

All of _test_xxx_exist_chk() are merged as _test_exist_chk().

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: pylint

E:1026, 8: Instance of 'DummyDatapath' has no 'set_xid' member (but some types could not be inferred) (maybe-no-member)
E:1027, 8: Instance of 'DummyDatapath' has no 'send_msg' member (but some types could not be inferred) (maybe-no-member)

NOTE: These methods are never called. This patch is only for avoiding pylint error.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sw test tool: Add a link between switches

This change is for tests that use group_table.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add support for initialization of group tables

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add support for installation of group tables

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add support for confirmation of installed group entries

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Enable parsing OFPGroupMod messages in 'prerequisite'

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Enable sending packets using random values

The switch test tool is now enabled to send packets using random values as follows:

        "tests":[
            {
                "ingress":{
                    "packets":{
                        "data":[
                            "ethernet(dst=netaddr.EUI(randint(0, 2 ** 48 - 1)), ethertype=2048)",
                            "ipv4(proto=6, src=netaddr.IPAddress(randint(0, 2 ** 32 - 1)))",
                            "tcp(dst_port=randint(0, 2 ** 16 - 1))",
                            "str(\"\\x11\" * (1500 - 54))"
                        ],
                        "pktps":1000,
                        "duration_time":30
                    }
                },
                "egress":{
                    "throughput":[
                        {
                            "OFPMatch":{
                                "oxm_fields":[
                                    {
                                        "OXMTlv":{
                                            "field":"in_port",
                                            "value":2
                                        }
                                    }
                                ]
                            },
                            "kbps":1500
                        }
                    ]
                }
            }
        ]

When ingress.packets.data includes 'randint', the switch test tool will send each packet using random values.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add default test files (group:all/select)

These test files aim to examine 'group action' of FlowMod message.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
sw test tool: Add a default test file (group:indirect)

This test file aims to examine 'group action' of FlowMod message.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>