Search in sources :

Example 6 with InstallServer42Flow

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

the class RecordHandlerTest method installServer42OutputVxlanTest.

@Test
public void installServer42OutputVxlanTest() throws SwitchOperationException {
    long cookie = SERVER_42_FLOW_RTT_OUTPUT_VXLAN_COOKIE;
    expect(switchManager.installServer42FlowRttOutputVxlanFlow(DATAPATH_ID, SERVER42_PORT, SERVER42_VLAN, SERVER42_MAC_ADDRESS)).andReturn(cookie).once();
    replay(switchManager);
    InstallServer42Flow request = InstallServer42Flow.builder().id("output_vxlan").switchId(SWITCH_ID).cookie(cookie).inputPort(0).outputPort(SERVER42_PORT).server42MacAddress(SERVER42_MAC_ADDRESS).server42Vlan(SERVER42_VLAN).build();
    recordHandler.handleCommand(new CommandMessage(new InstallFlowForSwitchManagerRequest(request), 0, CORRELATION_ID));
    verify(switchManager);
}
Also used : InstallFlowForSwitchManagerRequest(org.openkilda.messaging.command.flow.InstallFlowForSwitchManagerRequest) InstallServer42Flow(org.openkilda.messaging.command.flow.InstallServer42Flow) CommandMessage(org.openkilda.messaging.command.CommandMessage) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 CommandMessage (org.openkilda.messaging.command.CommandMessage)6 InstallFlowForSwitchManagerRequest (org.openkilda.messaging.command.flow.InstallFlowForSwitchManagerRequest)6 InstallServer42Flow (org.openkilda.messaging.command.flow.InstallServer42Flow)6 PortColourCookie (org.openkilda.model.cookie.PortColourCookie)2 FlowSharedSegmentCookie (org.openkilda.model.cookie.FlowSharedSegmentCookie)1