Search in sources :

Example 1 with Icmpv6Type

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");
    }
}
Also used : Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder)

Example 2 with 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();
}
Also used : MatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder) Icmpv6TypeBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.type._case.Icmpv6TypeBuilder) Icmpv6TypeCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6TypeCaseBuilder)

Example 3 with Icmpv6Type

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);
}
Also used : Icmpv6Type(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.type._case.Icmpv6Type) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder) Icmpv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder)

Aggregations

Icmpv6MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder)2 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder)1 MatchEntryBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder)1 Icmpv6TypeCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv6TypeCaseBuilder)1 Icmpv6Type (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.type._case.Icmpv6Type)1 Icmpv6TypeBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv6.type._case.Icmpv6TypeBuilder)1