use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch in project openflowplugin by opendaylight.
the class ApplySetfieldMissTablePropertySerializerTest method testSerialize.
@Test
public void testSerialize() throws Exception {
final ApplySetfieldMiss property = new ApplySetfieldMissBuilder().setApplySetfieldMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.setfield.miss.ApplySetfieldMissBuilder().setSetFieldMatch(ImmutableList.<SetFieldMatch>builder().add(new SetFieldMatchBuilder().setMatchType(ArpOp.class).setHasMask(false).build()).build()).build()).build();
assertProperty(property, out -> {
assertEquals(out.readUnsignedShort(), OxmMatchConstants.OPENFLOW_BASIC_CLASS);
assertEquals(out.readUnsignedByte(), OxmMatchConstants.ARP_OP << 1);
// Skip match entry length
out.skipBytes(EncodeConstants.SIZE_OF_BYTE_IN_BYTES);
});
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch in project openflowplugin by opendaylight.
the class OpenflowpluginTableFeaturesTestCommandProvider method createApplySetFieldTblFeatureProp.
private TableFeaturePropertiesBuilder createApplySetFieldTblFeatureProp() {
// t13
SetFieldMatchBuilder setFieldMatchBld1 = new SetFieldMatchBuilder();
setFieldMatchBld1.setHasMask(false);
setFieldMatchBld1.setMatchType(ArpOp.class);
SetFieldMatchBuilder setFieldMatchBld2 = new SetFieldMatchBuilder();
setFieldMatchBld2.setHasMask(true);
setFieldMatchBld2.setMatchType(InPort.class);
SetFieldMatchBuilder setFieldMatchBld3 = new SetFieldMatchBuilder();
setFieldMatchBld3.setHasMask(true);
setFieldMatchBld3.setMatchType(Ipv4Dst.class);
List<SetFieldMatch> setFieldMatch = new ArrayList<>();
setFieldMatch.add(setFieldMatchBld1.build());
setFieldMatch.add(setFieldMatchBld2.build());
setFieldMatch.add(setFieldMatchBld3.build());
ApplySetfieldBuilder applySetfieldBld = new ApplySetfieldBuilder();
org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.setfield.ApplySetfieldBuilder applySetfieldBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.setfield.ApplySetfieldBuilder();
applySetfieldBuilder.setSetFieldMatch(setFieldMatch);
applySetfieldBld.setApplySetfield(applySetfieldBuilder.build());
TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder();
tableFeatureProperty.setTableFeaturePropType(applySetfieldBld.build());
TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0);
tableFeatureProperty.setKey(keyValue);
tableFeatureProperty.setOrder(1);
return tableFeatureProperty;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch in project openflowplugin by opendaylight.
the class OpenflowpluginTableFeaturesTestCommandProvider method createWriteSetFieldTblFeatureProp.
private TableFeaturePropertiesBuilder createWriteSetFieldTblFeatureProp() {
// t11
SetFieldMatchBuilder setFieldMatchBld1 = new SetFieldMatchBuilder();
setFieldMatchBld1.setHasMask(false);
setFieldMatchBld1.setMatchType(MplsLabel.class);
SetFieldMatchBuilder setFieldMatchBld2 = new SetFieldMatchBuilder();
setFieldMatchBld2.setHasMask(true);
setFieldMatchBld2.setMatchType(MplsBos.class);
SetFieldMatchBuilder setFieldMatchBld3 = new SetFieldMatchBuilder();
setFieldMatchBld3.setHasMask(true);
setFieldMatchBld3.setMatchType(EthDst.class);
List<SetFieldMatch> setFieldMatch = new ArrayList<>();
setFieldMatch.add(setFieldMatchBld1.build());
setFieldMatch.add(setFieldMatchBld2.build());
setFieldMatch.add(setFieldMatchBld3.build());
WriteSetfieldBuilder writeSetfieldBld = new WriteSetfieldBuilder();
org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.setfield.WriteSetfieldBuilder writeSetfieldBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.setfield.WriteSetfieldBuilder();
writeSetfieldBuilder.setSetFieldMatch(setFieldMatch);
writeSetfieldBld.setWriteSetfield(writeSetfieldBuilder.build());
TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder();
tableFeatureProperty.setTableFeaturePropType(writeSetfieldBld.build());
TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0);
tableFeatureProperty.setKey(keyValue);
tableFeatureProperty.setOrder(1);
return tableFeatureProperty;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch in project openflowplugin by opendaylight.
the class OpenflowpluginTableFeaturesTestCommandProvider method createWriteSetFieldMissTblFeatureProp.
private TableFeaturePropertiesBuilder createWriteSetFieldMissTblFeatureProp() {
// t12
SetFieldMatchBuilder setFieldMatchBld1 = new SetFieldMatchBuilder();
setFieldMatchBld1.setHasMask(false);
setFieldMatchBld1.setMatchType(EthSrc.class);
SetFieldMatchBuilder setFieldMatchBld2 = new SetFieldMatchBuilder();
setFieldMatchBld2.setHasMask(true);
setFieldMatchBld2.setMatchType(InPort.class);
SetFieldMatchBuilder setFieldMatchBld3 = new SetFieldMatchBuilder();
setFieldMatchBld3.setHasMask(true);
setFieldMatchBld3.setMatchType(Ipv4Dst.class);
List<SetFieldMatch> setFieldMatch = new ArrayList<>();
setFieldMatch.add(setFieldMatchBld1.build());
setFieldMatch.add(setFieldMatchBld2.build());
setFieldMatch.add(setFieldMatchBld3.build());
WriteSetfieldMissBuilder writeSetfieldBld = new WriteSetfieldMissBuilder();
org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.setfield.miss.WriteSetfieldMissBuilder writeSetfieldMissBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.setfield.miss.WriteSetfieldMissBuilder();
writeSetfieldMissBuilder.setSetFieldMatch(setFieldMatch);
writeSetfieldBld.setWriteSetfieldMiss(writeSetfieldMissBuilder.build());
TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder();
tableFeatureProperty.setTableFeaturePropType(writeSetfieldBld.build());
TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0);
tableFeatureProperty.setKey(keyValue);
tableFeatureProperty.setOrder(1);
return tableFeatureProperty;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch in project openflowplugin by opendaylight.
the class OpenflowpluginTableFeaturesTestCommandProvider method createApplySetFieldMissTblFeatureProp.
private TableFeaturePropertiesBuilder createApplySetFieldMissTblFeatureProp() {
// t14
SetFieldMatchBuilder setFieldMatchBld1 = new SetFieldMatchBuilder();
setFieldMatchBld1.setHasMask(false);
setFieldMatchBld1.setMatchType(ArpOp.class);
SetFieldMatchBuilder setFieldMatchBld2 = new SetFieldMatchBuilder();
setFieldMatchBld2.setHasMask(true);
setFieldMatchBld2.setMatchType(InPort.class);
SetFieldMatchBuilder setFieldMatchBld3 = new SetFieldMatchBuilder();
setFieldMatchBld3.setHasMask(true);
setFieldMatchBld3.setMatchType(Ipv4Dst.class);
List<SetFieldMatch> setFieldMatch = new ArrayList<>();
setFieldMatch.add(setFieldMatchBld1.build());
setFieldMatch.add(setFieldMatchBld2.build());
setFieldMatch.add(setFieldMatchBld3.build());
ApplySetfieldMissBuilder applySetfieldMissBld = new ApplySetfieldMissBuilder();
org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.setfield.miss.ApplySetfieldMissBuilder applySetfieldMissBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.setfield.miss.ApplySetfieldMissBuilder();
applySetfieldMissBuilder.setSetFieldMatch(setFieldMatch);
applySetfieldMissBld.setApplySetfieldMiss(applySetfieldMissBuilder.build());
TableFeaturePropertiesBuilder tableFeatureProperty = new TableFeaturePropertiesBuilder();
tableFeatureProperty.setTableFeaturePropType(applySetfieldMissBld.build());
TableFeaturePropertiesKey keyValue = new TableFeaturePropertiesKey(0);
tableFeatureProperty.setKey(keyValue);
tableFeatureProperty.setOrder(1);
return tableFeatureProperty;
}
Aggregations