Search in sources :

Example 1 with SharedSegmentType

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));
    }
}
Also used : FlowSharedSegmentCookie(org.openkilda.model.cookie.FlowSharedSegmentCookie) SharedSegmentType(org.openkilda.model.cookie.FlowSharedSegmentCookie.SharedSegmentType) FlowCommandException(org.openkilda.floodlight.error.FlowCommandException)

Aggregations

FlowCommandException (org.openkilda.floodlight.error.FlowCommandException)1 FlowSharedSegmentCookie (org.openkilda.model.cookie.FlowSharedSegmentCookie)1 SharedSegmentType (org.openkilda.model.cookie.FlowSharedSegmentCookie.SharedSegmentType)1