use of org.openkilda.model.cookie.FlowSharedSegmentCookie.SharedSegmentType in project open-kilda by telstra.
the class RecordHandler method installSharedFlow.
private void installSharedFlow(InstallSharedFlow command) throws SwitchOperationException, FlowCommandException {
FlowSharedSegmentCookie cookie = new FlowSharedSegmentCookie(command.getCookie());
SharedSegmentType segmentType = cookie.getSegmentType();
if (segmentType == SharedSegmentType.QINQ_OUTER_VLAN) {
context.getSwitchManager().installOuterVlanMatchSharedFlow(command.getSwitchId(), command.getId(), cookie);
} else {
throw new FlowCommandException(command.getId(), command.getCookie(), command.getTransactionId(), ErrorType.REQUEST_INVALID, format("Unsupported shared segment type %s (cookie: %s)", segmentType, cookie));
}
}
Aggregations