Search in sources :

Example 11 with GeneralAugMatchNodesNodeTableFlow

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);
        }
    }
}
Also used : Extension(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension) GeneralAugMatchNodesNodeTableFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow) NxAugMatchNodesNodeTableFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow) ExtensionList(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionList)

Example 12 with GeneralAugMatchNodesNodeTableFlow

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);
        }
    }
}
Also used : Extension(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension) GeneralAugMatchNodesNodeTableFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow) NxAugMatchNodesNodeTableFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow) ExtensionList(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionList)

Example 13 with GeneralAugMatchNodesNodeTableFlow

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);
    }
}
Also used : NxAugMatchNodesNodeTableFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow) GeneralAugMatchNodesNodeTableFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow) NxAugMatchNodesNodeTableFlowBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlowBuilder)

Example 14 with GeneralAugMatchNodesNodeTableFlow

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();
}
Also used : ExtensionListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionListBuilder) GeneralAugMatchNodesNodeTableFlowBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlowBuilder) ExtensionList(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionList) ExtensionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.ExtensionBuilder)

Aggregations

GeneralAugMatchNodesNodeTableFlow (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow)13 ExtensionList (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionList)13 NxAugMatchNodesNodeTableFlow (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow)10 Extension (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension)9 GeneralAugMatchNodesNodeTableFlowBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlowBuilder)4 ExtensionListBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionListBuilder)4 Test (org.junit.Test)2 Match (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match)2 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder)2 GeneralExtensionListGrouping (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralExtensionListGrouping)2 ExtensionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.ExtensionBuilder)2 GeneralAugMatchNotifPacketIn (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNotifPacketIn)1 GeneralAugMatchNotifPacketInBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNotifPacketInBuilder)1 NxAugMatchNodesNodeTableFlowBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlowBuilder)1