Search in sources :

Example 1 with OutputVlanType

use of org.openkilda.messaging.payload.flow.OutputVlanType in project open-kilda by telstra.

the class RecordHandler method installOneSwitchFlow.

/**
 * Installs flow through one switch.
 *
 * @param command command message for flow installation
 */
private void installOneSwitchFlow(InstallOneSwitchFlow command) throws SwitchOperationException {
    Long meterId = command.getMeterId();
    if (meterId == null) {
        logger.error("Meter_id should be passed within one switch flow command. Cookie is {}", command.getCookie());
        meterId = (long) meterPool.allocate(command.getSwitchId(), command.getId());
        logger.error("Allocated meter_id {} for cookie {}", meterId, command.getCookie());
    }
    context.getSwitchManager().installMeter(DatapathId.of(command.getSwitchId()), command.getBandwidth(), 1024, meterId);
    OutputVlanType directOutputVlanType = command.getOutputVlanType();
    context.getSwitchManager().installOneSwitchFlow(DatapathId.of(command.getSwitchId()), command.getId(), command.getCookie(), command.getInputPort(), command.getOutputPort(), command.getInputVlanId(), command.getOutputVlanId(), directOutputVlanType, meterId);
}
Also used : OutputVlanType(org.openkilda.messaging.payload.flow.OutputVlanType)

Aggregations

OutputVlanType (org.openkilda.messaging.payload.flow.OutputVlanType)1