diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2013-04-09 14:19:06 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-04-09 21:31:20 +0900 |
commit | 5ccf67169f2fdeb11aa0aaab70fea52b2c6c1353 (patch) | |
tree | a35ae88f6c56780f3813f276579b5798b95ea1a4 | |
parent | 1f529be40798818691d19ab275e6ec77bb56c812 (diff) |
tests/integrated/test_of_config: comment on how to run
Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/tests/integrated/test_of_config.py | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/ryu/tests/integrated/test_of_config.py b/ryu/tests/integrated/test_of_config.py index 2e46c6e2..a7d5815f 100644 --- a/ryu/tests/integrated/test_of_config.py +++ b/ryu/tests/integrated/test_of_config.py @@ -14,6 +14,102 @@ # See the License for the specific language governing permissions and # limitations under the License. +""" +How to run this test + +edit linc config file. LINC-Switch/rel/linc/releases/1.0/sys.config +You can find the sample config I used for the test below + +For this following config to work, the network interface +linc-port and linc-port2 must be created before hand. +(Or edit the port name depending on your environment) +An easy way is to create them as follows +# ip link add linc-port type veth peer name linc-port-peer +# ip link set linc-port up +# ip link add linc-port2 type veth peer name linc-port-peer2 +# ip link set linc-port2 up + +Then run linc +# rel/linc/bin/linc console + +Then run ryu +# PYTHONPATH=. ./bin/ryu-manager --verbose \ + ryu/tests/integrated/test_of_config.py + + +Here is my sys.config used for this test. +-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8--- +[ + {linc, + [ + {of_config, enabled}, + + {logical_switches, + [ + {switch, 0, + [ + {backend, linc_us4}, + + {controllers, + [ + {"Switch0-DefaultController", "localhost", 6633, tcp} + ]}, + + {ports, + [ + {port, 1, [{interface, "linc-port"}]}, + {port, 2, [{interface, "linc-port2"}]} + ]}, + + {queues_status, disabled}, + + {queues, + [ + ]} + ]} + ]} + ]}, + + {enetconf, + [ + {capabilities, [{base, {1, 1}}, + {startup, {1, 0}}, + {'writable-running', {1, 0}}]}, + {callback_module, linc_ofconfig}, + {sshd_ip, any}, + {sshd_port, 1830}, + {sshd_user_passwords, + [ + {"linc", "linc"} + ]} + ]}, + + {lager, + [ + {handlers, + [ + {lager_console_backend, info}, + {lager_file_backend, + [ + {"log/error.log", error, 10485760, "$D0", 5}, + {"log/console.log", info, 10485760, "$D0", 5} + ]} + ]} + ]}, + + {sasl, + [ + {sasl_error_logger, {file, "log/sasl-error.log"}}, + {errlog_type, error}, + {error_logger_mf_dir, "log/sasl"}, % Log directory + {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size + {error_logger_mf_maxfiles, 5} % 5 files max + ]} +]. +-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-- + +""" + import gevent import traceback |