Search in sources :

Example 1 with Extension

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension in project netvirt by opendaylight.

the class OpenFlow13ProviderTest method checkMatchTunId.

private void checkMatchTunId(Match match, long 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.getNxmNxTunId() != null) {
            assertEquals(nxAugMatch.getNxmNxTunId().getValue().longValue(), 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 2 with Extension

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension in project netvirt by opendaylight.

the class OpenFlow13ProviderTest method checkMatchVxgpeNsh.

private void checkMatchVxgpeNsh(Match match) {
    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.getNxmNxTunGpeNp() != null) {
            assertEquals(nxAugMatch.getNxmNxTunGpeNp().getValue().shortValue(), OpenFlow13Utils.TUN_GPE_NP_NSH);
        }
    }
}
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 3 with Extension

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension in project netvirt by opendaylight.

the class OpenFlow13ProviderTest method checkMatchNshMdType1.

private void checkMatchNshMdType1(Match match) {
    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.getNxmNxNshMdtype() != null) {
            assertEquals(nxAugMatch.getNxmNxNshMdtype().getValue().shortValue(), OpenFlow13Provider.NSH_MDTYPE_ONE);
        }
    }
}
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 4 with Extension

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension in project netvirt by opendaylight.

the class OpenFlow13ProviderTest method checkMatchC1.

private void checkMatchC1(Match match, long c1) {
    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.getNxmNxNshc1() != null) {
            assertEquals(nxAugMatch.getNxmNxNshc1().getValue().longValue(), c1);
        }
    }
}
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 5 with Extension

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension in project netvirt by opendaylight.

the class OpenFlow13ProviderTest method checkMatchNsi.

private void checkMatchNsi(Match match, short nsi) {
    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.getNxmNxNsi() != null) {
            assertEquals(nxAugMatch.getNxmNxNsi().getNsi().shortValue(), nsi);
        }
    }
}
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)

Aggregations

Extension (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension)57 Test (org.junit.Test)46 CodecPreconditionException (org.opendaylight.openflowplugin.extension.vendor.nicira.convertor.CodecPreconditionException)32 MatchEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry)26 NxAugMatchNodesNodeTableFlow (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlow)23 Augmentation (org.opendaylight.yangtools.yang.binding.Augmentation)23 Before (org.junit.Before)21 NxAugMatchNodesNodeTableFlowBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlowBuilder)18 Nxm1Class (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm1Class)17 NxAugMatchNotifPacketIn (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNotifPacketIn)14 NxAugMatchNotifSwitchFlowRemoved (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNotifSwitchFlowRemoved)14 NxAugMatchRpcGetFlowStats (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchRpcGetFlowStats)14 ExtensionList (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionList)11 GeneralAugMatchNodesNodeTableFlow (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow)10 Consumer (java.util.function.Consumer)9 Nxm0Class (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm0Class)7 MatchEntryBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder)7 ArrayList (java.util.ArrayList)5 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)5 NxAugMatchRpcAddFlowBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchRpcAddFlowBuilder)5