use of org.openkilda.server42.control.messaging.flowrtt.DeactivateFlowMonitoringInfoData in project open-kilda by telstra.
the class YFlowDeleteHubBolt method sendDeactivateFlowMonitoring.
@Override
public void sendDeactivateFlowMonitoring(String flow, SwitchId srcSwitchId, SwitchId dstSwitchId) {
DeactivateFlowMonitoringInfoData payload = DeactivateFlowMonitoringInfoData.builder().flowId(flow).switchId(dstSwitchId).switchId(srcSwitchId).build();
Message message = new InfoMessage(payload, getCommandContext().getCreateTime(), getCommandContext().getCorrelationId());
emitWithContext(HUB_TO_SERVER42_CONTROL_TOPOLOGY_SENDER.name(), getCurrentTuple(), new Values(flow, message));
}
use of org.openkilda.server42.control.messaging.flowrtt.DeactivateFlowMonitoringInfoData in project open-kilda by telstra.
the class FlowDeleteHubBolt method sendDeactivateFlowMonitoring.
@Override
public void sendDeactivateFlowMonitoring(String flow, SwitchId srcSwitchId, SwitchId dstSwitchId) {
DeactivateFlowMonitoringInfoData payload = DeactivateFlowMonitoringInfoData.builder().flowId(flow).switchId(dstSwitchId).switchId(srcSwitchId).build();
Message message = new InfoMessage(payload, getCommandContext().getCreateTime(), getCommandContext().getCorrelationId());
emitWithContext(HUB_TO_SERVER42_CONTROL_TOPOLOGY_SENDER.name(), getCurrentTuple(), new Values(flow, message));
}
use of org.openkilda.server42.control.messaging.flowrtt.DeactivateFlowMonitoringInfoData in project open-kilda by telstra.
the class FlowUpdateHubBolt method sendDeactivateFlowMonitoring.
@Override
public void sendDeactivateFlowMonitoring(String flow, SwitchId srcSwitchId, SwitchId dstSwitchId) {
// TODO(nmarchenko) move that to some util method to avoid duplicate with delete
DeactivateFlowMonitoringInfoData payload = DeactivateFlowMonitoringInfoData.builder().flowId(flow).switchId(dstSwitchId).switchId(srcSwitchId).build();
Message message = new InfoMessage(payload, getCommandContext().getCreateTime(), getCommandContext().getCorrelationId());
emitWithContext(HUB_TO_SERVER42_CONTROL_TOPOLOGY_SENDER.name(), getCurrentTuple(), new Values(flow, message));
}
use of org.openkilda.server42.control.messaging.flowrtt.DeactivateFlowMonitoringInfoData 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