-
Notifications
You must be signed in to change notification settings - Fork 53
Testing with simulator
Note: This feature is not actually implemented and currently is on-hold.
Simulator is a separate storm topology that performs the role of the speaker (floodlight) and has the following functionality:
- create topology
- add/modify switch/port/isl
- isl discovery simulation
- clear up current topology
- working with flows (?)
All communication is done by kafka messaging with pre-defined message format (more details).
Simulator listens two kafka topics:
- kafka.topic.speaker - This topic contains all messages for floodlight and simulator processes them to execute his own functions.
- kafka.topic.simulator - To that topic should be send all commands for simulator (i.e. create topology)
All simulator responses and commands is send to kafka.topic.topo.disco
and those messages will be processed like they were created by floodlight speaker.
All types of expected messages are listed in org.openkilda.messaging.simulator
package. Commands and models are located in the relevant subdirectories.
Tests that use simulator as a speaker should be tagged with "@sim".
There are some utils and common glues existed in services/src/atdd/src/test/java/org/openkilda/simulator/
that make writing tests easier.
Cucumber scenarios are available here services/src/atdd/src/test/resources/features/mvp.1/simulator/