use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.code._case.Icmpv6Code in project openflowplugin by opendaylight.
the class Icmpv6CodeEntryDeserializer method deserializeEntry.
@Override
public void deserializeEntry(ByteBuf message, MatchBuilder builder) {
processHeader(message);
final short code = message.readUnsignedByte();
if (Objects.isNull(builder.getIcmpv6Match())) {
builder.setIcmpv6Match(new Icmpv6MatchBuilder().setIcmpv6Code(code).build());
} else if (Objects.isNull(builder.getIcmpv6Match().getIcmpv6Code())) {
builder.setIcmpv6Match(new Icmpv6MatchBuilder(builder.getIcmpv6Match()).setIcmpv6Code(code).build());
} else {
throwErrorOnMalformed(builder, "icmpv6Match", "icmpv6Code");
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.code._case.Icmpv6Code in project openflowplugin by opendaylight.
the class OfToSalIcmpv6CodeCase method process.
@Override
public Optional<MatchBuilder> process(@Nonnull Icmpv6CodeCase source, MatchResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final MatchBuilder matchBuilder = data.getMatchBuilder();
final Icmpv6MatchBuilder icmpv6MatchBuilder = data.getIcmpv6MatchBuilder();
Icmpv6Code icmpv6Code = source.getIcmpv6Code();
Short v6code = icmpv6Code.getIcmpv6Code();
if (v6code != null) {
icmpv6MatchBuilder.setIcmpv6Code(v6code);
matchBuilder.setIcmpv6Match(icmpv6MatchBuilder.build());
}
return Optional.of(matchBuilder);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.code._case.Icmpv6Code in project openflowplugin by opendaylight.
the class MatchConvertor method toOfIcmpv6Code.
private static MatchEntry toOfIcmpv6Code(final Short icmpv6Code) {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setOxmMatchField(Icmpv6Code.class);
Icmpv6CodeCaseBuilder icmpv6CodeCaseBuilder = new Icmpv6CodeCaseBuilder();
Icmpv6CodeBuilder icmpv6CodeBuilder = new Icmpv6CodeBuilder();
icmpv6CodeBuilder.setIcmpv6Code(icmpv6Code);
icmpv6CodeCaseBuilder.setIcmpv6Code(icmpv6CodeBuilder.build());
matchEntryBuilder.setMatchEntryValue(icmpv6CodeCaseBuilder.build());
return matchEntryBuilder.build();
}
Aggregations