Search in sources :

Example 6 with FlowCreateRequest

use of org.openkilda.messaging.command.flow.FlowCreateRequest in project open-kilda by telstra.

the class FlowTopologyTest method createFlow.

private Flow createFlow(final String flowId) throws IOException {
    System.out.println("NORTHBOUND: Create flow");
    Flow flowPayload = new Flow(flowId, 10000, false, "", "test-switch", 1, 2, "test-switch", 1, 2);
    FlowCreateRequest commandData = new FlowCreateRequest(flowPayload);
    CommandMessage message = new CommandMessage(commandData, 0, "create-flow", Destination.WFM);
    // sendNorthboundMessage(message);
    sendFlowMessage(message);
    return flowPayload;
}
Also used : FlowCreateRequest(org.openkilda.messaging.command.flow.FlowCreateRequest) RemoveFlow(org.openkilda.messaging.command.flow.RemoveFlow) Flow(org.openkilda.messaging.model.Flow) InstallOneSwitchFlow(org.openkilda.messaging.command.flow.InstallOneSwitchFlow) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Aggregations

FlowCreateRequest (org.openkilda.messaging.command.flow.FlowCreateRequest)6 CommandMessage (org.openkilda.messaging.command.CommandMessage)4 InfoMessage (org.openkilda.messaging.info.InfoMessage)4 Message (org.openkilda.messaging.Message)3 CommandData (org.openkilda.messaging.command.CommandData)3 Values (org.apache.storm.tuple.Values)2 FlowDeleteRequest (org.openkilda.messaging.command.flow.FlowDeleteRequest)2 FlowGetRequest (org.openkilda.messaging.command.flow.FlowGetRequest)2 FlowPathRequest (org.openkilda.messaging.command.flow.FlowPathRequest)2 FlowUpdateRequest (org.openkilda.messaging.command.flow.FlowUpdateRequest)2 FlowsGetRequest (org.openkilda.messaging.command.flow.FlowsGetRequest)2 InfoData (org.openkilda.messaging.info.InfoData)2 Flow (org.openkilda.messaging.model.Flow)2 IOException (java.io.IOException)1 Set (java.util.Set)1 FlowCacheSyncRequest (org.openkilda.messaging.command.flow.FlowCacheSyncRequest)1 FlowRerouteRequest (org.openkilda.messaging.command.flow.FlowRerouteRequest)1 FlowRestoreRequest (org.openkilda.messaging.command.flow.FlowRestoreRequest)1 FlowStatusRequest (org.openkilda.messaging.command.flow.FlowStatusRequest)1 InstallOneSwitchFlow (org.openkilda.messaging.command.flow.InstallOneSwitchFlow)1