use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type in project openflowplugin by opendaylight.
the class Icmpv6TypeEntryDeserializer method deserializeEntry.
@Override
public void deserializeEntry(ByteBuf message, MatchBuilder builder) {
processHeader(message);
final short type = message.readUnsignedByte();
if (Objects.isNull(builder.getIcmpv6Match())) {
builder.setIcmpv6Match(new Icmpv6MatchBuilder().setIcmpv6Type(type).build());
} else if (Objects.isNull(builder.getIcmpv6Match().getIcmpv6Type())) {
builder.setIcmpv6Match(new Icmpv6MatchBuilder(builder.getIcmpv6Match()).setIcmpv6Type(type).build());
} else {
throwErrorOnMalformed(builder, "icmpv6Match", "icmpv6Type");
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type in project openflowplugin by opendaylight.
the class MatchConvertor method toOfIcmpv6Type.
private static MatchEntry toOfIcmpv6Type(final Short icmpv6Type) {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setOxmMatchField(Icmpv6Type.class);
Icmpv6TypeCaseBuilder icmpv6TypeCaseBuilder = new Icmpv6TypeCaseBuilder();
Icmpv6TypeBuilder icmpv6TypeBuilder = new Icmpv6TypeBuilder();
icmpv6TypeBuilder.setIcmpv6Type(icmpv6Type);
icmpv6TypeCaseBuilder.setIcmpv6Type(icmpv6TypeBuilder.build());
matchEntryBuilder.setMatchEntryValue(icmpv6TypeCaseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type in project openflowplugin by opendaylight.
the class OfToSalIcmpv6TypeCase method process.
@Override
public Optional<MatchBuilder> process(@Nonnull Icmpv6TypeCase source, MatchResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final MatchBuilder matchBuilder = data.getMatchBuilder();
final Icmpv6MatchBuilder icmpv6MatchBuilder = data.getIcmpv6MatchBuilder();
Icmpv6Type icmpv6Type = source.getIcmpv6Type();
Short v6type = icmpv6Type.getIcmpv6Type();
if (v6type != null) {
icmpv6MatchBuilder.setIcmpv6Type(v6type);
matchBuilder.setIcmpv6Match(icmpv6MatchBuilder.build());
}
return Optional.of(matchBuilder);
}
Aggregations