forked from ntts-clo/ryu
-
Notifications
You must be signed in to change notification settings - Fork 6
YAMADA Hideki edited this page May 20, 2013
·
8 revisions
This page describes how to use Ryu with GUI component.
GUI server provides topology and flow visualization.
The architecture is as follows:
+-------------+
| Ryu |
+-------------+
^
| REST API
v
+-------------+
| GUI Server |
+-------------+
^
| WebSocket and REST
v
+-------------+
| Web Browser |
+-------------+
GUI server needs following python packages.
- flask
- gevent-websocket
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
$ PYTHONPATH=. ./ryu/gui/controller.py
Now, GUI server listen for 0.0.0.0:8000.
If GUI server is running on same machine, just access http://127.0.0.1:8000.
You can test GUI using mininet and selenium.
-
Install mininet
-
Install selenium
$ pip install selenium
-
Install firefox and google-chrome
-
install chromedriver
Just type:
$ ./run_tests.sh -V -g
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.