* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.cases;
import com.google.common.base.Splitter;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.data.ActionConvertorData;
super(SetNwDstActionCase.class, true, OFConstants.OFP_VERSION_1_3);
}
- @Nonnull
+ @NonNull
@Override
- public Optional<Action> process(@Nonnull final SetNwDstActionCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+ public Optional<Action> process(@NonNull final SetNwDstActionCase source, final ActionConvertorData data,
+ ConvertorExecutor convertorExecutor) {
final ActionBuilder builder = new ActionBuilder();
final Address address = source.getSetNwDstAction().getAddress();
if (address instanceof Ipv4) {
Iterable<String> addressParts = PREFIX_SPLITTER.split(((Ipv4) address).getIpv4Address().getValue());
Ipv4Address result = new Ipv4Address(addressParts.iterator().next());
- List<MatchEntry> matchEntriesList = new ArrayList<>();
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
- matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
- matchEntryBuilder.setOxmMatchField(Ipv4Dst.class);
+ matchEntryBuilder.setOxmClass(OpenflowBasicClass.VALUE);
+ matchEntryBuilder.setOxmMatchField(Ipv4Dst.VALUE);
Ipv4DstCaseBuilder ipv4DstCaseBuilder = new Ipv4DstCaseBuilder();
Ipv4DstBuilder ipv4DstBuilder = new Ipv4DstBuilder();
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setMatchEntryValue(ipv4DstCaseBuilder.build());
+
+ List<MatchEntry> matchEntriesList = new ArrayList<>();
matchEntriesList.add(matchEntryBuilder.build());
SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();
} else if (address instanceof Ipv6) {
Iterable<String> addressParts = PREFIX_SPLITTER.split(((Ipv6) address).getIpv6Address().getValue());
Ipv6Address result = new Ipv6Address(addressParts.iterator().next());
- List<MatchEntry> matchEntriesList = new ArrayList<>();
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
- matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
- matchEntryBuilder.setOxmMatchField(Ipv6Dst.class);
+ matchEntryBuilder.setOxmClass(OpenflowBasicClass.VALUE);
+ matchEntryBuilder.setOxmMatchField(Ipv6Dst.VALUE);
Ipv6DstCaseBuilder ipv6DstCaseBuilder = new Ipv6DstCaseBuilder();
Ipv6DstBuilder ipv6DstBuilder = new Ipv6DstBuilder();
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setMatchEntryValue(ipv6DstCaseBuilder.build());
+
+ List<MatchEntry> matchEntriesList = new ArrayList<>();
matchEntriesList.add(matchEntryBuilder.build());
SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();