use of org.opendaylight.yangtools.yang.binding.Augmentation in project openflowplugin by opendaylight.
the class ArpSpaConvertorTest method testConvertToOFJava.
@Test
public void testConvertToOFJava() throws Exception {
final NxmOfArpSpaBuilder nxmOfArpSpaBuilder = new NxmOfArpSpaBuilder().setIpv4Address(IPV4_ADDRESS);
final NxAugMatchRpcAddFlowBuilder nxAugMatchRpcAddFlowBuilder = new NxAugMatchRpcAddFlowBuilder();
nxAugMatchRpcAddFlowBuilder.setNxmOfArpSpa(nxmOfArpSpaBuilder.build());
final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
final MatchEntry converted = arpSpaConvertor.convert(extension);
Assert.assertEquals(IpConverter.ipv4AddressToLong(IPV4_ADDRESS), ((ArpSpaCaseValue) converted.getMatchEntryValue()).getArpSpaValues().getValue().longValue());
}
use of org.opendaylight.yangtools.yang.binding.Augmentation in project openflowplugin by opendaylight.
the class Nshc1ConvertorTest method setUp.
@Before
public void setUp() throws Exception {
final NxmNxNshc1Builder nxmNxNshc1Builder = new NxmNxNshc1Builder().setValue(1L);
final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc1(nxmNxNshc1Builder.build());
final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
nshc1Convertor = new Nshc1Convertor();
}
use of org.opendaylight.yangtools.yang.binding.Augmentation in project openflowplugin by opendaylight.
the class Nshc3ConvertorTest method setUp.
@Before
public void setUp() throws Exception {
final NxmNxNshc3Builder nxmNxNshc3Builder = new NxmNxNshc3Builder().setValue(1L);
final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxNshc3(nxmNxNshc3Builder.build());
final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
nshc3Convertor = new Nshc3Convertor();
}
use of org.opendaylight.yangtools.yang.binding.Augmentation 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.yangtools.yang.binding.Augmentation in project openflowplugin by opendaylight.
the class TunIdConvertorTest method setUp.
@Before
public void setUp() throws Exception {
final NxmNxTunIdBuilder nxmNxTunIdBuilder = new NxmNxTunIdBuilder().setValue(BigInteger.ONE);
final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunId(nxmNxTunIdBuilder.build());
final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
tunIdConvertor = new TunIdConvertor();
}
Aggregations