use of org.openkilda.messaging.command.flow.InstallServer42Flow in project open-kilda by telstra.
the class RecordHandlerTest method shouldInstallServer42IslRttInputRule.
@Test
public void shouldInstallServer42IslRttInputRule() throws SwitchOperationException {
int islPort = 123;
PortColourCookie cookie = PortColourCookie.builder().portNumber(islPort).type(SERVER_42_ISL_RTT_INPUT).build();
expect(switchManager.installServer42IslRttInputFlow(DATAPATH_ID, SERVER42_PORT, islPort)).andReturn(cookie.getValue()).once();
replay(switchManager);
InstallServer42Flow request = InstallServer42Flow.builder().id("test").switchId(SWITCH_ID).cookie(cookie.getValue()).inputPort(SERVER42_PORT).outputPort(0).server42MacAddress(SERVER42_MAC_ADDRESS).server42Vlan(SERVER42_VLAN).build();
recordHandler.handleCommand(new CommandMessage(new InstallFlowForSwitchManagerRequest(request), 0, CORRELATION_ID));
verify(switchManager);
}
use of org.openkilda.messaging.command.flow.InstallServer42Flow in project open-kilda by telstra.
the class RecordHandlerTest method installServer42SharedTest.
@Test
public void installServer42SharedTest() throws SwitchOperationException {
FlowSharedSegmentCookie cookie = FlowSharedSegmentCookie.builder(SharedSegmentType.SERVER42_QINQ_OUTER_VLAN).portNumber(SERVER42_PORT).vlanId(VLAN_1).build();
switchManager.installServer42OuterVlanMatchSharedFlow(DATAPATH_ID, cookie);
expectLastCall().once();
replay(switchManager);
InstallServer42Flow request = InstallServer42Flow.builder().id("shared").switchId(SWITCH_ID).cookie(cookie.getValue()).inputPort(SERVER42_PORT).outputPort(0).build();
recordHandler.handleCommand(new CommandMessage(new InstallFlowForSwitchManagerRequest(request), 0, CORRELATION_ID));
verify(switchManager);
}
use of org.openkilda.messaging.command.flow.InstallServer42Flow in project open-kilda by telstra.
the class RecordHandlerTest method shouldInstallServer42IslRttOutputRule.
@Test
public void shouldInstallServer42IslRttOutputRule() throws SwitchOperationException {
long cookie = SERVER_42_ISL_RTT_OUTPUT_COOKIE;
expect(switchManager.installServer42IslRttOutputFlow(DATAPATH_ID, SERVER42_PORT, SERVER42_VLAN, SERVER42_MAC_ADDRESS)).andReturn(cookie).once();
replay(switchManager);
InstallServer42Flow request = InstallServer42Flow.builder().id("test").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);
}
use of org.openkilda.messaging.command.flow.InstallServer42Flow in project open-kilda by telstra.
the class RecordHandlerTest method installServer42InputTest.
@Test
public void installServer42InputTest() throws SwitchOperationException {
PortColourCookie cookie = PortColourCookie.builder().portNumber(CUSTOMER_PORT).type(SERVER_42_FLOW_RTT_INPUT).build();
expect(switchManager.installServer42FlowRttInputFlow(DATAPATH_ID, SERVER42_PORT, CUSTOMER_PORT, SERVER42_MAC_ADDRESS)).andReturn(cookie.getValue()).once();
replay(switchManager);
InstallServer42Flow request = InstallServer42Flow.builder().id("input").switchId(SWITCH_ID).cookie(cookie.getValue()).inputPort(SERVER42_PORT).outputPort(0).server42MacAddress(SERVER42_MAC_ADDRESS).server42Vlan(SERVER42_VLAN).build();
recordHandler.handleCommand(new CommandMessage(new InstallFlowForSwitchManagerRequest(request), 0, CORRELATION_ID));
verify(switchManager);
}
use of org.openkilda.messaging.command.flow.InstallServer42Flow in project open-kilda by telstra.
the class RecordHandlerTest method installServer42OutputVlanTest.
@Test
public void installServer42OutputVlanTest() throws SwitchOperationException {
long cookie = SERVER_42_FLOW_RTT_OUTPUT_VLAN_COOKIE;
expect(switchManager.installServer42FlowRttOutputVlanFlow(DATAPATH_ID, SERVER42_PORT, SERVER42_VLAN, SERVER42_MAC_ADDRESS)).andReturn(cookie).once();
replay(switchManager);
InstallServer42Flow request = InstallServer42Flow.builder().id("output_vlan").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);
}
Aggregations