use of org.openkilda.server42.control.messaging.islrtt.ActivateIslMonitoringOnSwitchInfoData in project open-kilda by telstra.
the class SwitchOperationsBolt method enableServer42IslRttOnSwitch.
@Override
public void enableServer42IslRttOnSwitch(SwitchId switchId) {
ActivateIslMonitoringOnSwitchInfoData data = ActivateIslMonitoringOnSwitchInfoData.builder().switchId(switchId).build();
getOutput().emit(StreamType.TO_SERVER42.toString(), getCurrentTuple(), new Values(data, getCorrelationId()));
}
use of org.openkilda.server42.control.messaging.islrtt.ActivateIslMonitoringOnSwitchInfoData in project open-kilda by telstra.
the class Router method handleInfoMessage.
private void handleInfoMessage(Tuple input, InfoData payload) throws PipelineException {
if (payload instanceof ActivateFlowMonitoringInfoData) {
ActivateFlowMonitoringInfoData data = (ActivateFlowMonitoringInfoData) payload;
emit(STREAM_FLOW_ID, input, makeTuple(new ActivateFlowMonitoringCommand(data, true)));
emit(STREAM_FLOW_ID, input, makeTuple(new ActivateFlowMonitoringCommand(data, false)));
} else if (payload instanceof DeactivateFlowMonitoringInfoData) {
DeactivateFlowMonitoringInfoData data = (DeactivateFlowMonitoringInfoData) payload;
for (SwitchId switchId : data.getSwitchIds()) {
emit(STREAM_FLOW_ID, input, makeTuple(new DeactivateFlowMonitoringCommand(switchId, data.getFlowId(), true)));
emit(STREAM_FLOW_ID, input, makeTuple(new DeactivateFlowMonitoringCommand(switchId, data.getFlowId(), false)));
}
} else if (payload instanceof ActivateFlowMonitoringOnSwitchInfoData) {
ActivateFlowMonitoringOnSwitchInfoData data = (ActivateFlowMonitoringOnSwitchInfoData) payload;
activateFlowMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof DeactivateFlowMonitoringOnSwitchInfoData) {
DeactivateFlowMonitoringOnSwitchInfoData data = (DeactivateFlowMonitoringOnSwitchInfoData) payload;
deactivateFlowMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof ActivateIslMonitoringOnSwitchInfoData) {
ActivateIslMonitoringOnSwitchInfoData data = (ActivateIslMonitoringOnSwitchInfoData) payload;
activateIslMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof DeactivateIslMonitoringOnSwitchInfoData) {
DeactivateIslMonitoringOnSwitchInfoData data = (DeactivateIslMonitoringOnSwitchInfoData) payload;
deactivateIslMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof FeatureTogglesUpdate) {
FeatureTogglesUpdate data = (FeatureTogglesUpdate) payload;
this.service.handleFlowRttFeatureToggle(data.getToggles().getServer42FlowRtt());
this.service.handleIslRttFeatureToggle(data.getToggles().getServer42IslRtt());
} else {
log.error("Do not proxy flow message - unexpected message payload \"{}\"", payload.getClass());
}
}
Aggregations