use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg5CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg5Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg5.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class RegConvertor method convert.
@SuppressWarnings("unchecked")
@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
NxmNxRegBuilder nxRegBuilder = new NxmNxRegBuilder();
if (!org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg.class.isAssignableFrom(input.getOxmMatchField())) {
String msg = input.getOxmMatchField() + " does not implement " + org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg.class;
LOG.warn(msg);
throw new IllegalStateException(msg);
}
nxRegBuilder.setReg((Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg>) input.getOxmMatchField());
RegCaseValue regCaseValue = (RegCaseValue) input.getMatchEntryValue();
nxRegBuilder.setValue(regCaseValue.getRegValues().getValue());
if (input.isHasMask()) {
nxRegBuilder.setMask(regCaseValue.getRegValues().getMask());
}
return resolveAugmentation(nxRegBuilder.build(), path, resolveRegKey(input.getOxmMatchField()));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg0CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg0Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg0.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg6CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg6Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg6.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg3CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg3Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg3.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
Aggregations