use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow in project openflowplugin by opendaylight.
the class CtStateConvertorTest method testConvert1.
@Test
public void testConvert1() throws Exception {
final CtStateValuesBuilder ctStateValuesBuilder = new CtStateValuesBuilder().setCtState(3L).setMask(4L);
final CtStateCaseValueBuilder ctStateCaseValueBuilder = new CtStateCaseValueBuilder().setCtStateValues(ctStateValuesBuilder.build());
final CtStateCaseValue ctStateCaseValue = ctStateCaseValueBuilder.build();
when(matchEntry.getMatchEntryValue()).thenReturn(ctStateCaseValue);
final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment = ctStateConvertor.convert(matchEntry, MatchPath.PACKET_RECEIVED_MATCH);
Assert.assertEquals(3L, ((NxAugMatchNotifPacketIn) extensionAugment.getAugmentationObject()).getNxmNxCtState().getCtState().longValue());
Assert.assertEquals(4L, ((NxAugMatchNotifPacketIn) extensionAugment.getAugmentationObject()).getNxmNxCtState().getMask().longValue());
Assert.assertEquals(extensionAugment.getKey(), NxmNxCtStateKey.class);
final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment1 = ctStateConvertor.convert(matchEntry, MatchPath.SWITCH_FLOW_REMOVED_MATCH);
Assert.assertEquals(3L, ((NxAugMatchNotifSwitchFlowRemoved) extensionAugment1.getAugmentationObject()).getNxmNxCtState().getCtState().longValue());
Assert.assertEquals(4L, ((NxAugMatchNotifSwitchFlowRemoved) extensionAugment1.getAugmentationObject()).getNxmNxCtState().getMask().longValue());
Assert.assertEquals(extensionAugment.getKey(), NxmNxCtStateKey.class);
final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment2 = ctStateConvertor.convert(matchEntry, MatchPath.FLOWS_STATISTICS_UPDATE_MATCH);
Assert.assertEquals(3L, ((NxAugMatchNodesNodeTableFlow) extensionAugment2.getAugmentationObject()).getNxmNxCtState().getCtState().longValue());
Assert.assertEquals(4L, ((NxAugMatchNodesNodeTableFlow) extensionAugment2.getAugmentationObject()).getNxmNxCtState().getMask().longValue());
Assert.assertEquals(extensionAugment.getKey(), NxmNxCtStateKey.class);
final ExtensionAugment<? extends Augmentation<Extension>> extensionAugment3 = ctStateConvertor.convert(matchEntry, MatchPath.FLOWS_STATISTICS_RPC_MATCH);
Assert.assertEquals(3L, ((NxAugMatchRpcGetFlowStats) extensionAugment3.getAugmentationObject()).getNxmNxCtState().getCtState().longValue());
Assert.assertEquals(4L, ((NxAugMatchRpcGetFlowStats) extensionAugment3.getAugmentationObject()).getNxmNxCtState().getMask().longValue());
Assert.assertEquals(extensionAugment.getKey(), NxmNxCtStateKey.class);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow in project netvirt by opendaylight.
the class OpenFlow13Utils method addMatchTunId.
public static void addMatchTunId(MatchBuilder match, long value) {
NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder().setNxmNxTunId(new NxmNxTunIdBuilder().setValue(BigInteger.valueOf(value)).build()).build();
addExtension(match, NxmNxTunIdKey.class, am);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow in project netvirt by opendaylight.
the class OpenFlow13Utils method getNspMatch.
public static MatchBuilder getNspMatch(long nsp) {
MatchBuilder mb = new MatchBuilder();
NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder().setNxmNxNsp(new NxmNxNspBuilder().setValue(nsp).build()).build();
addExtension(mb, NxmNxNspKey.class, am);
return mb;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow in project netvirt by opendaylight.
the class OpenFlow13Utils method addMatchEthNsh.
public static void addMatchEthNsh(MatchBuilder match) {
NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder().setNxmNxEncapEthType(new NxmNxEncapEthTypeBuilder().setValue(ETHERTYPE_NSH).build()).build();
addExtension(match, NxmNxEncapEthTypeKey.class, am);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow in project netvirt by opendaylight.
the class OpenFlow13Utils method addMatchNshNsc2.
public static void addMatchNshNsc2(MatchBuilder match, long nsc) {
NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder().setNxmNxNshc2(new NxmNxNshc2Builder().setValue(nsc).build()).build();
addExtension(match, NxmNxNshc2Key.class, am);
}
Aggregations