Skip to content
YAMADA Hideki edited this page May 20, 2013 · 8 revisions

This page describes how to use Ryu with GUI component.

Overview

GUI server provides topology and flow visualization.

fig1

The architecture is as follows:


+-------------+
|     Ryu     | 
+-------------+
       ^
       | REST API
       v
+-------------+
| GUI Server  |
+-------------+
       ^
       | WebSocket and REST
       v
+-------------+
| Web Browser |
+-------------+

Package requirements

GUI server needs following python packages.

  • flask
  • gevent-websocket

Using GUI

Running ryu

GUI server needs topology and REST. Run ryu with those components:

$ PYTHONPATH=. ./bin/ryu-manager --verbose --observe-links \
                                 ryu/topology/switches.py \
                                 ryu/app/rest_topology.py \
                                 ryu/app/ofctl_rest.py

Running GUI server

$ PYTHONPATH=. ./ryu/gui/controller.py

Now, GUI server listen for 0.0.0.0:8000.

Browse the topology

If GUI server is running on same machine, just access http://127.0.0.1:8000.

Testing

You can test GUI using mininet and selenium.

Setup

Run all tests

Just type:

$ ./run_tests.sh -V -g

Run indivisual tests

Run ryu and mininet control server and GUI server. Here is helper script:

$ ./ryu/tests/gui/run_servers.sh

And run test

$ ./ryu/tests/gui/run_tests_with_firefox.py

If you want to test chrome, install chromedriver.