Search in sources :

Example 1 with NxmOfUdpSrcBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.udp.src.grouping.NxmOfUdpSrcBuilder in project genius by opendaylight.

the class NxMatchUdpSourcePort method populateBuilder.

@Override
protected void populateBuilder(NxmOfUdpSrcBuilder builder) {
    builder.setPort(new PortNumber(port));
    builder.setMask(mask);
}
Also used : PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber)

Example 2 with NxmOfUdpSrcBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.udp.src.grouping.NxmOfUdpSrcBuilder in project openflowplugin by opendaylight.

the class UdpSrcConvertor method convert.

@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
    UdpSrcCaseValue udpSrcCaseValue = (UdpSrcCaseValue) input.getMatchEntryValue();
    NxmOfUdpSrcBuilder udpSrcBuilder = new NxmOfUdpSrcBuilder();
    udpSrcBuilder.setPort(udpSrcCaseValue.getUdpSrcValues().getPort());
    udpSrcBuilder.setMask(udpSrcCaseValue.getUdpSrcValues().getMask());
    return resolveAugmentation(udpSrcBuilder.build(), path, NxmOfUdpSrcKey.class);
}
Also used : NxmOfUdpSrcBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.udp.src.grouping.NxmOfUdpSrcBuilder) UdpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.UdpSrcCaseValue)

Example 3 with NxmOfUdpSrcBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.udp.src.grouping.NxmOfUdpSrcBuilder in project openflowplugin by opendaylight.

the class UdpSrcConvertorTest method setUp.

@Before
public void setUp() throws Exception {
    final NxmOfUdpSrcBuilder nxmOfUdpSrcBuilder = new NxmOfUdpSrcBuilder().setMask(1).setPort(DEFAULT_PORT);
    final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
    nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfUdpSrc(nxmOfUdpSrcBuilder.build());
    final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
    when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
    udpSrcConvertor = new UdpSrcConvertor();
}
Also used : Extension(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension) Augmentation(org.opendaylight.yangtools.yang.binding.Augmentation) NxAugMatchNodesNodeTableFlowBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlowBuilder) NxmOfUdpSrcBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.udp.src.grouping.NxmOfUdpSrcBuilder) Before(org.junit.Before)

Aggregations

NxmOfUdpSrcBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.udp.src.grouping.NxmOfUdpSrcBuilder)2 Before (org.junit.Before)1 PortNumber (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber)1 UdpSrcCaseValue (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.UdpSrcCaseValue)1 Extension (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension)1 NxAugMatchNodesNodeTableFlowBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxAugMatchNodesNodeTableFlowBuilder)1 Augmentation (org.opendaylight.yangtools.yang.binding.Augmentation)1