use of org.openkilda.messaging.MessageContext in project open-kilda by telstra.
the class BfdCommand method call.
@Override
public Command call() throws Exception {
try {
IOFSwitch sw = switchManager.lookupSwitch(target);
validate(sw);
try (Session session = sessionService.open(new MessageContext(getContext().getCorrelationId()), sw)) {
handle(session);
}
} catch (SwitchOperationException e) {
handleError(e);
// early error response
sendResponse();
}
return null;
}
use of org.openkilda.messaging.MessageContext in project open-kilda by telstra.
the class EgressFlowSegmentInstallCommandTest method makeCommand.
protected EgressFlowSegmentInstallCommand makeCommand(FlowEndpoint endpoint, FlowEndpoint ingressEndpoint, FlowTransitEncapsulation encapsulation, FlowSegmentMetadata metadata) {
MessageContext messageContext = new MessageContext();
UUID commandId = UUID.randomUUID();
int islPort = 6;
return new EgressFlowSegmentInstallCommand(messageContext, commandId, metadata, endpoint, ingressEndpoint, islPort, encapsulation, null);
}
use of org.openkilda.messaging.MessageContext in project open-kilda by telstra.
the class EgressFlowSegmentRemoveCommandTest method makeCommand.
@Override
protected EgressFlowSegmentRemoveCommand makeCommand(FlowEndpoint endpoint, FlowEndpoint ingressEndpoint, FlowTransitEncapsulation encapsulation) {
MessageContext messageContext = new MessageContext();
UUID commandId = UUID.randomUUID();
FlowSegmentMetadata metadata = new FlowSegmentMetadata("egress-flow-segment-remove-flow-id", new Cookie(101), false);
int islPort = 8;
return new EgressFlowSegmentRemoveCommand(messageContext, commandId, metadata, endpoint, ingressEndpoint, islPort, encapsulation, null);
}
Aggregations