use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.dst.action._case.SetDlDstAction in project openflowplugin by opendaylight.
the class SalToOfSetDlDstActionV10Case method process.
@Nonnull
@Override
public Optional<Action> process(@Nonnull final SetDlDstActionCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
SetDlDstAction setdldstaction = source.getSetDlDstAction();
SetDlDstCaseBuilder setDlDstCaseBuilder = new SetDlDstCaseBuilder();
SetDlDstActionBuilder setDlDstActionBuilder = new SetDlDstActionBuilder();
setDlDstActionBuilder.setDlDstAddress(setdldstaction.getAddress());
setDlDstCaseBuilder.setSetDlDstAction(setDlDstActionBuilder.build());
return Optional.of(new ActionBuilder().setActionChoice(setDlDstCaseBuilder.build()).build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.dst.action._case.SetDlDstAction in project openflowplugin by opendaylight.
the class SalToOfSetDlDstActionCase method process.
@Nonnull
@Override
public Optional<Action> process(@Nonnull final SetDlDstActionCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
SetDlDstAction setdldstaction = source.getSetDlDstAction();
MatchEntryBuilder matchBuilder = new MatchEntryBuilder();
matchBuilder.setOxmClass(OpenflowBasicClass.class);
matchBuilder.setOxmMatchField(EthDst.class);
EthDstCaseBuilder ethDstCaseBuilder = new EthDstCaseBuilder();
EthDstBuilder ethDstBuilder = new EthDstBuilder();
ethDstBuilder.setMacAddress(setdldstaction.getAddress());
matchBuilder.setHasMask(false);
ethDstCaseBuilder.setEthDst(ethDstBuilder.build());
matchBuilder.setMatchEntryValue(ethDstCaseBuilder.build());
List<MatchEntry> entries = new ArrayList<>();
entries.add(matchBuilder.build());
SetFieldActionBuilder setFieldBuilder = new SetFieldActionBuilder();
setFieldBuilder.setMatchEntry(entries);
SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();
setFieldCaseBuilder.setSetFieldAction(setFieldBuilder.build());
return Optional.of(new ActionBuilder().setActionChoice(setFieldCaseBuilder.build()).build());
}
Aggregations