use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.tcp.dst.grouping.NxmOfTcpDstBuilder in project openflowplugin by opendaylight.
the class TcpDstConvertorTest method setUp.
@Before
public void setUp() throws Exception {
final NxmOfTcpDstBuilder nxmOfTcpDstBuilder = new NxmOfTcpDstBuilder().setMask(1).setPort(DEFAULT_PORT);
final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfTcpDst(nxmOfTcpDstBuilder.build());
final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
tcpDstConvertor = new TcpDstConvertor();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.tcp.dst.grouping.NxmOfTcpDstBuilder in project openflowplugin by opendaylight.
the class TcpDstConvertor method convert.
@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
TcpDstCaseValue tcpDstCaseValue = (TcpDstCaseValue) input.getMatchEntryValue();
NxmOfTcpDstBuilder tcpDstBuilder = new NxmOfTcpDstBuilder();
tcpDstBuilder.setPort(tcpDstCaseValue.getTcpDstValues().getPort());
tcpDstBuilder.setMask(tcpDstCaseValue.getTcpDstValues().getMask());
return resolveAugmentation(tcpDstBuilder.build(), path, NxmOfTcpDstKey.class);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.tcp.dst.grouping.NxmOfTcpDstBuilder in project genius by opendaylight.
the class NxMatchTcpDestinationPort method populateBuilder.
@Override
protected void populateBuilder(NxmOfTcpDstBuilder builder) {
builder.setPort(new PortNumber(port));
builder.setMask(mask);
}
Aggregations