public class SwitchConnectionProviderFactoryImpl implements SwitchConnectionProviderFactory {
@Override
- public SwitchConnectionProvider newInstance(SwitchConnectionConfig config,
- OpenflowDiagStatusProvider openflowPluginDiagStatusProvider) {
+ public SwitchConnectionProvider newInstance(final SwitchConnectionConfig config,
+ final OpenflowDiagStatusProvider openflowPluginDiagStatusProvider) {
return new SwitchConnectionProviderImpl(new ConnectionConfigurationImpl(config),
openflowPluginDiagStatusProvider);
}
private final SwitchConnectionConfig config;
private InetAddress address;
- ConnectionConfigurationImpl(SwitchConnectionConfig config) {
+ ConnectionConfigurationImpl(final SwitchConnectionConfig config) {
this.config = config;
try {
@Override
public boolean useBarrier() {
- return config.isUseBarrier();
+ return config.getUseBarrier();
}
@Override
public boolean isGroupAddModEnabled() {
- return config.isGroupAddModEnabled();
+ return config.getGroupAddModEnabled();
}
private static InetAddress getInetAddress(final IpAddress address) throws UnknownHostException {
private static final Logger LOG = LoggerFactory.getLogger(OutboundQueueEntry.class);
public static final Function<OfHeader, Boolean> DEFAULT_IS_COMPLETE = message -> {
if (message instanceof MultipartReplyMessage) {
- return !((MultipartReplyMessage) message).getFlags().isOFPMPFREQMORE();
+ return !((MultipartReplyMessage) message).getFlags().getOFPMPFREQMORE();
}
return true;
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final ArpShaBuilder shaBuilder = new ArpShaBuilder()
.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
shaBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
}
builder.setMatchEntryValue(new ArpShaCaseBuilder().setArpSha(shaBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final ArpSpaBuilder arpBuilder = new ArpSpaBuilder()
.setIpv4Address(ByteBufUtils.readIetfIpv4Address(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
arpBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
}
builder.setMatchEntryValue(new ArpSpaCaseBuilder().setArpSpa(arpBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final ArpThaBuilder thaBuilder = new ArpThaBuilder()
.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
thaBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
}
builder.setMatchEntryValue(new ArpThaCaseBuilder().setArpTha(thaBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final ArpTpaBuilder arpBuilder = new ArpTpaBuilder()
.setIpv4Address(ByteBufUtils.readIetfIpv4Address(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
arpBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
}
builder.setMatchEntryValue(new ArpTpaCaseBuilder().setArpTpa(arpBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final EthDstBuilder ethBuilder = new EthDstBuilder()
.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
ethBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
}
builder.setMatchEntryValue(new EthDstCaseBuilder().setEthDst(ethBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final EthSrcBuilder ethBuilder = new EthSrcBuilder()
.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
ethBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
}
builder.setMatchEntryValue(new EthSrcCaseBuilder().setEthSrc(ethBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final Ipv4DstBuilder ipv4Builder = new Ipv4DstBuilder()
.setIpv4Address(ByteBufUtils.readIetfIpv4Address(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
ipv4Builder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
}
builder.setMatchEntryValue(new Ipv4DstCaseBuilder().setIpv4Dst(ipv4Builder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final Ipv4SrcBuilder ipv4Builder = new Ipv4SrcBuilder()
.setIpv4Address(ByteBufUtils.readIetfIpv4Address(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
ipv4Builder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.GROUPS_IN_IPV4_ADDRESS));
}
builder.setMatchEntryValue(new Ipv4SrcCaseBuilder().setIpv4Src(ipv4Builder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final Ipv6DstBuilder ipv6Builder = new Ipv6DstBuilder()
.setIpv6Address(ByteBufUtils.readIetfIpv6Address(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
ipv6Builder.setMask(OxmDeserializerHelper.convertMask(input,
EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES));
}
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final Ipv6ExthdrBuilder extHdrBuilder = new Ipv6ExthdrBuilder()
.setPseudoField(convertPseudofields(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
extHdrBuilder.setMask(OxmDeserializerHelper.convertMask(input, Short.BYTES));
}
builder.setMatchEntryValue(new Ipv6ExthdrCaseBuilder().setIpv6Exthdr(extHdrBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final Ipv6FlabelBuilder labelBuilder = new Ipv6FlabelBuilder()
.setIpv6Flabel(new Ipv6FlowLabel(readUint32(input)));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
labelBuilder.setMask(OxmDeserializerHelper.convertMask(input, Integer.BYTES));
}
builder.setMatchEntryValue(new Ipv6FlabelCaseBuilder().setIpv6Flabel(labelBuilder.build()).build());
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
final Ipv6SrcBuilder ipv6Builder = new Ipv6SrcBuilder()
.setIpv6Address(ByteBufUtils.readIetfIpv6Address(input));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
ipv6Builder.setMask(OxmDeserializerHelper.convertMask(input,
EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES));
}
input.readBytes(metadataBytes);
final MetadataBuilder metadataBuilder = new MetadataBuilder().setMetadata(metadataBytes);
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
metadataBuilder.setMask(OxmDeserializerHelper.convertMask(input, Long.BYTES));
}
builder.setMatchEntryValue(new MetadataCaseBuilder().setMetadata(metadataBuilder.build()).build());
final int isid = input.readUnsignedMedium();
final PbbIsidBuilder isidBuilder = new PbbIsidBuilder()
.setIsid(Uint32.valueOf(isid));
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
isidBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.SIZE_OF_3_BYTES));
}
builder.setMatchEntryValue(new PbbIsidCaseBuilder().setPbbIsid(isidBuilder.build()).build());
input.readBytes(metadataBytes);
final TunnelIdBuilder tunnelIdBuilder = new TunnelIdBuilder()
.setTunnelId(metadataBytes);
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
tunnelIdBuilder.setMask(OxmDeserializerHelper.convertMask(input, Long.BYTES));
}
builder.setMatchEntryValue(new TunnelIdCaseBuilder().setTunnelId(tunnelIdBuilder.build()).build());
final VlanVidBuilder vlanBuilder = new VlanVidBuilder()
.setCfiBit((vidEntryValue & 1 << 12) != 0) // cfi is 13-th bit
.setVlanVid(Uint16.valueOf(vidEntryValue & (1 << 12) - 1)); // value without 13-th bit
- if (builder.isHasMask()) {
+ if (builder.getHasMask()) {
vlanBuilder.setMask(OxmDeserializerHelper.convertMask(input, Short.BYTES));
}
builder.setMatchEntryValue(new VlanVidCaseBuilder().setVlanVid(vlanBuilder.build()).build());
@Override
protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
ExperimenterIdCaseBuilder expCaseBuilder = createExperimenterIdCase(builder, input);
- addTcpFlagsAugmentation(input, expCaseBuilder, builder.isHasMask());
+ addTcpFlagsAugmentation(input, expCaseBuilder, builder.getHasMask());
builder.setMatchEntryValue(expCaseBuilder.build());
}
* 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.openflowjava.protocol.impl.serialization.factories;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
private static int createFlowModFlagsBitmask(final FlowModFlags flags) {
return ByteBufUtils.fillBitMask(0,
- flags.isOFPFFSENDFLOWREM(),
- flags.isOFPFFCHECKOVERLAP(),
- flags.isOFPFFRESETCOUNTS(),
- flags.isOFPFFNOPKTCOUNTS(),
- flags.isOFPFFNOBYTCOUNTS());
+ flags.getOFPFFSENDFLOWREM(),
+ flags.getOFPFFCHECKOVERLAP(),
+ flags.getOFPFFRESETCOUNTS(),
+ flags.getOFPFFNOPKTCOUNTS(),
+ flags.getOFPFFNOBYTCOUNTS());
}
}
private static final byte PADDING = 2;
@Override
- public void serialize(GetFeaturesOutput message, ByteBuf outBuffer) {
+ public void serialize(final GetFeaturesOutput message, final ByteBuf outBuffer) {
ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH);
outBuffer.writeLong(message.getDatapathId().longValue());
outBuffer.writeInt(message.getBuffers().intValue());
public void injectSerializerRegistry(final SerializerRegistry serializerRegistry) {
}
- private static void writeCapabilities(Capabilities capabilities, ByteBuf outBuffer) {
+ private static void writeCapabilities(final Capabilities capabilities, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, capabilities.isOFPCFLOWSTATS());
- map.put(1, capabilities.isOFPCTABLESTATS());
- map.put(2, capabilities.isOFPCPORTSTATS());
- map.put(3, capabilities.isOFPCGROUPSTATS());
- map.put(5, capabilities.isOFPCIPREASM());
- map.put(6, capabilities.isOFPCQUEUESTATS());
- map.put(8, capabilities.isOFPCPORTBLOCKED());
+ map.put(0, capabilities.getOFPCFLOWSTATS());
+ map.put(1, capabilities.getOFPCTABLESTATS());
+ map.put(2, capabilities.getOFPCPORTSTATS());
+ map.put(3, capabilities.getOFPCGROUPSTATS());
+ map.put(5, capabilities.getOFPCIPREASM());
+ map.put(6, capabilities.getOFPCQUEUESTATS());
+ map.put(8, capabilities.getOFPCPORTBLOCKED());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
* 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.openflowjava.protocol.impl.serialization.factories;
import io.netty.buffer.ByteBuf;
private static int createMeterFlagsBitmask(final MeterFlags flags) {
return ByteBufUtils.fillBitMask(0,
- flags.isOFPMFKBPS(),
- flags.isOFPMFPKTPS(),
- flags.isOFPMFBURST(),
- flags.isOFPMFSTATS());
+ flags.getOFPMFKBPS(),
+ flags.getOFPMFPKTPS(),
+ flags.getOFPMFBURST(),
+ flags.getOFPMFSTATS());
}
private void serializeBands(final List<Bands> bands, final ByteBuf outBuffer) {
private static void writeFlags(final MultipartRequestFlags flags, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, flags.isOFPMPFREQMORE());
+ map.put(0, flags.getOFPMPFREQMORE());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeShort(bitmap);
}
private static void writeTableConfig(final TableConfig tableConfig, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, tableConfig.isOFPTCDEPRECATEDMASK());
+ map.put(0, tableConfig.getOFPTCDEPRECATEDMASK());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writeBandTypes(final MeterBandTypeBitmap bandTypes, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, bandTypes.isOFPMBTDROP());
- map.put(1, bandTypes.isOFPMBTDSCPREMARK());
+ map.put(0, bandTypes.getOFPMBTDROP());
+ map.put(1, bandTypes.getOFPMBTDSCPREMARK());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writeMeterFlags(final MeterFlags flags, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, flags.isOFPMFKBPS());
- map.put(1, flags.isOFPMFPKTPS());
- map.put(2, flags.isOFPMFBURST());
- map.put(3, flags.isOFPMFSTATS());
+ map.put(0, flags.getOFPMFKBPS());
+ map.put(1, flags.getOFPMFPKTPS());
+ map.put(2, flags.getOFPMFBURST());
+ map.put(3, flags.getOFPMFSTATS());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeShort(bitmap);
}
private static void writeActionType(final ActionType action, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, action.isOFPATOUTPUT());
- map.put(1, action.isOFPATCOPYTTLOUT());
- map.put(2, action.isOFPATCOPYTTLIN());
- map.put(3, action.isOFPATSETMPLSTTL());
- map.put(4, action.isOFPATDECMPLSTTL());
- map.put(5, action.isOFPATPUSHVLAN());
- map.put(6, action.isOFPATPOPVLAN());
- map.put(7, action.isOFPATPUSHMPLS());
- map.put(8, action.isOFPATPOPMPLS());
- map.put(9, action.isOFPATSETQUEUE());
- map.put(10, action.isOFPATGROUP());
- map.put(11, action.isOFPATSETNWTTL());
- map.put(12, action.isOFPATDECNWTTL());
- map.put(13, action.isOFPATSETFIELD());
- map.put(14, action.isOFPATPUSHPBB());
- map.put(15, action.isOFPATPOPPBB());
- map.put(16, action.isOFPATEXPERIMENTER());
+ map.put(0, action.getOFPATOUTPUT());
+ map.put(1, action.getOFPATCOPYTTLOUT());
+ map.put(2, action.getOFPATCOPYTTLIN());
+ map.put(3, action.getOFPATSETMPLSTTL());
+ map.put(4, action.getOFPATDECMPLSTTL());
+ map.put(5, action.getOFPATPUSHVLAN());
+ map.put(6, action.getOFPATPOPVLAN());
+ map.put(7, action.getOFPATPUSHMPLS());
+ map.put(8, action.getOFPATPOPMPLS());
+ map.put(9, action.getOFPATSETQUEUE());
+ map.put(10, action.getOFPATGROUP());
+ map.put(11, action.getOFPATSETNWTTL());
+ map.put(12, action.getOFPATDECNWTTL());
+ map.put(13, action.getOFPATSETFIELD());
+ map.put(14, action.getOFPATPUSHPBB());
+ map.put(15, action.getOFPATPOPPBB());
+ map.put(16, action.getOFPATEXPERIMENTER());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writeGroupCapabilities(final GroupCapabilities capabilities, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, capabilities.isOFPGFCSELECTWEIGHT());
- map.put(1, capabilities.isOFPGFCSELECTLIVENESS());
- map.put(2, capabilities.isOFPGFCCHAINING());
- map.put(3, capabilities.isOFPGFCCHAININGCHECKS());
+ map.put(0, capabilities.getOFPGFCSELECTWEIGHT());
+ map.put(1, capabilities.getOFPGFCSELECTLIVENESS());
+ map.put(2, capabilities.getOFPGFCCHAINING());
+ map.put(3, capabilities.getOFPGFCCHAININGCHECKS());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writeGroupTypes(final GroupTypes types, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, types.isOFPGTALL());
- map.put(1, types.isOFPGTSELECT());
- map.put(2, types.isOFPGTINDIRECT());
- map.put(3, types.isOFPGTFF());
+ map.put(0, types.getOFPGTALL());
+ map.put(1, types.getOFPGTSELECT());
+ map.put(2, types.getOFPGTINDIRECT());
+ map.put(3, types.getOFPGTFF());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortConfig(final PortConfig config, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, config.isPortDown());
- map.put(2, config.isNoRecv());
- map.put(5, config.isNoFwd());
- map.put(6, config.isNoPacketIn());
+ map.put(0, config.getPortDown());
+ map.put(2, config.getNoRecv());
+ map.put(5, config.getNoFwd());
+ map.put(6, config.getNoPacketIn());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortState(final PortState state, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, state.isLinkDown());
- map.put(1, state.isBlocked());
- map.put(2, state.isLive());
+ map.put(0, state.getLinkDown());
+ map.put(1, state.getBlocked());
+ map.put(2, state.getLive());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortFeatures(final PortFeatures features, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, features.is_10mbHd());
- map.put(1, features.is_10mbFd());
- map.put(2, features.is_100mbHd());
- map.put(3, features.is_100mbFd());
- map.put(4, features.is_1gbHd());
- map.put(5, features.is_1gbFd());
- map.put(6, features.is_10gbFd());
- map.put(7, features.is_40gbFd());
- map.put(8, features.is_100gbFd());
- map.put(9, features.is_1tbFd());
- map.put(10, features.isOther());
- map.put(11, features.isCopper());
- map.put(12, features.isFiber());
- map.put(13, features.isAutoneg());
- map.put(14, features.isPause());
- map.put(15, features.isPauseAsym());
+ map.put(0, features.get_10mbHd());
+ map.put(1, features.get_10mbFd());
+ map.put(2, features.get_100mbHd());
+ map.put(3, features.get_100mbFd());
+ map.put(4, features.get_1gbHd());
+ map.put(5, features.get_1gbFd());
+ map.put(6, features.get_10gbFd());
+ map.put(7, features.get_40gbFd());
+ map.put(8, features.get_100gbFd());
+ map.put(9, features.get_1tbFd());
+ map.put(10, features.getOther());
+ map.put(11, features.getCopper());
+ map.put(12, features.getFiber());
+ map.put(13, features.getAutoneg());
+ map.put(14, features.getPause());
+ map.put(15, features.getPauseAsym());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
* 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.openflowjava.protocol.impl.serialization.factories;
import io.netty.buffer.ByteBuf;
}
private static int createMultipartRequestFlagsBitmask(final MultipartRequestFlags flags) {
- return ByteBufUtils.fillBitMask(0, flags.isOFPMPFREQMORE());
+ return ByteBufUtils.fillBitMask(0, flags.getOFPMPFREQMORE());
}
private void serializeDescBody() {
writeOxmRelatedTableProperty(output, property, APPLY_SETFIELD_CODE);
} else if (type.equals(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS)) {
writeOxmRelatedTableProperty(output, property, APPLY_SETFIELD_MISS_CODE);
- } else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTER)) {
- writeExperimenterRelatedTableProperty(output, property);
- } else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS)) {
+ } else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTER)
+ || type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS)) {
writeExperimenterRelatedTableProperty(output, property);
}
}
}
private static int createTableConfigBitmask(final TableConfig tableConfig) {
- return ByteBufUtils.fillBitMask(3, tableConfig.isOFPTCDEPRECATEDMASK());
+ return ByteBufUtils.fillBitMask(3, tableConfig.getOFPTCDEPRECATEDMASK());
}
@Override
private static void writePortFeature(final PortFeaturesV10 feature, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, feature.is_10mbHd());
- map.put(1, feature.is_10mbFd());
- map.put(2, feature.is_100mbHd());
- map.put(3, feature.is_100mbFd());
- map.put(4, feature.is_1gbHd());
- map.put(5, feature.is_1gbFd());
- map.put(6, feature.is_10gbFd());
- map.put(7, feature.isCopper());
- map.put(8, feature.isFiber());
- map.put(9, feature.isAutoneg());
- map.put(10, feature.isPause());
- map.put(11, feature.isPauseAsym());
+ map.put(0, feature.get_10mbHd());
+ map.put(1, feature.get_10mbFd());
+ map.put(2, feature.get_100mbHd());
+ map.put(3, feature.get_100mbFd());
+ map.put(4, feature.get_1gbHd());
+ map.put(5, feature.get_1gbFd());
+ map.put(6, feature.get_10gbFd());
+ map.put(7, feature.getCopper());
+ map.put(8, feature.getFiber());
+ map.put(9, feature.getAutoneg());
+ map.put(10, feature.getPause());
+ map.put(11, feature.getPauseAsym());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortState(final PortStateV10 state, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, state.isLinkDown());
- map.put(1, state.isBlocked());
- map.put(2, state.isLive());
- map.put(3, state.isStpListen());
- map.put(4, state.isStpLearn());
- map.put(5, state.isStpForward());
- map.put(6, state.isStpBlock());
- map.put(7, state.isStpMask());
+ map.put(0, state.getLinkDown());
+ map.put(1, state.getBlocked());
+ map.put(2, state.getLive());
+ map.put(3, state.getStpListen());
+ map.put(4, state.getStpLearn());
+ map.put(5, state.getStpForward());
+ map.put(6, state.getStpBlock());
+ map.put(7, state.getStpMask());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortConfig(final PortConfigV10 config, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, config.isPortDown());
- map.put(1, config.isNoStp());
- map.put(2, config.isNoRecv());
- map.put(3, config.isNoRecvStp());
- map.put(4, config.isNoFlood());
- map.put(5, config.isNoFwd());
- map.put(6, config.isNoPacketIn());
+ map.put(0, config.getPortDown());
+ map.put(1, config.getNoStp());
+ map.put(2, config.getNoRecv());
+ map.put(3, config.getNoRecvStp());
+ map.put(4, config.getNoFlood());
+ map.put(5, config.getNoFwd());
+ map.put(6, config.getNoPacketIn());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static int createCapabilities(final CapabilitiesV10 capabilities) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, capabilities.isOFPCFLOWSTATS());
- map.put(1, capabilities.isOFPCTABLESTATS());
- map.put(2, capabilities.isOFPCPORTSTATS());
- map.put(3, capabilities.isOFPCSTP());
- map.put(4, capabilities.isOFPCRESERVED());
- map.put(5, capabilities.isOFPCIPREASM());
- map.put(6, capabilities.isOFPCQUEUESTATS());
- map.put(7, capabilities.isOFPCARPMATCHIP());
+ map.put(0, capabilities.getOFPCFLOWSTATS());
+ map.put(1, capabilities.getOFPCTABLESTATS());
+ map.put(2, capabilities.getOFPCPORTSTATS());
+ map.put(3, capabilities.getOFPCSTP());
+ map.put(4, capabilities.getOFPCRESERVED());
+ map.put(5, capabilities.getOFPCIPREASM());
+ map.put(6, capabilities.getOFPCQUEUESTATS());
+ map.put(7, capabilities.getOFPCARPMATCHIP());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
return bitmap;
}
private static int createActionsV10(final ActionTypeV10 action) {
- return ByteBufUtils.fillBitMask(0, action.isOFPATOUTPUT(), action.isOFPATSETVLANVID(),
- action.isOFPATSETVLANPCP(), action.isOFPATSTRIPVLAN(), action.isOFPATSETDLSRC(),
- action.isOFPATSETDLDST(), action.isOFPATSETNWSRC(), action.isOFPATSETNWDST(), action.isOFPATSETNWTOS(),
- action.isOFPATSETTPSRC(), action.isOFPATSETTPDST(), action.isOFPATENQUEUE(), action.isOFPATVENDOR());
-
+ return ByteBufUtils.fillBitMask(0, action.getOFPATOUTPUT(), action.getOFPATSETVLANVID(),
+ action.getOFPATSETVLANPCP(), action.getOFPATSTRIPVLAN(), action.getOFPATSETDLSRC(),
+ action.getOFPATSETDLDST(), action.getOFPATSETNWSRC(), action.getOFPATSETNWDST(),
+ action.getOFPATSETNWTOS(), action.getOFPATSETTPSRC(), action.getOFPATSETTPDST(),
+ action.getOFPATENQUEUE(), action.getOFPATVENDOR());
}
private static void writeName(final String name, final ByteBuf outBuffer) {
* 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.openflowjava.protocol.impl.serialization.factories;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
private static int createFlowModFlagsBitmask(final FlowModFlagsV10 flags) {
return ByteBufUtils.fillBitMask(0,
- flags.isOFPFFSENDFLOWREM(),
- flags.isOFPFFCHECKOVERLAP(),
- flags.isOFPFFEMERG());
+ flags.getOFPFFSENDFLOWREM(),
+ flags.getOFPFFCHECKOVERLAP(),
+ flags.getOFPFFEMERG());
}
@Override
private static int createPortConfigBitmask(final PortConfigV10 config) {
return ByteBufUtils.fillBitMask(0,
- config.isPortDown(),
- config.isNoStp(),
- config.isNoRecv(),
- config.isNoRecvStp(),
- config.isNoFlood(),
- config.isNoFwd(),
- config.isNoPacketIn());
+ config.getPortDown(),
+ config.getNoStp(),
+ config.getNoRecv(),
+ config.getNoRecvStp(),
+ config.getNoFlood(),
+ config.getNoFwd(),
+ config.getNoPacketIn());
}
private static int createPortFeaturesBitmask(final PortFeaturesV10 feature) {
return ByteBufUtils.fillBitMask(0,
- feature.is_10mbHd(),
- feature.is_10mbFd(),
- feature.is_100mbHd(),
- feature.is_100mbFd(),
- feature.is_1gbHd(),
- feature.is_1gbFd(),
- feature.is_10gbFd(),
- feature.isCopper(),
- feature.isFiber(),
- feature.isAutoneg(),
- feature.isPause(),
- feature.isPauseAsym());
+ feature.get_10mbHd(),
+ feature.get_10mbFd(),
+ feature.get_100mbHd(),
+ feature.get_100mbFd(),
+ feature.get_1gbHd(),
+ feature.get_1gbFd(),
+ feature.get_10gbFd(),
+ feature.getCopper(),
+ feature.getFiber(),
+ feature.getAutoneg(),
+ feature.getPause(),
+ feature.getPauseAsym());
}
}
private static void writePortFeature(final PortFeaturesV10 feature, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, feature.is_10mbHd());
- map.put(1, feature.is_10mbFd());
- map.put(2, feature.is_100mbHd());
- map.put(3, feature.is_100mbFd());
- map.put(4, feature.is_1gbHd());
- map.put(5, feature.is_1gbFd());
- map.put(6, feature.is_10gbFd());
- map.put(7, feature.isCopper());
- map.put(8, feature.isFiber());
- map.put(9, feature.isAutoneg());
- map.put(10, feature.isPause());
- map.put(11, feature.isPauseAsym());
+ map.put(0, feature.get_10mbHd());
+ map.put(1, feature.get_10mbFd());
+ map.put(2, feature.get_100mbHd());
+ map.put(3, feature.get_100mbFd());
+ map.put(4, feature.get_1gbHd());
+ map.put(5, feature.get_1gbFd());
+ map.put(6, feature.get_10gbFd());
+ map.put(7, feature.getCopper());
+ map.put(8, feature.getFiber());
+ map.put(9, feature.getAutoneg());
+ map.put(10, feature.getPause());
+ map.put(11, feature.getPauseAsym());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortState(final PortStateV10 state, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, state.isLinkDown());
- map.put(1, state.isBlocked());
- map.put(2, state.isLive());
- map.put(3, state.isStpListen());
- map.put(4, state.isStpLearn());
- map.put(5, state.isStpForward());
- map.put(6, state.isStpBlock());
- map.put(7, state.isStpMask());
+ map.put(0, state.getLinkDown());
+ map.put(1, state.getBlocked());
+ map.put(2, state.getLive());
+ map.put(3, state.getStpListen());
+ map.put(4, state.getStpLearn());
+ map.put(5, state.getStpForward());
+ map.put(6, state.getStpBlock());
+ map.put(7, state.getStpMask());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortConfig(final PortConfigV10 config, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, config.isPortDown());
- map.put(1, config.isNoStp());
- map.put(2, config.isNoRecv());
- map.put(3, config.isNoRecvStp());
- map.put(4, config.isNoFlood());
- map.put(5, config.isNoFwd());
- map.put(6, config.isNoPacketIn());
+ map.put(0, config.getPortDown());
+ map.put(1, config.getNoStp());
+ map.put(2, config.getNoRecv());
+ map.put(3, config.getNoRecvStp());
+ map.put(4, config.getNoFlood());
+ map.put(5, config.getNoFwd());
+ map.put(6, config.getNoPacketIn());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static final byte PORT_STATS_PADDING = 6;
@Override
- public void injectSerializerRegistry(SerializerRegistry serializerRegistry) {
+ public void injectSerializerRegistry(final SerializerRegistry serializerRegistry) {
registry = serializerRegistry;
}
@Override
- public void serialize(MultipartReplyMessage message, ByteBuf outBuffer) {
+ public void serialize(final MultipartReplyMessage message, final ByteBuf outBuffer) {
Objects.requireNonNull(registry);
ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH);
ByteBufUtils.updateOFHeaderLength(outBuffer);
}
- private void serializeExperimenterBody(MultipartReplyBody body, ByteBuf outBuffer) {
+ private void serializeExperimenterBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
// MultipartReplyExperimenterCase experimenterCase = (MultipartReplyExperimenterCase) body;
// MultipartReplyExperimenter experimenterBody = experimenterCase.getMultipartReplyExperimenter();
// TODO: experimenterBody does not have get methods
}
- private static void serializeQueueBody(MultipartReplyBody body, ByteBuf outBuffer) {
+ private static void serializeQueueBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
MultipartReplyQueueCase queueCase = (MultipartReplyQueueCase) body;
MultipartReplyQueue queue = queueCase.getMultipartReplyQueue();
for (QueueStats queueStats : queue.getQueueStats()) {
}
}
- private static void serializePortStatsBody(MultipartReplyBody body, ByteBuf outBuffer) {
+ private static void serializePortStatsBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
MultipartReplyPortStatsCase portStatsCase = (MultipartReplyPortStatsCase) body;
MultipartReplyPortStats portStats = portStatsCase.getMultipartReplyPortStats();
for (PortStats portStat : portStats.getPortStats()) {
}
}
- private static void serializeTableBody(MultipartReplyBody body, ByteBuf outBuffer) {
+ private static void serializeTableBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
MultipartReplyTableCase tableCase = (MultipartReplyTableCase) body;
MultipartReplyTable table = tableCase.getMultipartReplyTable();
for (TableStats tableStats : table.getTableStats()) {
}
}
- private static void writeFlowWildcardsV10(FlowWildcardsV10 feature, ByteBuf outBuffer) {
+ private static void writeFlowWildcardsV10(final FlowWildcardsV10 feature, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, feature.isINPORT());
- map.put(1, feature.isDLVLAN());
- map.put(2, feature.isDLSRC());
- map.put(3, feature.isDLDST());
- map.put(4, feature.isDLTYPE());
- map.put(5, feature.isNWPROTO());
- map.put(6, feature.isTPSRC());
- map.put(7, feature.isTPDST());
- map.put(20, feature.isDLVLANPCP());
- map.put(21, feature.isNWTOS());
+ map.put(0, feature.getINPORT());
+ map.put(1, feature.getDLVLAN());
+ map.put(2, feature.getDLSRC());
+ map.put(3, feature.getDLDST());
+ map.put(4, feature.getDLTYPE());
+ map.put(5, feature.getNWPROTO());
+ map.put(6, feature.getTPSRC());
+ map.put(7, feature.getTPDST());
+ map.put(20, feature.getDLVLANPCP());
+ map.put(21, feature.getNWTOS());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
- private static void serializeAggregateBody(MultipartReplyBody body, ByteBuf outBuffer) {
+ private static void serializeAggregateBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
MultipartReplyAggregateCase aggregateCase = (MultipartReplyAggregateCase) body;
MultipartReplyAggregate aggregate = aggregateCase.getMultipartReplyAggregate();
outBuffer.writeLong(aggregate.getPacketCount().longValue());
outBuffer.writeZero(AGGREGATE_PADDING);
}
- private void serializeFlowBody(MultipartReplyBody body, ByteBuf outBuffer, MultipartReplyMessage message) {
+ private void serializeFlowBody(final MultipartReplyBody body, final ByteBuf outBuffer,
+ final MultipartReplyMessage message) {
MultipartReplyFlowCase flowCase = (MultipartReplyFlowCase) body;
MultipartReplyFlow flow = flowCase.getMultipartReplyFlow();
for (FlowStats flowStats : flow.getFlowStats()) {
}
}
- private static void writeFlags(MultipartRequestFlags flags, ByteBuf outBuffer) {
+ private static void writeFlags(final MultipartRequestFlags flags, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, flags.isOFPMPFREQMORE());
+ map.put(0, flags.getOFPMPFREQMORE());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeShort(bitmap);
}
- private static void serializeDescBody(MultipartReplyBody body, ByteBuf outBuffer) {
+ private static void serializeDescBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
MultipartReplyDescCase descCase = (MultipartReplyDescCase) body;
MultipartReplyDesc desc = descCase.getMultipartReplyDesc();
write256String(desc.getMfrDesc(), outBuffer);
write256String(desc.getDpDesc(), outBuffer);
}
- private static void write256String(String toWrite, ByteBuf outBuffer) {
+ private static void write256String(final String toWrite, final ByteBuf outBuffer) {
byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
if (nameBytes.length < 256) {
byte[] nameBytesPadding = new byte[256];
}
}
- private static void write16String(String toWrite, ByteBuf outBuffer) {
+ private static void write16String(final String toWrite, final ByteBuf outBuffer) {
byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
if (nameBytes.length < 16) {
byte[] nameBytesPadding = new byte[16];
}
}
- private static void write32String(String toWrite, ByteBuf outBuffer) {
+ private static void write32String(final String toWrite, final ByteBuf outBuffer) {
byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
if (nameBytes.length < 32) {
byte[] nameBytesPadding = new byte[32];
* 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.openflowjava.protocol.impl.serialization.factories;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
}
private static int createMultipartRequestFlagsBitmask(final MultipartRequestFlags flags) {
- return ByteBufUtils.fillBitMask(0, flags.isOFPMPFREQMORE());
+ return ByteBufUtils.fillBitMask(0, flags.getOFPMPFREQMORE());
}
private void serializeDescBody() {
private static int createPortConfigBitmask(final PortConfig config) {
Map<Integer, Boolean> portConfigMap = new HashMap<>();
- portConfigMap.put(0, config.isPortDown());
- portConfigMap.put(2, config.isNoRecv());
- portConfigMap.put(5, config.isNoFwd());
- portConfigMap.put(6, config.isNoPacketIn());
+ portConfigMap.put(0, config.getPortDown());
+ portConfigMap.put(2, config.getNoRecv());
+ portConfigMap.put(5, config.getNoFwd());
+ portConfigMap.put(6, config.getNoPacketIn());
return ByteBufUtils.fillBitMaskFromMap(portConfigMap);
}
private static int createPortFeaturesBitmask(final PortFeatures feature) {
- return ByteBufUtils.fillBitMask(0, feature.is_10mbHd(),
- feature.is_10mbFd(),
- feature.is_100mbHd(),
- feature.is_100mbFd(),
- feature.is_1gbHd(),
- feature.is_1gbFd(),
- feature.is_10gbFd(),
- feature.is_40gbFd(),
- feature.is_100gbFd(),
- feature.is_1tbFd(),
- feature.isOther(),
- feature.isCopper(),
- feature.isFiber(),
- feature.isAutoneg(),
- feature.isPause(),
- feature.isPauseAsym());
+ return ByteBufUtils.fillBitMask(0, feature.get_10mbHd(),
+ feature.get_10mbFd(),
+ feature.get_100mbHd(),
+ feature.get_100mbFd(),
+ feature.get_1gbHd(),
+ feature.get_1gbFd(),
+ feature.get_10gbFd(),
+ feature.get_40gbFd(),
+ feature.get_100gbFd(),
+ feature.get_1tbFd(),
+ feature.getOther(),
+ feature.getCopper(),
+ feature.getFiber(),
+ feature.getAutoneg(),
+ feature.getPause(),
+ feature.getPauseAsym());
}
}
private static void writePortConfig(final PortConfig config, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, config.isPortDown());
- map.put(2, config.isNoRecv());
- map.put(5, config.isNoFwd());
- map.put(6, config.isNoPacketIn());
+ map.put(0, config.getPortDown());
+ map.put(2, config.getNoRecv());
+ map.put(5, config.getNoFwd());
+ map.put(6, config.getNoPacketIn());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortState(final PortState state, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, state.isLinkDown());
- map.put(1, state.isBlocked());
- map.put(2, state.isLive());
+ map.put(0, state.getLinkDown());
+ map.put(1, state.getBlocked());
+ map.put(2, state.getLive());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
private static void writePortFeatures(final PortFeatures features, final ByteBuf outBuffer) {
Map<Integer, Boolean> map = new HashMap<>();
- map.put(0, features.is_10mbHd());
- map.put(1, features.is_10mbFd());
- map.put(2, features.is_100mbHd());
- map.put(3, features.is_100mbFd());
- map.put(4, features.is_1gbHd());
- map.put(5, features.is_1gbFd());
- map.put(6, features.is_10gbFd());
- map.put(7, features.is_40gbFd());
- map.put(8, features.is_100gbFd());
- map.put(9, features.is_1tbFd());
- map.put(10, features.isOther());
- map.put(11, features.isCopper());
- map.put(12, features.isFiber());
- map.put(13, features.isAutoneg());
- map.put(14, features.isPause());
- map.put(15, features.isPauseAsym());
+ map.put(0, features.get_10mbHd());
+ map.put(1, features.get_10mbFd());
+ map.put(2, features.get_100mbHd());
+ map.put(3, features.get_100mbFd());
+ map.put(4, features.get_1gbHd());
+ map.put(5, features.get_1gbFd());
+ map.put(6, features.get_10gbFd());
+ map.put(7, features.get_40gbFd());
+ map.put(8, features.get_100gbFd());
+ map.put(9, features.get_1tbFd());
+ map.put(10, features.getOther());
+ map.put(11, features.getCopper());
+ map.put(12, features.getFiber());
+ map.put(13, features.getAutoneg());
+ map.put(14, features.getPause());
+ map.put(15, features.getPauseAsym());
int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
outBuffer.writeInt(bitmap);
}
}
private static int createConfigBitmask(final TableConfig tableConfig) {
- return ByteBufUtils.fillBitMask(3, tableConfig.isOFPTCDEPRECATEDMASK());
+ return ByteBufUtils.fillBitMask(3, tableConfig.getOFPTCDEPRECATEDMASK());
}
}
implements OFSerializer<MatchEntry>, HeaderSerializer<MatchEntry> {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
serializeHeader(entry, outBuffer);
}
@Override
- public void serializeHeader(MatchEntry entry, ByteBuf outBuffer) {
+ public void serializeHeader(final MatchEntry entry, final ByteBuf outBuffer) {
outBuffer.writeShort(getOxmClassCode());
- writeOxmFieldAndLength(outBuffer, getOxmFieldCode(), entry.isHasMask(),
- getValueLength());
+ writeOxmFieldAndLength(outBuffer, getOxmFieldCode(), entry.getHasMask(), getValueLength());
}
- protected static void writeMask(byte[] mask, ByteBuf out, int length) {
+ protected static void writeMask(final byte[] mask, final ByteBuf out, final int length) {
if (mask != null && mask.length != length) {
throw new IllegalArgumentException("incorrect length of mask: "
+ mask.length + ", expected: " + length);
out.writeBytes(mask);
}
- protected static void writeOxmFieldAndLength(ByteBuf out, int fieldValue, boolean hasMask, int lengthArg) {
+ protected static void writeOxmFieldAndLength(final ByteBuf out, final int fieldValue, final boolean hasMask,
+ final int lengthArg) {
int fieldAndMask = fieldValue << 1;
int length = lengthArg;
if (hasMask) {
public class OxmArpShaSerializer extends AbstractOxmMacAddressSerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
ArpShaCase entryValue = (ArpShaCase) entry.getMatchEntryValue();
writeMacAddress(entryValue.getArpSha().getMacAddress(), outBuffer);
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getArpSha().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
}
}
super.serialize(entry, outBuffer);
ArpSpaCase entryValue = (ArpSpaCase) entry.getMatchEntryValue();
writeIpv4Address(entryValue.getArpSpa().getIpv4Address(), outBuffer);
- if (entry.isHasMask()) {
- writeMask(entryValue.getArpSpa().getMask(), outBuffer,
- EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+ if (entry.getHasMask()) {
+ writeMask(entryValue.getArpSpa().getMask(), outBuffer, EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
}
}
public class OxmArpThaSerializer extends AbstractOxmMacAddressSerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
ArpThaCase entryValue = (ArpThaCase) entry.getMatchEntryValue();
writeMacAddress(entryValue.getArpTha().getMacAddress(), outBuffer);
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getArpTha().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
}
}
super.serialize(entry, outBuffer);
ArpTpaCase entryValue = (ArpTpaCase) entry.getMatchEntryValue();
writeIpv4Address(entryValue.getArpTpa().getIpv4Address(), outBuffer);
- if (entry.isHasMask()) {
- writeMask(entryValue.getArpTpa().getMask(), outBuffer,
- EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+ if (entry.getHasMask()) {
+ writeMask(entryValue.getArpTpa().getMask(), outBuffer, EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
}
}
public class OxmEthDstSerializer extends AbstractOxmMacAddressSerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
EthDstCase entryValue = (EthDstCase) entry.getMatchEntryValue();
writeMacAddress(entryValue.getEthDst().getMacAddress(), outBuffer);
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getEthDst().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
}
}
public class OxmEthSrcSerializer extends AbstractOxmMacAddressSerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
EthSrcCase entryValue = (EthSrcCase) entry.getMatchEntryValue();
writeMacAddress(entryValue.getEthSrc().getMacAddress(), outBuffer);
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getEthSrc().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
}
}
super.serialize(entry, outBuffer);
Ipv4DstCase entryValue = (Ipv4DstCase) entry.getMatchEntryValue();
writeIpv4Address(entryValue.getIpv4Dst().getIpv4Address(), outBuffer);
- if (entry.isHasMask()) {
- writeMask(entryValue.getIpv4Dst().getMask(), outBuffer,
- EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+ if (entry.getHasMask()) {
+ writeMask(entryValue.getIpv4Dst().getMask(), outBuffer, EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
}
}
super.serialize(entry, outBuffer);
Ipv4SrcCase entryValue = (Ipv4SrcCase) entry.getMatchEntryValue();
writeIpv4Address(entryValue.getIpv4Src().getIpv4Address(), outBuffer);
- if (entry.isHasMask()) {
- writeMask(entryValue.getIpv4Src().getMask(), outBuffer,
- EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
+ if (entry.getHasMask()) {
+ writeMask(entryValue.getIpv4Src().getMask(), outBuffer, EncodeConstants.GROUPS_IN_IPV4_ADDRESS);
}
}
public class OxmIpv6DstSerializer extends AbstractOxmIpv6AddressSerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
Ipv6DstCase entryValue = (Ipv6DstCase) entry.getMatchEntryValue();
writeIpv6Address(entryValue.getIpv6Dst().getIpv6Address().getValue(), outBuffer);
- if (entry.isHasMask()) {
- writeMask(entryValue.getIpv6Dst().getMask(), outBuffer,
- EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES);
+ if (entry.getHasMask()) {
+ writeMask(entryValue.getIpv6Dst().getMask(), outBuffer, EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES);
}
}
*/
public class OxmIpv6ExtHdrSerializer extends AbstractOxmMatchEntrySerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
Ipv6ExthdrCase entryValue = (Ipv6ExthdrCase) entry.getMatchEntryValue();
Ipv6ExthdrFlags pseudoField = entryValue.getIpv6Exthdr().getPseudoField();
int bitmap = ByteBufUtils.fillBitMask(0,
- pseudoField.isNonext(),
- pseudoField.isEsp(),
- pseudoField.isAuth(),
- pseudoField.isDest(),
- pseudoField.isFrag(),
- pseudoField.isRouter(),
- pseudoField.isHop(),
- pseudoField.isUnrep(),
- pseudoField.isUnseq());
+ pseudoField.getNonext(),
+ pseudoField.getEsp(),
+ pseudoField.getAuth(),
+ pseudoField.getDest(),
+ pseudoField.getFrag(),
+ pseudoField.getRouter(),
+ pseudoField.getHop(),
+ pseudoField.getUnrep(),
+ pseudoField.getUnseq());
outBuffer.writeShort(bitmap);
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
outBuffer.writeBytes(entryValue.getIpv6Exthdr().getMask());
}
}
*/
public class OxmIpv6FlabelSerializer extends AbstractOxmMatchEntrySerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
Ipv6FlabelCase entryValue = (Ipv6FlabelCase) entry.getMatchEntryValue();
outBuffer.writeInt(entryValue.getIpv6Flabel().getIpv6Flabel().getValue().intValue());
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getIpv6Flabel().getMask(), outBuffer, Integer.BYTES);
}
}
public class OxmIpv6SrcSerializer extends AbstractOxmIpv6AddressSerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
Ipv6SrcCase entryValue = (Ipv6SrcCase) entry.getMatchEntryValue();
writeIpv6Address(entryValue.getIpv6Src().getIpv6Address().getValue(), outBuffer);
- if (entry.isHasMask()) {
- writeMask(entryValue.getIpv6Src().getMask(), outBuffer,
- EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES);
+ if (entry.getHasMask()) {
+ writeMask(entryValue.getIpv6Src().getMask(), outBuffer, EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES);
}
}
*/
public class OxmMetadataSerializer extends AbstractOxmMatchEntrySerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
MetadataCase entryValue = (MetadataCase) entry.getMatchEntryValue();
outBuffer.writeBytes(entryValue.getMetadata().getMetadata());
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getMetadata().getMask(), outBuffer, Long.BYTES);
}
}
*/
public class OxmMplsBosSerializer extends AbstractOxmMatchEntrySerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
MplsBosCase entryValue = (MplsBosCase) entry.getMatchEntryValue();
- outBuffer.writeBoolean(entryValue.getMplsBos().isBos().booleanValue());
+ outBuffer.writeBoolean(entryValue.getMplsBos().getBos());
}
@Override
public class OxmPbbIsidSerializer extends AbstractOxmMatchEntrySerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
PbbIsidCase entryValue = (PbbIsidCase) entry.getMatchEntryValue();
outBuffer.writeMedium(entryValue.getPbbIsid().getIsid().intValue());
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getPbbIsid().getMask(), outBuffer, getValueLength());
}
}
*/
public class OxmTunnelIdSerializer extends AbstractOxmMatchEntrySerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
TunnelIdCase entryValue = (TunnelIdCase) entry.getMatchEntryValue();
outBuffer.writeBytes(entryValue.getTunnelId().getTunnelId());
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(entryValue.getTunnelId().getMask(), outBuffer, Long.BYTES);
}
}
*/
public class OxmVlanVidSerializer extends AbstractOxmMatchEntrySerializer {
@Override
- public void serialize(MatchEntry entry, ByteBuf outBuffer) {
+ public void serialize(final MatchEntry entry, final ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
VlanVid vlanVid = ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid();
int vlanVidValue = vlanVid.getVlanVid().toJava();
- if (vlanVid.isCfiBit()) {
+ if (vlanVid.getCfiBit()) {
short cfi = 1 << 12; // 13-th bit
vlanVidValue = vlanVidValue | cfi;
}
outBuffer.writeShort(vlanVidValue);
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
writeMask(vlanVid.getMask(), outBuffer, getValueLength());
}
}
@Override
public void serializeHeader(final MatchEntry entry, final ByteBuf outBuffer) {
outBuffer.writeShort(getOxmClassCode());
- writeOxmFieldAndLength(outBuffer, getOxmFieldCode(), entry.isHasMask(), getValueLength());
+ writeOxmFieldAndLength(outBuffer, getOxmFieldCode(), entry.getHasMask(), getValueLength());
}
protected static void writeOxmFieldAndLength(final ByteBuf out, final int fieldValue, final boolean hasMask,
ExperimenterIdCase expCase = serializeExperimenterId(entry, outBuffer);
TcpFlags tcpFlags = expCase.augmentation(TcpFlagsContainer.class).getTcpFlags();
outBuffer.writeShort(tcpFlags.getFlags().toJava());
- if (entry.isHasMask()) {
+ if (entry.getHasMask()) {
outBuffer.writeBytes(tcpFlags.getMask());
}
}
private static int encodeWildcards(final FlowWildcardsV10 wildcards, final short srcMask, final short dstMask) {
int bitmask = ByteBufUtils.fillBitMask(0,
- wildcards.isINPORT(),
- wildcards.isDLVLAN(),
- wildcards.isDLSRC(),
- wildcards.isDLDST(),
- wildcards.isDLTYPE(),
- wildcards.isNWPROTO(),
- wildcards.isTPSRC(),
- wildcards.isTPDST());
+ wildcards.getINPORT(),
+ wildcards.getDLVLAN(),
+ wildcards.getDLSRC(),
+ wildcards.getDLDST(),
+ wildcards.getDLTYPE(),
+ wildcards.getNWPROTO(),
+ wildcards.getTPSRC(),
+ wildcards.getTPDST());
bitmask |= ByteBufUtils.fillBitMask(20,
- wildcards.isDLVLANPCP(),
- wildcards.isNWTOS());
+ wildcards.getDLVLANPCP(),
+ wildcards.getNWTOS());
bitmask |= 32 - srcMask << NW_SRC_SHIFT;
bitmask |= 32 - dstMask << NW_DST_SHIFT;
return bitmask;
new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, 19, MultipartReplyMessage.class));
}
- private static final Logger LOG = LoggerFactory
- .getLogger(MultipartReplyMessageFactoryTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MultipartReplyMessageFactoryTest.class);
/**
* Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x00, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyDescCase messageCase = (MultipartReplyDescCase) builtByFactory.getMultipartReplyBody();
MultipartReplyDesc message = messageCase.getMultipartReplyDesc();
Assert.assertEquals("Wrong mfrDesc", "Manufacturer description", message.getMfrDesc());
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x02, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyAggregateCase messageCase = (MultipartReplyAggregateCase) builtByFactory.getMultipartReplyBody();
MultipartReplyAggregate message = messageCase.getMultipartReplyAggregate();
Assert.assertEquals("Wrong packetCount", Uint64.valueOf("FF01010101010101", 16), message.getPacketCount());
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x03, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyTableCase messageCase = (MultipartReplyTableCase) builtByFactory.getMultipartReplyBody();
MultipartReplyTable message = messageCase.getMultipartReplyTable();
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x04, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyPortStatsCase messageCase = (MultipartReplyPortStatsCase) builtByFactory.getMultipartReplyBody();
MultipartReplyPortStats message = messageCase.getMultipartReplyPortStats();
Assert.assertEquals("Wrong portNo", 255, message.getPortStats().get(0).getPortNo().intValue());
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x05, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyQueueCase messageCase = (MultipartReplyQueueCase) builtByFactory.getMultipartReplyBody();
MultipartReplyQueue message = messageCase.getMultipartReplyQueue();
Assert.assertEquals("Wrong portNo", 255, message.getQueueStats().get(0).getPortNo().intValue());
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x06, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyGroupCase messageCase = (MultipartReplyGroupCase) builtByFactory.getMultipartReplyBody();
MultipartReplyGroup message = messageCase.getMultipartReplyGroup();
Assert.assertEquals("Wrong groupId", 16, message.getGroupStats().get(0).getGroupId().getValue().intValue());
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 9, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyMeterCase messageCase = (MultipartReplyMeterCase) builtByFactory.getMultipartReplyBody();
MultipartReplyMeter message = messageCase.getMultipartReplyMeter();
Assert.assertEquals("Wrong meterId", 9,
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 9, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyMeterCase messageCase = (MultipartReplyMeterCase) builtByFactory.getMultipartReplyBody();
MultipartReplyMeter message = messageCase.getMultipartReplyMeter();
Assert.assertEquals("Wrong meterId", 9,
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 10, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyMeterConfigCase messageCase =
(MultipartReplyMeterConfigCase) builtByFactory.getMultipartReplyBody();
MultipartReplyMeterConfig message = messageCase.getMultipartReplyMeterConfig();
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 10, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyMeterConfigCase messageCase =
(MultipartReplyMeterConfigCase) builtByFactory.getMultipartReplyBody();
MultipartReplyMeterConfig message = messageCase.getMultipartReplyMeterConfig();
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 7, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyGroupDescCase messageCase = (MultipartReplyGroupDescCase) builtByFactory.getMultipartReplyBody();
MultipartReplyGroupDesc message = messageCase.getMultipartReplyGroupDesc();
Assert.assertEquals("Wrong type", 1,
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 7, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyGroupDescCase messageCase = (MultipartReplyGroupDescCase) builtByFactory.getMultipartReplyBody();
MultipartReplyGroupDesc message = messageCase.getMultipartReplyGroupDesc();
Assert.assertEquals("Wrong type", 1,
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().isOFPMPFREQMORE().booleanValue());
+ Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE().booleanValue());
MultipartReplyDescCase messageCase = (MultipartReplyDescCase) builtByFactory.getMultipartReplyBody();
MultipartReplyDesc message = messageCase.getMultipartReplyDesc();
Assert.assertEquals("Wrong mfrDesc", "Manufacturer description", message.getMfrDesc());
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0x01, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE().booleanValue());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE().booleanValue());
MultipartReplyFlowCase messageCase = (MultipartReplyFlowCase) builtByFactory.getMultipartReplyBody();
MultipartReplyFlow message = messageCase.getMultipartReplyFlow();
Assert.assertEquals("Wrong tableId", 1, message.getFlowStats().get(0).getTableId().intValue());
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0x02, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE().booleanValue());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE().booleanValue());
MultipartReplyAggregateCase messageCase = (MultipartReplyAggregateCase) builtByFactory.getMultipartReplyBody();
MultipartReplyAggregate message = messageCase.getMultipartReplyAggregate();
Assert.assertEquals("Wrong packet-count", Uint64.valueOf("FF01020304050607", 16), message.getPacketCount());
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0x03, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyTableCase messageCase = (MultipartReplyTableCase) builtByFactory.getMultipartReplyBody();
MultipartReplyTable message = messageCase.getMultipartReplyTable();
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0x04, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyPortStatsCase messageCase = (MultipartReplyPortStatsCase) builtByFactory.getMultipartReplyBody();
MultipartReplyPortStats message = messageCase.getMultipartReplyPortStats();
Assert.assertEquals("Wrong portNo", 255, message.getPortStats().get(0).getPortNo().intValue());
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0x05, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyQueueCase messageCase = (MultipartReplyQueueCase) builtByFactory.getMultipartReplyBody();
MultipartReplyQueue message = messageCase.getMultipartReplyQueue();
Assert.assertEquals("Wrong portNo", 255, message.getQueueStats().get(0).getPortNo().intValue());
* 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.openflowjava.protocol.impl.deserialization.factories.multipart;
import io.netty.buffer.ByteBuf;
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 65535, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
Mockito.verify(vendorDeserializer).deserialize(bb);
}
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x01, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyFlowCase messageCase = (MultipartReplyFlowCase) builtByFactory.getMultipartReplyBody();
MultipartReplyFlow message = messageCase.getMultipartReplyFlow();
Assert.assertEquals("Wrong flow stats size", 0, message.nonnullFlowStats().size());
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 0x01, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyFlowCase messageCase = (MultipartReplyFlowCase) builtByFactory.getMultipartReplyBody();
MultipartReplyFlow message = messageCase.getMultipartReplyFlow();
Assert.assertEquals("Wrong flow stats size", 2, message.getFlowStats().size());
* 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.openflowjava.protocol.impl.deserialization.factories.multipart;
import io.netty.buffer.ByteBuf;
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 8, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyGroupFeaturesCase messageCase =
(MultipartReplyGroupFeaturesCase) builtByFactory.getMultipartReplyBody();
MultipartReplyGroupFeatures message = messageCase.getMultipartReplyGroupFeatures();
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 8, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyGroupFeaturesCase messageCase =
(MultipartReplyGroupFeaturesCase) builtByFactory.getMultipartReplyBody();
MultipartReplyGroupFeatures message = messageCase.getMultipartReplyGroupFeatures();
* 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.openflowjava.protocol.impl.deserialization.factories.multipart;
import io.netty.buffer.ByteBuf;
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 11, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyMeterFeaturesCase messageCase =
(MultipartReplyMeterFeaturesCase) builtByFactory.getMultipartReplyBody();
MultipartReplyMeterFeatures message = messageCase.getMultipartReplyMeterFeatures();
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 11, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyMeterFeaturesCase messageCase =
(MultipartReplyMeterFeaturesCase) builtByFactory.getMultipartReplyBody();
MultipartReplyMeterFeatures message = messageCase.getMultipartReplyMeterFeatures();
* 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.openflowjava.protocol.impl.deserialization.factories.multipart;
import io.netty.buffer.ByteBuf;
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 13, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyPortDescCase messageCase = (MultipartReplyPortDescCase) builtByFactory.getMultipartReplyBody();
MultipartReplyPortDesc message = messageCase.getMultipartReplyPortDesc();
Assert.assertEquals("Wrong table features size", 0, message.nonnullPorts().size());
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 13, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyPortDescCase messageCase = (MultipartReplyPortDescCase) builtByFactory.getMultipartReplyBody();
MultipartReplyPortDesc message = messageCase.getMultipartReplyPortDesc();
Assert.assertEquals("Wrong port desc size", 2, message.getPorts().size());
* 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.openflowjava.protocol.impl.deserialization.factories.multipart;
import io.netty.buffer.ByteBuf;
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 12, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyTableFeaturesCase messageCase =
(MultipartReplyTableFeaturesCase) builtByFactory.getMultipartReplyBody();
MultipartReplyTableFeatures message = messageCase.getMultipartReplyTableFeatures();
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 12, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyTableFeaturesCase messageCase =
(MultipartReplyTableFeaturesCase) builtByFactory.getMultipartReplyBody();
MultipartReplyTableFeatures message = messageCase.getMultipartReplyTableFeatures();
new byte[]{0, 0, 0, 0, 0, 0, 0, 1}, feature.getMetadataMatch());
Assert.assertArrayEquals("Wrong metadata write",
new byte[]{0, 0, 0, 0, 0, 0, 0, 2}, feature.getMetadataWrite());
- Assert.assertEquals("Wrong config", false, feature.getConfig().isOFPTCDEPRECATEDMASK());
+ Assert.assertEquals("Wrong config", false, feature.getConfig().getOFPTCDEPRECATEDMASK());
Assert.assertEquals("Wrong max entries", 42, feature.getMaxEntries().intValue());
feature = message.getTableFeatures().get(1);
Assert.assertEquals("Wrong table id", 2, feature.getTableId().intValue());
new byte[]{0, 0, 0, 0, 0, 0, 0, 3}, feature.getMetadataMatch());
Assert.assertArrayEquals("Wrong metadata write",
new byte[]{0, 0, 0, 0, 0, 0, 0, 4}, feature.getMetadataWrite());
- Assert.assertEquals("Wrong config", true, feature.getConfig().isOFPTCDEPRECATEDMASK());
+ Assert.assertEquals("Wrong config", true, feature.getConfig().getOFPTCDEPRECATEDMASK());
Assert.assertEquals("Wrong max entries", 43, feature.getMaxEntries().intValue());
}
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 12, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyTableFeaturesCase messageCase =
(MultipartReplyTableFeaturesCase) builtByFactory.getMultipartReplyBody();
MultipartReplyTableFeatures message = messageCase.getMultipartReplyTableFeatures();
new byte[]{0, 0, 0, 0, 0, 0, 0, 1}, feature.getMetadataMatch());
Assert.assertArrayEquals("Wrong metadata write",
new byte[]{0, 0, 0, 0, 0, 0, 0, 2}, feature.getMetadataWrite());
- Assert.assertEquals("Wrong config", false, feature.getConfig().isOFPTCDEPRECATEDMASK());
+ Assert.assertEquals("Wrong config", false, feature.getConfig().getOFPTCDEPRECATEDMASK());
Assert.assertEquals("Wrong max entries", 42, feature.getMaxEntries().intValue());
Assert.assertEquals("Wrong properties size", 14, feature.getTableFeatureProperties().size());
Assert.assertEquals("Wrong property type", TableFeaturesPropType.OFPTFPTINSTRUCTIONS,
* 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.openflowjava.protocol.impl.deserialization.factories.multipart;
import io.netty.buffer.ByteBuf;
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 65535, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
Mockito.verify(vendorDeserializer).deserialize(bb);
}
* 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.openflowjava.protocol.impl.deserialization.match;
import io.netty.buffer.ByteBuf;
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6Exthdr.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry.getHasMask());
Assert.assertEquals("Wrong entry value",
new Ipv6ExthdrFlags(true, true, true, true, true, true, true, true, true),
((Ipv6ExthdrCase) entry.getMatchEntryValue()).getIpv6Exthdr().getPseudoField());
* 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.openflowjava.protocol.impl.deserialization.match;
import io.netty.buffer.ByteBuf;
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6Flabel.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry.getHasMask());
Assert.assertEquals("Wrong entry value", 2,
((Ipv6FlabelCase) entry.getMatchEntryValue()).getIpv6Flabel()
.getIpv6Flabel().getValue().intValue());
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6Flabel.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry.getHasMask());
Assert.assertEquals("Wrong entry value", 2,
((Ipv6FlabelCase) entry.getMatchEntryValue()).getIpv6Flabel()
.getIpv6Flabel().getValue().intValue());
* 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.openflowjava.protocol.impl.deserialization.match;
import io.netty.buffer.ByteBuf;
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", Metadata.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry.getHasMask());
Assert.assertArrayEquals("Wrong entry value", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 03"),
((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMetadata());
}
* 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.openflowjava.protocol.impl.deserialization.match;
import io.netty.buffer.ByteBuf;
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", MplsBos.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry.getHasMask());
Assert.assertEquals("Wrong entry value", false,
- ((MplsBosCase) entry.getMatchEntryValue()).getMplsBos().isBos());
+ ((MplsBosCase) entry.getMatchEntryValue()).getMplsBos().getBos());
}
}
* 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.openflowjava.protocol.impl.deserialization.match;
import io.netty.buffer.ByteBuf;
Assert.assertEquals(OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals(PacketType.class, entry.getOxmMatchField());
- Assert.assertEquals(false, entry.isHasMask());
+ Assert.assertEquals(false, entry.getHasMask());
PacketTypeCase packetTypeCase = (PacketTypeCase) entry.getMatchEntryValue();
Assert.assertEquals(0x1894f, packetTypeCase.getPacketType().getPacketType().longValue());
* 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.openflowjava.protocol.impl.deserialization.match;
import io.netty.buffer.ByteBuf;
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", PbbIsid.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry.getHasMask());
Assert.assertEquals("Wrong entry value", 2, ((PbbIsidCase) entry.getMatchEntryValue())
.getPbbIsid().getIsid().intValue());
}
* 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.openflowjava.protocol.impl.deserialization.match;
import io.netty.buffer.ByteBuf;
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", VlanVid.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry.getHasMask());
Assert.assertEquals("Wrong entry value", 10,
((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getVlanVid().intValue());
Assert.assertEquals("Wrong entry value", false,
- ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().isCfiBit());
+ ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getCfiBit());
}
}
+ "oxm.rev150225.OpenflowBasicClass", entries.get(0).getOxmClass().getName());
Assert.assertEquals("Wrong match entry field", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow."
+ "oxm.rev150225.InPhyPort", entries.get(0).getOxmMatchField().getName());
- Assert.assertEquals("Wrong match entry mask", false, entries.get(0).isHasMask());
+ Assert.assertEquals("Wrong match entry mask", false, entries.get(0).getHasMask());
Assert.assertEquals("Wrong match entry value", 11,
((InPhyPortCase) entries.get(0).getMatchEntryValue()).getInPhyPort().getPortNumber()
.getValue().intValue());
MatchEntry entry0 = entries.get(0);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry0.getOxmClass());
Assert.assertEquals("Wrong entry field", InPort.class, entry0.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry0.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry0.getHasMask());
Assert.assertEquals("Wrong entry value", 1,
((InPortCase) entry0.getMatchEntryValue()).getInPort().getPortNumber().getValue().intValue());
MatchEntry entry1 = entries.get(1);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry1.getOxmClass());
Assert.assertEquals("Wrong entry field", InPhyPort.class, entry1.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry1.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry1.getHasMask());
Assert.assertEquals("Wrong entry value", 2,
((InPhyPortCase) entry1.getMatchEntryValue()).getInPhyPort().getPortNumber().getValue().intValue());
MatchEntry entry2 = entries.get(2);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry2.getOxmClass());
Assert.assertEquals("Wrong entry field", Metadata.class, entry2.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry2.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry2.getHasMask());
Assert.assertArrayEquals("Wrong entry value", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 03"),
((MetadataCase) entry2.getMatchEntryValue()).getMetadata().getMetadata());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 04"),
MatchEntry entry3 = entries.get(3);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry3.getOxmClass());
Assert.assertEquals("Wrong entry field", EthDst.class, entry3.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry3.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry3.getHasMask());
Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:05"),
((EthDstCase) entry3.getMatchEntryValue()).getEthDst().getMacAddress());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 06"),
MatchEntry entry4 = entries.get(4);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry4.getOxmClass());
Assert.assertEquals("Wrong entry field", EthSrc.class, entry4.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry4.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry4.getHasMask());
Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:07"),
((EthSrcCase) entry4.getMatchEntryValue()).getEthSrc().getMacAddress());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 08"),
MatchEntry entry5 = entries.get(5);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry5.getOxmClass());
Assert.assertEquals("Wrong entry field", EthType.class, entry5.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry5.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry5.getHasMask());
Assert.assertEquals("Wrong entry value", 9,
((EthTypeCase) entry5.getMatchEntryValue()).getEthType().getEthType().getValue().intValue());
MatchEntry entry6 = entries.get(6);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry6.getOxmClass());
Assert.assertEquals("Wrong entry field", VlanVid.class, entry6.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry6.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry6.getHasMask());
Assert.assertEquals("Wrong entry value", 10,
((VlanVidCase) entry6.getMatchEntryValue()).getVlanVid().getVlanVid().intValue());
Assert.assertEquals("Wrong entry value", false,
- ((VlanVidCase) entry6.getMatchEntryValue()).getVlanVid().isCfiBit());
+ ((VlanVidCase) entry6.getMatchEntryValue()).getVlanVid().getCfiBit());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 0B"),
((VlanVidCase) entry6.getMatchEntryValue()).getVlanVid().getMask());
MatchEntry entry7 = entries.get(7);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry7.getOxmClass());
Assert.assertEquals("Wrong entry field", VlanPcp.class, entry7.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry7.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry7.getHasMask());
Assert.assertEquals("Wrong entry value", 12,
((VlanPcpCase) entry7.getMatchEntryValue()).getVlanPcp().getVlanPcp().intValue());
MatchEntry entry8 = entries.get(8);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry8.getOxmClass());
Assert.assertEquals("Wrong entry field", IpDscp.class, entry8.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry8.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry8.getHasMask());
Assert.assertEquals("Wrong entry value", 13,
((IpDscpCase) entry8.getMatchEntryValue()).getIpDscp().getDscp().getValue().intValue());
MatchEntry entry9 = entries.get(9);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry9.getOxmClass());
Assert.assertEquals("Wrong entry field", IpEcn.class, entry9.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry9.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry9.getHasMask());
Assert.assertEquals("Wrong entry value", 14,
((IpEcnCase) entry9.getMatchEntryValue()).getIpEcn().getEcn().intValue());
MatchEntry entry10 = entries.get(10);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry10.getOxmClass());
Assert.assertEquals("Wrong entry field", IpProto.class, entry10.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry10.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry10.getHasMask());
Assert.assertEquals("Wrong entry value", 15,
((IpProtoCase) entry10.getMatchEntryValue()).getIpProto().getProtocolNumber().intValue());
MatchEntry entry11 = entries.get(11);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry11.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv4Src.class, entry11.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry11.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry11.getHasMask());
Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.1"),
((Ipv4SrcCase) entry11.getMatchEntryValue()).getIpv4Src().getIpv4Address());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 FF 00"),
MatchEntry entry12 = entries.get(12);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry12.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv4Dst.class, entry12.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry12.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry12.getHasMask());
Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.2"),
((Ipv4DstCase) entry12.getMatchEntryValue()).getIpv4Dst().getIpv4Address());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 FF"),
MatchEntry entry13 = entries.get(13);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry13.getOxmClass());
Assert.assertEquals("Wrong entry field", TcpSrc.class, entry13.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry13.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry13.getHasMask());
Assert.assertEquals("Wrong entry value", 3,
((TcpSrcCase) entry13.getMatchEntryValue()).getTcpSrc().getPort().getValue().intValue());
MatchEntry entry14 = entries.get(14);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry14.getOxmClass());
Assert.assertEquals("Wrong entry field", TcpDst.class, entry14.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry14.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry14.getHasMask());
Assert.assertEquals("Wrong entry value", 4,
((TcpDstCase) entry14.getMatchEntryValue()).getTcpDst().getPort().getValue().intValue());
MatchEntry entry15 = entries.get(15);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry15.getOxmClass());
Assert.assertEquals("Wrong entry field", UdpSrc.class, entry15.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry15.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry15.getHasMask());
Assert.assertEquals("Wrong entry value", 5,
((UdpSrcCase) entry15.getMatchEntryValue()).getUdpSrc().getPort().getValue().intValue());
MatchEntry entry16 = entries.get(16);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry16.getOxmClass());
Assert.assertEquals("Wrong entry field", UdpDst.class, entry16.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry16.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry16.getHasMask());
Assert.assertEquals("Wrong entry value", 6,
((UdpDstCase) entry16.getMatchEntryValue()).getUdpDst().getPort().getValue().intValue());
MatchEntry entry17 = entries.get(17);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry17.getOxmClass());
Assert.assertEquals("Wrong entry field", SctpSrc.class, entry17.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry17.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry17.getHasMask());
Assert.assertEquals("Wrong entry value", 7,
((SctpSrcCase) entry17.getMatchEntryValue()).getSctpSrc().getPort().getValue().intValue());
MatchEntry entry18 = entries.get(18);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry18.getOxmClass());
Assert.assertEquals("Wrong entry field", SctpDst.class, entry18.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry18.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry18.getHasMask());
Assert.assertEquals("Wrong entry value", 8,
((SctpDstCase) entry18.getMatchEntryValue()).getSctpDst().getPort().getValue().intValue());
MatchEntry entry19 = entries.get(19);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry19.getOxmClass());
Assert.assertEquals("Wrong entry field", Icmpv4Type.class, entry19.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry19.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry19.getHasMask());
Assert.assertEquals("Wrong entry value", 5,
((Icmpv4TypeCase) entry19.getMatchEntryValue()).getIcmpv4Type().getIcmpv4Type().intValue());
MatchEntry entry20 = entries.get(20);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry20.getOxmClass());
Assert.assertEquals("Wrong entry field", Icmpv4Code.class, entry20.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry20.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry20.getHasMask());
Assert.assertEquals("Wrong entry value", 7,
((Icmpv4CodeCase) entry20.getMatchEntryValue()).getIcmpv4Code().getIcmpv4Code().intValue());
MatchEntry entry21 = entries.get(21);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry21.getOxmClass());
Assert.assertEquals("Wrong entry field", ArpOp.class, entry21.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry21.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry21.getHasMask());
Assert.assertEquals("Wrong entry value", 16,
((ArpOpCase) entry21.getMatchEntryValue()).getArpOp().getOpCode().intValue());
MatchEntry entry22 = entries.get(22);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry22.getOxmClass());
Assert.assertEquals("Wrong entry field", ArpSpa.class, entry22.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry22.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry22.getHasMask());
Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.9"),
((ArpSpaCase) entry22.getMatchEntryValue()).getArpSpa().getIpv4Address());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 FF 00"),
MatchEntry entry23 = entries.get(23);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry23.getOxmClass());
Assert.assertEquals("Wrong entry field", ArpTpa.class, entry23.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry23.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry23.getHasMask());
Assert.assertEquals("Wrong entry value", new Ipv4Address("10.0.0.10"),
((ArpTpaCase) entry23.getMatchEntryValue()).getArpTpa().getIpv4Address());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 FF"),
MatchEntry entry24 = entries.get(24);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry24.getOxmClass());
Assert.assertEquals("Wrong entry field", ArpSha.class, entry24.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry24.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry24.getHasMask());
Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:01"),
((ArpShaCase) entry24.getMatchEntryValue()).getArpSha().getMacAddress());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 03"),
MatchEntry entry25 = entries.get(25);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry25.getOxmClass());
Assert.assertEquals("Wrong entry field", ArpTha.class, entry25.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry25.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry25.getHasMask());
Assert.assertEquals("Wrong entry value", new MacAddress("00:00:00:00:00:02"),
((ArpThaCase) entry25.getMatchEntryValue()).getArpTha().getMacAddress());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 04"),
MatchEntry entry26 = entries.get(26);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry26.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6Src.class, entry26.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry26.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry26.getHasMask());
Assert.assertEquals("Wrong entry value", new Ipv6Address("::15"),
((Ipv6SrcCase) entry26.getMatchEntryValue()).getIpv6Src().getIpv6Address());
Assert.assertArrayEquals("Wrong entry mask",
MatchEntry entry27 = entries.get(27);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry27.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6Dst.class, entry27.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry27.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry27.getHasMask());
Assert.assertEquals("Wrong entry value", new Ipv6Address("::17"),
((Ipv6DstCase) entry27.getMatchEntryValue()).getIpv6Dst().getIpv6Address());
Assert.assertArrayEquals("Wrong entry mask",
MatchEntry entry28 = entries.get(28);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry28.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6Flabel.class, entry28.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry28.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry28.getHasMask());
Assert.assertEquals("Wrong entry value", 2,
((Ipv6FlabelCase) entry28.getMatchEntryValue()).getIpv6Flabel().getIpv6Flabel()
.getValue().intValue());
MatchEntry entry29 = entries.get(29);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry29.getOxmClass());
Assert.assertEquals("Wrong entry field", Icmpv6Type.class, entry29.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry29.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry29.getHasMask());
Assert.assertEquals("Wrong entry value", 21,
((Icmpv6TypeCase) entry29.getMatchEntryValue()).getIcmpv6Type().getIcmpv6Type().intValue());
MatchEntry entry30 = entries.get(30);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry30.getOxmClass());
Assert.assertEquals("Wrong entry field", Icmpv6Code.class, entry30.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry30.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry30.getHasMask());
Assert.assertEquals("Wrong entry value", 23,
((Icmpv6CodeCase) entry30.getMatchEntryValue()).getIcmpv6Code().getIcmpv6Code().intValue());
MatchEntry entry31 = entries.get(31);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry31.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6NdTarget.class, entry31.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry31.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry31.getHasMask());
Assert.assertEquals("Wrong entry value", new Ipv6Address("::20"),
((Ipv6NdTargetCase) entry31.getMatchEntryValue()).getIpv6NdTarget().getIpv6Address());
MatchEntry entry32 = entries.get(32);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry32.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6NdSll.class, entry32.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry32.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry32.getHasMask());
Assert.assertEquals("Wrong entry value", new MacAddress("00:05:00:00:00:01"),
((Ipv6NdSllCase) entry32.getMatchEntryValue()).getIpv6NdSll().getMacAddress());
MatchEntry entry33 = entries.get(33);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry33.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6NdTll.class, entry33.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry33.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry33.getHasMask());
Assert.assertEquals("Wrong entry value", new MacAddress("00:05:00:00:00:02"),
((Ipv6NdTllCase) entry33.getMatchEntryValue()).getIpv6NdTll().getMacAddress());
MatchEntry entry34 = entries.get(34);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry34.getOxmClass());
Assert.assertEquals("Wrong entry field", MplsLabel.class, entry34.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry34.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry34.getHasMask());
Assert.assertEquals("Wrong entry value", 515,
((MplsLabelCase) entry34.getMatchEntryValue()).getMplsLabel().getMplsLabel().intValue());
MatchEntry entry35 = entries.get(35);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry35.getOxmClass());
Assert.assertEquals("Wrong entry field", MplsTc.class, entry35.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry35.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry35.getHasMask());
Assert.assertEquals("Wrong entry value", 3,
((MplsTcCase) entry35.getMatchEntryValue()).getMplsTc().getTc().intValue());
MatchEntry entry36 = entries.get(36);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry36.getOxmClass());
Assert.assertEquals("Wrong entry field", MplsBos.class, entry36.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry36.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry36.getHasMask());
Assert.assertEquals("Wrong entry value", true,
- ((MplsBosCase) entry36.getMatchEntryValue()).getMplsBos().isBos());
+ ((MplsBosCase) entry36.getMatchEntryValue()).getMplsBos().getBos());
MatchEntry entry37 = entries.get(37);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry37.getOxmClass());
Assert.assertEquals("Wrong entry field", PbbIsid.class, entry37.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry37.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry37.getHasMask());
Assert.assertEquals("Wrong entry value", 2,
((PbbIsidCase) entry37.getMatchEntryValue()).getPbbIsid().getIsid().intValue());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 01"),
MatchEntry entry38 = entries.get(38);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry38.getOxmClass());
Assert.assertEquals("Wrong entry field", TunnelId.class, entry38.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry38.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry38.getHasMask());
Assert.assertArrayEquals("Wrong entry value", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 07"),
((TunnelIdCase) entry38.getMatchEntryValue()).getTunnelId().getTunnelId());
Assert.assertArrayEquals("Wrong entry mask", ByteBufUtils.hexStringToBytes("00 00 00 00 00 00 00 FF"),
MatchEntry entry39 = entries.get(39);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry39.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv6Exthdr.class, entry39.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", true, entry39.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", true, entry39.getHasMask());
Assert.assertEquals("Wrong entry value",
new Ipv6ExthdrFlags(false, false, false, false, false, false, false, false, false),
((Ipv6ExthdrCase) entry39.getMatchEntryValue()).getIpv6Exthdr().getPseudoField());
MatchEntry entry40 = entries.get(40);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry40.getOxmClass());
Assert.assertEquals("Wrong entry field", PacketType.class, entry40.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry40.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry40.getHasMask());
Assert.assertEquals("Wrong entry value", 0x1894f,
((PacketTypeCase) entry40.getMatchEntryValue()).getPacketType().getPacketType().longValue());
}
MatchEntry entry = entryDeserializer.deserializeHeader(buffer);
Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
Assert.assertEquals("Wrong entry field", Ipv4Dst.class, entry.getOxmMatchField());
- Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
+ Assert.assertEquals("Wrong entry hasMask", false, entry.getHasMask());
Assert.assertNull("Wrong Ipv4 address", entry.getMatchEntryValue());
}