16 Commits

Author SHA1 Message Date
IWASE Yusuke
74d5de7803 tester: Support to test OpenFlow1.0 switch
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28 14:32:02 +09:00
Yusuke Iwase
b1c1adf79a switch/tester: Add sleep interval for each test case
Open vSwitch, which installed with the kernel module, has a cache in
the kernel for the flow table and the cached flow entries have a
hard timeout of 5 seconds.
tester.py attempts to confirm its flow modifications with a barrier
request, but Open vSwitch sends a barrier reply back regardless of
the the state of the cached entries in the kernel module.
So in some cases, Open vSwtich needs the interval between each test
case.
This patch adds an option for setting interval for the workaround.

Note: With a zero seconds interval, the whole test suite runs in
20-30 minutes, but with a 10 seconds interval between each test,
the entire suite takes 3-4 hours.

Reported-by: Alan Deikman <alan.deikman@znyx.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-01 13:27:45 +09:00
FUJITA Tomonori
927cda4392 remove old Ryu OpenStack plugin stuff
The plugin that uses these was removed from OpenStack long ago.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-28 22:23:21 +09:00
Minoru TAKAHASHI
d2d5c4d25d sw test tool: support specifying the port number
You can specify the port number in the options when sw test tool is started.
The example is as follows:

  ryu-manager --test-switch-target_recv_port 4   (default:1)
              --test-switch-target_send_port_1 5 (default:2)
              --test-switch-target_send_port_2 6 (default:3)
              --test-switch-tester_send_port 7   (default:1)
              --test-switch-tester_recv_port_1 8 (default:2)
              --test-switch-tester_recv_port_2 9 (default:3)
               ryu/tests/switch/tester.py

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-12 09:04:46 -07:00
Yuichi Ito
7aa71165d7 ryu/flags: Add config parameters related sw test tool
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-23 17:10:24 +09:00
YAMAMOTO Takashi
7b1d0eb9d6 reduce direct uses of oslo.config.cfg.CONF
no functional changes are intended.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-03-16 20:28:10 +09:00
Yuichi Ito
70542380d3 test tool: add OpenFlowSwitch test tool
What this patch implements:

    This patch implements a tool which performs OpenFlow conformance testing.
    The tool can:
      - install various flow entries of OpenFlow 1.3 as follows:
        * all 'action' except SET_QUEUE and GROUP
        * all 'match' except IN_PHY_PORT
      - confirm whether the datapath works correctly according to the installed flow entries.

Required test environment:

    The tool requires the test environment that includes 2 switches and 2 links as follows:

                      +-----------+
           +----------| target sw | The OpenFlow switch to be tested
           |          +-----------+
    +------------+      (1)   (2)
    | controller |       |     |
    +------------+      (1)   (2)
           |          +-----------+
           +----------| tester sw | OpenFlow Switch
                      +-----------+

      (X) : port number

How does the tool work:

    The tool will:
      - install the flow entries into the target switch.
      - transmit a packet from the tester switch to the target switch.
        * According to the installed flow entries, the target switch outputs a packet towards the tester switch.
        * The tester switch sends a PacketIn message to the tool.
      - examine the packet that is included in the PacketIn message and output the result.
        * The tool supports also the table-miss examinations.

    The tool processes test files in the specified directory sequentially.

    By forming the result, you can create the list as:
    http://osrg.github.io/ryu-certification/switch/ovs.html
    http://osrg.github.io/ryu-certification/switch/LINC.html
    http://osrg.github.io/ryu-certification/switch/ofsoftswitch13.html

Required test file format:

    [
        "test name",
        {
            test pattern #01
        },
        {
            test pattern #02
        }, ...
    ]

    Each test pattern has the following internal format:

    {
        "description": description of this test pattern,
        "prerequisite": [
            FlowMod messages used by this test pattern
        ],
        "tests": [
            "ingress": inbound packet data,
            "egress": outbound packet data,
            "PACKET-IN": packet data sent by PacketIn message,
            "table-miss": table id in which table-miss occurs
        ]
    }

    The extensions of the test files have to be '.json'.

How to run:

    Do the following command:
    ryu-manager ryu/tests/switch/tester.py

    The following options can be used:
      - --test-switch-target   (target sw dp-id)
      - --test-switch-tester   (tester sw dp-id)
      - --test-switch-dir      (test files directory)

    ex)
    ryu-manager --test-switch-target 0000000000000005 --test-switch-dir /home/ryu/tests ryu/tests/switch/tester.py

Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-12-13 17:27:49 +09:00
Yoshihiro Kaneko
673b83b6d6 ryu/flags: rename config paramerters related to openstack
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-07-11 21:52:15 +09:00
YAMAMOTO Takashi
72a061f19b g/c --monkey-patch option
this obscure option seems to have been a no-op since the initial commit.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-28 21:41:06 +09:00
YAMAMOTO Takashi
4523b1b64c change --foo_bar options to --foo-bar
rename options. (s/_/-/)
according to Isaku Yamahata, this makes us look similar to openstack.

caveat: no backward compat is provided.  you need to update both of
config files and cli options.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-25 20:08:15 +09:00
YAMAMOTO Takashi
0af7056b7d switch from openstack.common.cfg to oslo.config.cfg
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-24 13:07:59 +09:00
YAMAMOTO Takashi
f2144087cf fix a typo in the help message of quantum_controller_addr
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-14 12:34:08 +09:00
YAMAMOTO Takashi
6be8ef3906 use openstack.common.cfg instead of gflags
make most of modules use openstack.common.cfg instead of gflags

caveats: no config file compatibility is provided.  (flagfile vs ini file)

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-14 12:34:08 +09:00
FUJITA Tomonori
6e76328bbc app: Add quantum adapter
Based on the following patch:

From: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Subject: app: Add quantum adapter

Thanks to Kaneko for finding and fixing my bugs.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-05 23:38:04 +09:00
FUJITA Tomonori
711301abb3 Switch to Apache 2.0 license
To make the further integration into IaaS OSS (OpenStack and
CloudStack) easier, we switch to Apache 2.0 license.

ryu/app/wsapi.py is still under GPL3 or later. We replace it later.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-04-06 08:38:45 +09:00
FUJITA Tomonori
aa5051a162 initial commit
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2011-12-09 15:56:05 +09:00