use of org.openkilda.floodlight.error.NotImplementedEncapsulationException in project open-kilda by telstra.
the class IngressFlowSegmentInstallFlowModFactory method makeTransformActions.
@Override
protected List<OFAction> makeTransformActions(List<Integer> vlanStack, boolean groupIsPresent) {
List<OFAction> actions = new ArrayList<>();
FlowTransitEncapsulation encapsulation = command.getEncapsulation();
switch(encapsulation.getType()) {
case TRANSIT_VLAN:
actions.addAll(makeVlanEncapsulationTransformActions(vlanStack, groupIsPresent));
break;
case VXLAN:
actions.addAll(makeVxLanEncapsulationTransformActions(vlanStack, groupIsPresent));
break;
default:
throw new NotImplementedEncapsulationException(getClass(), encapsulation.getType(), command.getSwitchId(), command.getMetadata().getFlowId());
}
return actions;
}
use of org.openkilda.floodlight.error.NotImplementedEncapsulationException in project open-kilda by telstra.
the class IngressFlowSegmentInstallFlowModFactory method makeServer42IngressFlowTransformActions.
@Override
protected List<OFAction> makeServer42IngressFlowTransformActions(List<Integer> vlanStack) {
List<OFAction> actions = new ArrayList<>();
FlowTransitEncapsulation encapsulation = command.getEncapsulation();
switch(encapsulation.getType()) {
case TRANSIT_VLAN:
MacAddress ethSrc = MacAddress.of(sw.getId());
MacAddress ethDst = MacAddress.of(command.getEgressSwitchId().toLong());
actions.add(of.actions().setField(of.oxms().ethSrc(ethSrc)));
actions.add(of.actions().setField(of.oxms().ethDst(ethDst)));
if (!getCommand().getMetadata().isMultiTable()) {
actions.add(of.actions().setField(of.oxms().udpSrc(TransportPort.of(SERVER_42_FLOW_RTT_FORWARD_UDP_PORT))));
actions.add(of.actions().setField(of.oxms().udpDst(TransportPort.of(SERVER_42_FLOW_RTT_FORWARD_UDP_PORT))));
if (switchFeatures.contains(NOVIFLOW_COPY_FIELD)) {
actions.add(buildServer42CopyFirstTimestamp(of));
}
}
actions.addAll(makeVlanEncapsulationTransformActions(vlanStack, false));
break;
case VXLAN:
if (!getCommand().getMetadata().isMultiTable() && switchFeatures.contains(NOVIFLOW_COPY_FIELD)) {
actions.add(buildServer42CopyFirstTimestamp(of));
}
actions.addAll(OfAdapter.INSTANCE.makeVlanReplaceActions(of, vlanStack, Collections.emptyList()));
actions.add(pushVxlanAction(SERVER_42_FLOW_RTT_FORWARD_UDP_PORT));
break;
default:
throw new NotImplementedEncapsulationException(getClass(), encapsulation.getType(), command.getSwitchId(), command.getMetadata().getFlowId());
}
return actions;
}
Aggregations