use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkMatchTunDstIp.
private void checkMatchTunDstIp(Match match, Ipv4Address value) {
GeneralAugMatchNodesNodeTableFlow genAug = match.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class);
assertNotNull(genAug);
List<ExtensionList> extensions = genAug.getExtensionList();
for (ExtensionList extensionList : extensions) {
Extension extension = extensionList.getExtension();
NxAugMatchNodesNodeTableFlow nxAugMatch = extension.getAugmentation(NxAugMatchNodesNodeTableFlow.class);
if (nxAugMatch.getNxmNxTunIpv4Dst() != null) {
assertEquals(nxAugMatch.getNxmNxTunIpv4Dst().getIpv4Address(), value);
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkMatchC2.
private void checkMatchC2(Match match, long c2) {
GeneralAugMatchNodesNodeTableFlow genAug = match.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class);
assertNotNull(genAug);
List<ExtensionList> extensions = genAug.getExtensionList();
for (ExtensionList extensionList : extensions) {
Extension extension = extensionList.getExtension();
NxAugMatchNodesNodeTableFlow nxAugMatch = extension.getAugmentation(NxAugMatchNodesNodeTableFlow.class);
if (nxAugMatch.getNxmNxNshc2() != null) {
assertEquals(nxAugMatch.getNxmNxNshc2().getValue().longValue(), c2);
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow in project genius by opendaylight.
the class NxMatchInfoHelper method setMatch.
@Override
public void setMatch(MatchBuilder matchBuilder, Map<Class<?>, Object> mapMatchBuilder) {
B builder = (B) mapMatchBuilder.remove(builderClass);
if (builder != null) {
NxAugMatchNodesNodeTableFlowBuilder nxAugMatchBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
applyValue(nxAugMatchBuilder, builder.build());
NxAugMatchNodesNodeTableFlow nxAugMatch = nxAugMatchBuilder.build();
GeneralAugMatchNodesNodeTableFlow existingAugmentations = matchBuilder.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class);
GeneralAugMatchNodesNodeTableFlow genAugMatch = generalAugMatchBuilder(existingAugmentations, nxAugMatch, keyClass);
matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, genAugMatch);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow in project genius by opendaylight.
the class NxMatchInfoHelper method generalAugMatchBuilder.
private GeneralAugMatchNodesNodeTableFlow generalAugMatchBuilder(GeneralAugMatchNodesNodeTableFlow existingAugmentations, NxAugMatchNodesNodeTableFlow nxAugMatch, Class<? extends ExtensionKey> extentionKey) {
List<ExtensionList> extensions = null;
if (existingAugmentations != null) {
extensions = existingAugmentations.getExtensionList();
}
if (extensions == null) {
extensions = new ArrayList<>();
}
extensions.add(new ExtensionListBuilder().setExtensionKey(extentionKey).setExtension(new ExtensionBuilder().addAugmentation(NxAugMatchNodesNodeTableFlow.class, nxAugMatch).build()).build());
return new GeneralAugMatchNodesNodeTableFlowBuilder().setExtensionList(extensions).build();
}
Aggregations