openvnet icon indicating copy to clipboard operation
openvnet copied to clipboard

Create a virtual integration test using Trema virtual switch.

Open Metallion opened this issue 10 years ago • 0 comments

Trema comes with a DSL to define a virtual networking environment and call trema in that context. It might be possible to emulate our integration test using this. If we can do it, we would be able to run the integration test locally and very fast as if it were a unit test.

Remark: This will not replace the integration test. This is a nice-to-have feature that we could have alongside the current integration test.

The following example was copied from the Trema website: http://trema.github.io/trema/

Network Emulator

With Trema network DSL, you can describe the network topology in which the controller is executed.

# One virtual switch + two virtual hosts.
vswitch { dpid "0xabc" }
vhost "host1"
vhost "host2"
link "0xabc", "host1"
link "0xabc", "host2"

Then you can pass the network configuration to trema run.

$ ./trema run mycontroller.rb -c network.conf

Metallion avatar Jun 02 '15 08:06 Metallion