use of org.openkilda.server42.control.messaging.flowrtt.Headers in project open-kilda by telstra.
the class FlowHandler method notifyDeactivateFlowMonitoring.
private void notifyDeactivateFlowMonitoring(SwitchId switchId) {
ClearFlows clearFlows = ClearFlows.builder().headers(buildHeader()).build();
emit(STREAM_CONTROL_COMMANDS_ID, getCurrentTuple(), new Values(switchId.toString(), clearFlows));
}
use of org.openkilda.server42.control.messaging.flowrtt.Headers in project open-kilda by telstra.
the class FlowHandler method sendListOfFlowBySwitchId.
@Override
public void sendListOfFlowBySwitchId(SwitchId switchId, Set<String> flowOnSwitch) {
ListFlowsOnSwitch listFlowsOnSwitch = ListFlowsOnSwitch.builder().headers(buildHeader()).flowIds(flowOnSwitch).build();
emit(STREAM_CONTROL_COMMANDS_ID, getCurrentTuple(), new Values(switchId.toString(), listFlowsOnSwitch));
}
use of org.openkilda.server42.control.messaging.flowrtt.Headers in project open-kilda by telstra.
the class GateTest method clearFlowsTest.
@Test
public void clearFlowsTest() throws Exception {
Headers headers = Headers.builder().correlationId("some-correlation-id").build();
ClearFlows clearFlows = ClearFlows.builder().headers(headers).build();
String dpId = "00:00:1b:45:18:d6:71:5a";
gate.listen(clearFlows, dpId);
CommandPacket commandPacket = getCommandPacket();
assertThat(commandPacket.getType()).isEqualTo(Type.CLEAR_FLOWS);
assertThat(commandPacket.getCommandList()).hasSize(1);
Any command = commandPacket.getCommand(0);
assertThat(command.is(FlowRttControl.ClearFlowsFilter.class)).isTrue();
FlowRttControl.ClearFlowsFilter unpack = command.unpack(FlowRttControl.ClearFlowsFilter.class);
String dstMac = "1b:45:18:d6:71:5a";
assertThat(unpack.getDstMac()).isEqualTo(dstMac);
}
Aggregations