use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class OxmIpv6FlabelDeserializer method addIpv6FlabelValue.
private static void addIpv6FlabelValue(ByteBuf input, MatchEntryBuilder builder) {
Ipv6FlabelCaseBuilder caseBuilder = new Ipv6FlabelCaseBuilder();
Ipv6FlabelBuilder labelBuilder = new Ipv6FlabelBuilder();
labelBuilder.setIpv6Flabel(new Ipv6FlowLabel(input.readUnsignedInt()));
if (builder.isHasMask()) {
labelBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.SIZE_OF_INT_IN_BYTES));
}
caseBuilder.setIpv6Flabel(labelBuilder.build());
builder.setMatchEntryValue(caseBuilder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class OxmIpv6NdTargetDeserializer method addIpv6NdTargetValue.
private static void addIpv6NdTargetValue(final ByteBuf input, final MatchEntryBuilder builder) {
Ipv6NdTargetCaseBuilder caseBuilder = new Ipv6NdTargetCaseBuilder();
Ipv6NdTargetBuilder ipv6Builder = new Ipv6NdTargetBuilder();
ipv6Builder.setIpv6Address(ByteBufUtils.readIetfIpv6Address(input));
caseBuilder.setIpv6NdTarget(ipv6Builder.build());
builder.setMatchEntryValue(caseBuilder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class OxmIpv6SrcDeserializer method deserialize.
@Override
public MatchEntry deserialize(final ByteBuf input) {
MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
addIpv6SrcValue(input, builder);
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class CtMarkConvertor method convert.
/*
* (non-Javadoc)
*
* @see
* org.opendaylight.openflowplugin.extension.api.ConvertorToOFJava#convert
* (org
* .opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general
* .rev140714.general.extension.grouping.Extension)
*/
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxCtMarkGrouping> matchGrouping = MatchUtil.CT_MARK_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
CtMarkCaseValueBuilder ctMarkCaseValueBuilder = new CtMarkCaseValueBuilder();
CtMarkValuesBuilder ctMarkValuesBuilder = new CtMarkValuesBuilder();
ctMarkValuesBuilder.setCtMark(matchGrouping.get().getNxmNxCtMark().getCtMark());
ctMarkValuesBuilder.setMask(matchGrouping.get().getNxmNxCtMark().getMask());
ctMarkCaseValueBuilder.setCtMarkValues(ctMarkValuesBuilder.build());
MatchEntryBuilder ofMatch = MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtMark.class, Nxm1Class.class, ctMarkCaseValueBuilder.build());
ofMatch.setHasMask(true);
return ofMatch.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class CtZoneConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxCtZoneGrouping> matchGrouping = MatchUtil.CT_ZONE_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
CtZoneCaseValueBuilder ctZoneCaseValueBuilder = new CtZoneCaseValueBuilder();
CtZoneValuesBuilder ctZoneValuesBuilder = new CtZoneValuesBuilder();
ctZoneValuesBuilder.setCtZone(matchGrouping.get().getNxmNxCtZone().getCtZone());
ctZoneCaseValueBuilder.setCtZoneValues(ctZoneValuesBuilder.build());
MatchEntryBuilder ofMatch = MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtZone.class, Nxm1Class.class, ctZoneCaseValueBuilder.build());
return ofMatch.build();
}
Aggregations