use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.field._case.SetField 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