use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.field._case.SetFieldAction in project openflowplugin by opendaylight.
the class OfToSalSetFieldCase method process.
@Override
public Optional<Action> process(@Nonnull final SetFieldCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final VersionDatapathIdConvertorData datapathIdConvertorData = new VersionDatapathIdConvertorData(data.getVersion());
final SetFieldAction setFieldAction = source.getSetFieldAction();
final SetFieldBuilder setField = new SetFieldBuilder();
final Optional<MatchBuilder> matchOptional = convertorExecutor.convert(setFieldAction, datapathIdConvertorData);
setField.fieldsFrom(matchOptional.orElse(new MatchBuilder()).build());
return Optional.of(new SetFieldCaseBuilder().setSetField(setField.build()).build());
}
Aggregations