src_fm_fc_ms_ff
stringlengths
43
86.8k
target
stringlengths
20
276k
L2FibEntryCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<L2FibEntry, L2FibEntryKey>, ByteDataTranslator, MacTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<L2FibEntry> id, @Nonnull final L2FibEntry dataBefore, @Nonnull fina...
@Test public void testDeleteFilter() throws Exception { final byte[] address_vpp = new byte[]{0x11, 0x22 ,0x33, 0x44 ,0x55, 0x66}; final PhysAddress address = new PhysAddress("11:22:33:44:55:66"); final L2FibEntry entry = generateL2FibFilterEntry(address); final InstanceIdentifier<L2FibEntry> id = getL2FibEntryId(addre...
BridgeDomainCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<BridgeDomain, BridgeDomainKey>, ByteDataTranslator, JvppReplyConsumer, ReferenceCheck { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<BridgeDomain> id, @Nonnull final BridgeDomain dataBefore, @No...
@Test public void testAddBridgeDomain() throws Exception { final int bdId = 1; final String bdName = "bd1"; final BridgeDomain bd = generateBridgeDomain(bdName); noMappingDefined(mappingContext, bdName, BD_CTX_NAME); whenBridgeDomainAddDelThenSuccess(); customizer.writeCurrentAttributes(bdIdentifierForName(bdName), bd,...
Ipv4RouteCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Route, RouteKey>, JvppReplyConsumer, RouteMapper { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Route> instanceIdentifier, @Nonnull final Route route, @Nonnull final WriteContext writeContext) throws Writ...
@Test public void testDeleteSingleHop( @InjectTestData(resourcePath = "/ipv4/simplehop/simpleHopRouteWithClassifier.json", id = STATIC_ROUTE_PATH) StaticRoutes route) throws WriteFailedException { customizer.deleteCurrentAttributes(ROUTE_IID, getIpv4RouteWithId(route, new Ipv4Prefix("192.168.2.1/24")), writeContext); v...
BridgeDomainCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<BridgeDomain, BridgeDomainKey>, ByteDataTranslator, JvppReplyConsumer, ReferenceCheck { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<BridgeDomain> id, @Nonnull final BridgeDomain dataBefore, @N...
@Test public void testDeleteBridgeDomain() throws Exception { final int bdId = 1; final String bdName = "bd1"; final BridgeDomain bd = generateBridgeDomain(bdName); defineMapping(mappingContext, bdName, bdId, BD_CTX_NAME); when(writeContext.readAfter(InstanceIdentifier.create(Interfaces.class))).thenReturn(Optional.emp...
BridgeDomainCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<BridgeDomain, BridgeDomainKey>, ByteDataTranslator, JvppReplyConsumer, ReferenceCheck { @Override public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<BridgeDomain> id, @Nonnull final BridgeDomain dataBefore, @N...
@Test public void testUpdateBridgeDomain() throws Exception { final int bdId = 1; final String bdName = "bd1"; defineMapping(mappingContext, bdName, bdId, BD_CTX_NAME); final byte arpTermBefore = 1; final byte floodBefore = 1; final byte forwardBefore = 0; final byte learnBefore = 1; final byte uufBefore = 0; final Bri...
Ipv4NeighbourValidator implements Validator<Neighbor> { @Override public void validateWrite(@Nonnull final InstanceIdentifier<Neighbor> id, @Nonnull final Neighbor dataAfter, @Nonnull final WriteContext writeContext) throws DataValidationFailedException.CreateValidationFailedException { checkNeighborData(id, dataAfter)...
@Test public void testWriteSuccessful() throws DataValidationFailedException.CreateValidationFailedException { validator.validateWrite(IID, getNeighbor(IP_ADDR, MAC_ADDR), writeContext); } @Test(expected = NullPointerException.class) public void testWriteFailedMissingIP() throws DataValidationFailedException.CreateVali...
Ipv4NeighbourValidator implements Validator<Neighbor> { @Override public void validateDelete(@Nonnull final InstanceIdentifier<Neighbor> id, @Nonnull final Neighbor dataBefore, @Nonnull final WriteContext writeContext) throws DataValidationFailedException.DeleteValidationFailedException { checkNeighborData(id, dataBefo...
@Test public void testDeleteSuccessful() throws DataValidationFailedException.DeleteValidationFailedException { validator.validateDelete(IID, getNeighbor(IP_ADDR, MAC_ADDR), writeContext); }
Ipv4NeighbourCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Neighbor, NeighborKey>, ByteDataTranslator, AddressTranslator, IpWriter, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<Neighbor> id, @Nonnull Neighbor data, @Nonnull WriteContext w...
@Test public void testWriteCurrentAttributes() throws WriteFailedException { when(api.ipNeighborAddDel(any())).thenReturn(future(new IpNeighborAddDelReply())); customizer.writeCurrentAttributes(IID, getData(), writeContext); verify(api).ipNeighborAddDel(getExpectedRequest(true)); } @Test public void testWriteCurrentAtt...
Ipv4NeighbourCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Neighbor, NeighborKey>, ByteDataTranslator, AddressTranslator, IpWriter, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<Neighbor> id, @Nonnull Neighbor data, @Nonnull WriteContext ...
@Test public void testDeleteCurrentAttributes() throws WriteFailedException { when(api.ipNeighborAddDel(any())).thenReturn(future(new IpNeighborAddDelReply())); customizer.deleteCurrentAttributes(IID, getData(), writeContext); verify(api).ipNeighborAddDel(getExpectedRequest(false)); } @Test public void testDeleteCurren...
Ipv4AddressValidator implements Validator<Address> { @Override public void validateWrite(@Nonnull final InstanceIdentifier<Address> id, @Nonnull final Address dataAfter, @Nonnull final WriteContext writeContext) throws DataValidationFailedException.CreateValidationFailedException { checkAddress(dataAfter); } Ipv4Addres...
@Test public void testWriteSuccessful() throws DataValidationFailedException.CreateValidationFailedException { PrefixLength length = new PrefixLengthBuilder().setPrefixLength(new Integer(24).shortValue()).build(); validator.validateWrite(Ipv4AddressCustomizerTest.getAddressId(IFC_NAME), createAddress(length), writeCont...
Ipv4AddressValidator implements Validator<Address> { @Override public void validateDelete(@Nonnull final InstanceIdentifier<Address> id, @Nonnull final Address dataBefore, @Nonnull final WriteContext writeContext) throws DataValidationFailedException.DeleteValidationFailedException { checkAddress(dataBefore); } Ipv4Add...
@Test public void testDeleteSuccessful() throws DataValidationFailedException.DeleteValidationFailedException { PrefixLength length = new PrefixLengthBuilder().setPrefixLength(new Integer(24).shortValue()).build(); validator.validateDelete(Ipv4AddressCustomizerTest.getAddressId(IFC_NAME), createAddress(length), writeCo...
Ipv4AddressCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Address, AddressKey>, IpWriter { @Override public void writeCurrentAttributes(InstanceIdentifier<Address> id, Address dataAfter, WriteContext writeContext) throws WriteFailedException { final String interfaceName = id.firstKeyOf(Interfac...
@Test public void testAddPrefixLengthIpv4Address() throws Exception { final InstanceIdentifier<Address> id = getAddressId(IFACE_NAME); Ipv4AddressNoZone noZoneIp = new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")); PrefixLength length = new PrefixLengthBuilder().setPrefixLength(new Integer(24).shortValue()).build()...
Ipv4AddressCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Address, AddressKey>, IpWriter { @Override public void deleteCurrentAttributes(InstanceIdentifier<Address> id, Address dataBefore, WriteContext writeContext) throws WriteFailedException { final String interfaceName = id.firstKeyOf(Interf...
@Test public void testDeletePrefixLengthIpv4Address() throws Exception { final InstanceIdentifier<Address> id = getAddressId(IFACE_NAME); Ipv4AddressNoZone noZoneIp = new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")); PrefixLength length = new PrefixLengthBuilder().setPrefixLength(new Integer(24).shortValue()).buil...
Ipv6NeighbourCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Neighbor, NeighborKey>, ByteDataTranslator, AddressTranslator, IpWriter, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<Neighbor> id, @Nonnull Neighbor dataAfter, @Nonnull WriteCont...
@Test public void testWriteCurrentAttributes() throws WriteFailedException { when(api.ipNeighborAddDel(any())).thenReturn(future(new IpNeighborAddDelReply())); customizer.writeCurrentAttributes(IID, getData(), writeContext); verify(api).ipNeighborAddDel(getExpectedRequest(true)); } @Test public void testWriteCurrentAtt...
Ipv6RouteCustomizer implements ListReaderCustomizer<Route, RouteKey, RouteBuilder>, RouteMapper, Ipv6RoutePathParser { @Nonnull @Override public List<RouteKey> getAllIds(@Nonnull final InstanceIdentifier<Route> instanceIdentifier, @Nonnull final ReadContext readContext) throws ReadFailedException { final Optional<Ip6Fi...
@Test public void getAllIds() throws Exception { final List<RouteKey> keys = getCustomizer().getAllIds(routeIdSpecialHop, ctx); assertThat(keys, hasSize(4)); assertThat(keys, hasItems(new RouteKey(new Ipv6Prefix("2001:db8:a0b:12f0::1/24")), new RouteKey(new Ipv6Prefix("2001:db8:a0b:12f0::2/22")), new RouteKey(new Ipv6P...
Ipv6NeighbourCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Neighbor, NeighborKey>, ByteDataTranslator, AddressTranslator, IpWriter, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<Neighbor> id, @Nonnull Neighbor dataBefore, @Nonnull WriteCo...
@Test public void testDeleteCurrentAttributes() throws WriteFailedException { when(api.ipNeighborAddDel(any())).thenReturn(future(new IpNeighborAddDelReply())); customizer.deleteCurrentAttributes(IID, getData(), writeContext); verify(api).ipNeighborAddDel(getExpectedRequest(false)); } @Test public void testDeleteCurren...
NdProxyCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<NdProxy, NdProxyKey>, AddressTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<NdProxy> id, @Nonnull final NdProxy dataAfter, @Nonnull final WriteContext writeContext) throws Write...
@Test public void testWrite() throws WriteFailedException { final Ipv6AddressNoZone address = new Ipv6AddressNoZone("2001::1"); final NdProxy data = new NdProxyBuilder().setAddress(address).build(); customizer.writeCurrentAttributes(getId(address), data, writeContext); final Ip6NdProxyAddDel request = new Ip6NdProxyAdd...
NdProxyCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<NdProxy, NdProxyKey>, AddressTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<NdProxy> id, @Nonnull final NdProxy dataBefore, @Nonnull final WriteContext writeContext) throws Wri...
@Test public void testDelete() throws WriteFailedException { final Ipv6AddressNoZone address = new Ipv6AddressNoZone("2001::3"); final NdProxy data = new NdProxyBuilder().setAddress(address).build(); customizer.deleteCurrentAttributes(getId(address), data, writeContext); final Ip6NdProxyAddDel request = new Ip6NdProxyA...
Ipv6NeighbourValidator implements Validator<Neighbor> { @Override public void validateWrite(@Nonnull final InstanceIdentifier<Neighbor> id, @Nonnull final Neighbor dataAfter, @Nonnull final WriteContext writeContext) throws DataValidationFailedException.CreateValidationFailedException { testNeighbor(id, dataAfter); } I...
@Test public void testWriteSuccessful() throws DataValidationFailedException.CreateValidationFailedException { validator.validateWrite(IID, getNeighbor(IP_ADDR, MAC_ADDR), writeContext); } @Test(expected = NullPointerException.class) public void testWriteFailedMissingIP() throws DataValidationFailedException.CreateVali...
Ipv6NeighbourValidator implements Validator<Neighbor> { @Override public void validateDelete(@Nonnull final InstanceIdentifier<Neighbor> id, @Nonnull final Neighbor dataBefore, @Nonnull final WriteContext writeContext) throws DataValidationFailedException.DeleteValidationFailedException { testNeighbor(id, dataBefore); ...
@Test public void testDeleteSuccessful() throws DataValidationFailedException.DeleteValidationFailedException { validator.validateDelete(IID, getNeighbor(IP_ADDR, MAC_ADDR), writeContext); }
Ipv4Customizer extends FutureJVppCustomizer implements ReaderCustomizer<Ipv4, Ipv4Builder> { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ipv4> id, @Nonnull final Ipv4Builder builder, @Nonnull final ReadContext ctx) throws ReadFailedException { LOG.debug("Reading Ipv4 leaves (mtu, forwa...
@Test public void testReadCurrentAttributes() throws Exception { customizer.readCurrentAttributes(null, null, ctx); verifyZeroInteractions(api); }
Ipv6RouteCustomizer implements ListReaderCustomizer<Route, RouteKey, RouteBuilder>, RouteMapper, Ipv6RoutePathParser { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Route> instanceIdentifier, @Nonnull final RouteBuilder routeBuilder, @Nonnull final ReadContext readContext) throws ReadFai...
@Test public void readCurrentAttributesSpecialHop() throws Exception { final RouteBuilder builder = new RouteBuilder(); getCustomizer().readCurrentAttributes(routeIdSpecialHop, builder, ctx); assertEquals(new Ipv6Prefix("2001:db8:a0b:12f0::1/24"), builder.getDestinationPrefix()); assertEquals("2001:db8:a0b:12f0::1/24",...
FibTableCustomizer implements InitializingListReaderCustomizer<Table, TableKey, TableBuilder>, ByteDataTranslator { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Table> instanceIdentifier, @Nonnull final TableBuilder builder, @Nonnull final ReadContext readContext) throws ReadFailedExcep...
@Test public void readCurrentAttributesSimpleHop() throws Exception { TableBuilder builder = new TableBuilder(); getCustomizer().readCurrentAttributes(TABLE_V6_ID, builder, ctx); Assert.assertEquals(Ipv6.class, builder.getAddressFamily()); Assert.assertEquals(1L, builder.getTableId().getValue().longValue()); Assert.ass...
Ipv4NeighbourCustomizer extends IpNeighbourReader implements ListReaderCustomizer<Neighbor, NeighborKey, NeighborBuilder> { @Override public List<NeighborKey> getAllIds(InstanceIdentifier<Neighbor> id, ReadContext context) throws ReadFailedException { return getNeighborKeys(interfaceNeighboursDump(id, context), keyMapp...
@Test public void testGetAll() throws ReadFailedException { verifyList(Arrays.asList(new NeighborKey(IPV4_ONE_ADDRESS), new NeighborKey(IPV4_TWO_ADDRESS)), getCustomizer().getAllIds(instanceIdentifier, ctx)); }
Ipv4NeighbourCustomizer extends IpNeighbourReader implements ListReaderCustomizer<Neighbor, NeighborKey, NeighborBuilder> { @Override public void readCurrentAttributes(InstanceIdentifier<Neighbor> id, NeighborBuilder builder, ReadContext ctx) throws ReadFailedException { final Ipv4AddressNoZone ip = id.firstKeyOf(Neigh...
@Test public void readCurrent() throws ReadFailedException { final NeighborBuilder builder = new NeighborBuilder(); getCustomizer().readCurrentAttributes(instanceIdentifier, builder, ctx); assertEquals(IPV4_ONE_ADDRESS, builder.getIp()); assertEquals(MAC_ONE_ADDRESS, builder.getLinkLayerAddress()); }
Ipv4AddressCustomizer extends IpAddressReader implements InitializingListReaderCustomizer<Address, AddressKey, AddressBuilder> { @Override public void readCurrentAttributes(@Nonnull InstanceIdentifier<Address> id, @Nonnull AddressBuilder builder, @Nonnull ReadContext ctx) throws ReadFailedException { LOG.debug("Reading...
@Test public void testReadCurrentAttributesSuccessfull() throws ReadFailedException { IpAddressDetails detail1 = new IpAddressDetails(); IpAddressDetails detail2 = new IpAddressDetails(); IpAddressDetails detail3 = new IpAddressDetails(); detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192....
Ipv4AddressCustomizer extends IpAddressReader implements InitializingListReaderCustomizer<Address, AddressKey, AddressBuilder> { @Override public List<AddressKey> getAllIds(@Nonnull InstanceIdentifier<Address> id, @Nonnull ReadContext ctx) throws ReadFailedException { LOG.debug("Reading list of keys for interface addre...
@Test public void testGetAllIdsFromSuccessfull() throws ReadFailedException { IpAddressDetails detail1 = new IpAddressDetails(); IpAddressDetails detail2 = new IpAddressDetails(); IpAddressDetails detail3 = new IpAddressDetails(); detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"...
Ipv6AddressCustomizer extends IpAddressReader implements InitializingListReaderCustomizer<Address, AddressKey, AddressBuilder> { @Override public List<AddressKey> getAllIds(@Nonnull InstanceIdentifier<Address> id, @Nonnull ReadContext ctx) throws ReadFailedException { LOG.debug("Reading list of keys for interface addre...
@Test public void testGetAll() throws ReadFailedException { verifyList(Arrays.asList( new AddressKey(IPV6_ONE_ADDRESS_COMPRESSED), new AddressKey(IPV6_TWO_ADDRESS_COMPRESSED)), getCustomizer().getAllIds(instanceIdentifier, ctx)); }
Ipv6AddressCustomizer extends IpAddressReader implements InitializingListReaderCustomizer<Address, AddressKey, AddressBuilder> { @Override public void readCurrentAttributes(@Nonnull InstanceIdentifier<Address> id, @Nonnull AddressBuilder builder, @Nonnull ReadContext ctx) throws ReadFailedException { LOG.debug("Reading...
@Test public void testReadCurrent() throws ReadFailedException { AddressBuilder builder = new AddressBuilder(); getCustomizer().readCurrentAttributes(instanceIdentifier, builder, ctx); assertEquals(IPV6_TWO_ADDRESS_COMPRESSED, builder.getIp()); assertEquals(IPV6_TWO_PREFIX, builder.getPrefixLength().longValue()); }
Ipv6NeighbourCustomizer extends IpNeighbourReader implements ListReaderCustomizer<Neighbor, NeighborKey, NeighborBuilder> { @Override public List<NeighborKey> getAllIds(InstanceIdentifier<Neighbor> id, ReadContext context) throws ReadFailedException { return getNeighborKeys(interfaceNeighboursDump(id, context), keyMapp...
@Test public void testGetAll() throws ReadFailedException { verifyList(Arrays.asList( new NeighborKey(IPV6_ONE_ADDRESS_COMPRESSED), new NeighborKey(IPV6_TWO_ADDRESS_COMPRESSED)), getCustomizer().getAllIds(instanceIdentifier, ctx)); }
Ipv6NeighbourCustomizer extends IpNeighbourReader implements ListReaderCustomizer<Neighbor, NeighborKey, NeighborBuilder> { @Override public void readCurrentAttributes(InstanceIdentifier<Neighbor> id, NeighborBuilder builder, ReadContext ctx) throws ReadFailedException { final Ipv6AddressNoZone ip = id.firstKeyOf(Neigh...
@Test public void readCurrent() throws ReadFailedException { final NeighborBuilder builder = new NeighborBuilder(); getCustomizer().readCurrentAttributes(instanceIdentifier, builder, ctx); assertEquals(IPV6_ONE_ADDRESS_COMPRESSED, builder.getIp()); assertEquals(MAC_THREE_ADDRESS, builder.getLinkLayerAddress()); }
NdProxyCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<NdProxy, NdProxyKey, NdProxyBuilder>, JvppReplyConsumer, Ipv6Translator { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<NdProxy> id, @Nonnull final NdProxyBuilder builder, @Nonnull final ReadCo...
@Test public void readCurrent() throws ReadFailedException { final NdProxyBuilder builder = new NdProxyBuilder(); final Ipv6AddressNoZone address = new Ipv6AddressNoZone("2001::1"); getCustomizer().readCurrentAttributes(getId(IF1_NAME, address), builder, ctx); assertEquals(builder.getAddress(), address); }
NdProxyCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<NdProxy, NdProxyKey, NdProxyBuilder>, JvppReplyConsumer, Ipv6Translator { @Nonnull @Override public List<NdProxyKey> getAllIds(@Nonnull final InstanceIdentifier<NdProxy> id, @Nonnull final ReadContext context) throws ReadFail...
@Test public void testGetAllInterface1() throws ReadFailedException { final List<NdProxyKey> allIds = getCustomizer().getAllIds(getProxiesId(IF1_NAME).child(NdProxy.class), ctx); assertThat(allIds, containsInAnyOrder( new NdProxyKey(new Ipv6AddressNoZone("2001::1")), new NdProxyKey(new Ipv6AddressNoZone("2001::2")) ));...
NdProxyCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<NdProxy, NdProxyKey, NdProxyBuilder>, JvppReplyConsumer, Ipv6Translator { @Nonnull @Override public Initialized<? extends DataObject> init(@Nonnull final InstanceIdentifier<NdProxy> id, @Nonnull final NdProxy ndProxy, @Nonnul...
@Test public void testInit() { final Ipv6AddressNoZone address = new Ipv6AddressNoZone("2001::1"); final InstanceIdentifier<NdProxy> id = getId(IF1_NAME, address); invokeInitTest( id, new NdProxyBuilder().setAddress(address).build(), getCfgId(id), new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.nd.proxy.rev1905...
GpeFeatureCustomizer extends FutureJVppCustomizer implements WriterCustomizer<GpeFeatureData>, JvppReplyConsumer, ByteDataTranslator { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<GpeFeatureData> id, @Nonnull final GpeFeatureData dataAfter, @Nonnull final WriteContext writeContext) thr...
@Test public void testWrite() throws WriteFailedException { when(api.gpeEnableDisable(any())).thenReturn(future(new GpeEnableDisableReply())); customizer.writeCurrentAttributes(InstanceIdentifier.create(GpeFeatureData.class), new GpeFeatureDataBuilder().setEnable(true).build(), writeContext); verify(api, times(1)).gpeE...
GpeFeatureCustomizer extends FutureJVppCustomizer implements WriterCustomizer<GpeFeatureData>, JvppReplyConsumer, ByteDataTranslator { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<GpeFeatureData> id, @Nonnull final GpeFeatureData dataBefore, @Nonnull final WriteContext writeContext) t...
@Test public void testDelete() throws WriteFailedException { when(api.gpeEnableDisable(any())).thenReturn(future(new GpeEnableDisableReply())); customizer.deleteCurrentAttributes(InstanceIdentifier.create(GpeFeatureData.class), new GpeFeatureDataBuilder().setEnable(true).build(), writeContext); verify(api, times(1)).gp...
NativeForwardPathsTableCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<NativeForwardPathsTable, NativeForwardPathsTableKey>, ByteDataTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<NativeForwardPathsTable> id, @Nonnull final ...
@Test public void testWriteValid() throws WriteFailedException { when(api.gpeAddDelNativeFwdRpath(any())).thenReturn(future(new GpeAddDelNativeFwdRpathReply())); customizer.writeCurrentAttributes(validId, validTable(), writeContext); verify(api, times(1)).gpeAddDelIface(requestCaptor.capture()); final List<GpeAddDelIfa...
NativeForwardPathsTableCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<NativeForwardPathsTable, NativeForwardPathsTableKey>, ByteDataTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<NativeForwardPathsTable> id, @Nonnull final...
@Test public void testDeleteValid() throws WriteFailedException { when(api.gpeAddDelNativeFwdRpath(any())).thenReturn(future(new GpeAddDelNativeFwdRpathReply())); customizer.deleteCurrentAttributes(validId, validTable(), writeContext); verify(api, times(1)).gpeAddDelIface(requestCaptor.capture()); final List<GpeAddDelI...
NativeForwardPathCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<NativeForwardPath, NativeForwardPathKey>, AddressTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<NativeForwardPath> id, @Nonnull final NativeForwardPath dataAfter, @Non...
@Test public void testWriteV4WithIfc() throws WriteFailedException { customizer.writeCurrentAttributes(validId, v4WithIfc(), writeContext); verify(api, times(1)).gpeAddDelNativeFwdRpath(requestCaptor.capture()); final GpeAddDelNativeFwdRpath request = requestCaptor.getValue(); assertEquals(desiredRequest(1, 1, V4_WITH_...
GpeFeatureCustomizer extends FutureJVppCustomizer implements InitializingReaderCustomizer<GpeFeatureData, GpeFeatureDataBuilder>, JvppReplyConsumer, ByteDataTranslator { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<GpeFeatureData> id, @Nonnull final GpeFeatureDataBuilder builder...
@Test public void testReadCurrent() throws ReadFailedException { final ShowLispStatusReply result = new ShowLispStatusReply(); result.gpeStatus = 1; when(api.showLispStatus(any())).thenReturn(future(result)); final GpeFeatureDataBuilder builder = new GpeFeatureDataBuilder(); getCustomizer().readCurrentAttributes(Instan...
GpeFeatureCustomizer extends FutureJVppCustomizer implements InitializingReaderCustomizer<GpeFeatureData, GpeFeatureDataBuilder>, JvppReplyConsumer, ByteDataTranslator { @Nonnull @Override public Initialized<? extends DataObject> init(@Nonnull final InstanceIdentifier<GpeFeatureData> id, @Nonnull final GpeFeatu...
@Test public void testInit() { final InstanceIdentifier<GpeFeatureData> CONFIG_ID = InstanceIdentifier.create(Gpe.class).child(GpeFeatureData.class); final InstanceIdentifier<GpeFeatureData> STATE_ID = InstanceIdentifier.create(GpeState.class).child(GpeFeatureData.class); final GpeFeatureData data = new GpeFeatureDataB...
GpeForwardEntryCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<GpeEntry, GpeEntryKey, GpeEntryBuilder>, JvppReplyConsumer, EidTranslator { @Nonnull @Override public List<GpeEntryKey> getAllIds(@Nonnull final InstanceIdentifier<GpeEntry> id, @Nonnull final ReadContext context)...
@Test public void testGetAll() throws ReadFailedException { final List<GpeEntryKey> allIds = getCustomizer().getAllIds(V4_IDENTIFIER, ctx); assertTrue(allIds.containsAll(Arrays.asList(new GpeEntryKey(V4_ENTRY_ID), new GpeEntryKey(V6_ENTRY_ID), new GpeEntryKey(MAC_ENTRY_ID)))); }
GpeForwardEntryCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<GpeEntry, GpeEntryKey, GpeEntryBuilder>, JvppReplyConsumer, EidTranslator { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<GpeEntry> id, @Nonnull final GpeEntryBuilder builder, @Nonn...
@Test public void testReadCurrentV4Entry() throws ReadFailedException { mockLocatorDump(); final GpeEntryBuilder builder = new GpeEntryBuilder(); getCustomizer().readCurrentAttributes(V4_IDENTIFIER, builder, ctx); assertEquals(V4_ENTRY_ID, builder.getId()); assertEquals(10, builder.getDpTable().intValue()); assertTrue(...
GpeForwardEntryCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<GpeEntry, GpeEntryKey, GpeEntryBuilder>, JvppReplyConsumer, EidTranslator { @Nonnull @Override public Initialized<? extends DataObject> init(@Nonnull final InstanceIdentifier<GpeEntry> id, @Nonnull final GpeEntry ...
@Test public void testInit() { final InstanceIdentifier<GpeEntry> CONFIG_ID = InstanceIdentifier.create(Gpe.class).child(GpeFeatureData.class).child(GpeEntryTable.class) .child(GpeEntry.class, new GpeEntryKey(V4_ENTRY_ID)); final InstanceIdentifier<GpeEntry> STATE_ID = InstanceIdentifier.create(GpeState.class).child(Gp...
NativeForwardPathsTableCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<NativeForwardPathsTable, NativeForwardPathsTableKey, NativeForwardPathsTableBuilder>, JvppReplyConsumer { @Nonnull @Override public List<NativeForwardPathsTableKey> getAllIds(@Nonnull final Instanc...
@Test public void testGetAll() throws ReadFailedException { final List<NativeForwardPathsTableKey> allIds = getCustomizer().getAllIds(validId, ctx); assertEquals(3, allIds.size()); assertTrue(allIds.contains(new NativeForwardPathsTableKey((long) TABLE_0_IDX))); assertTrue(allIds.contains(new NativeForwardPathsTableKey(...
NativeForwardPathsTableCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<NativeForwardPathsTable, NativeForwardPathsTableKey, NativeForwardPathsTableBuilder>, JvppReplyConsumer { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<NativeForward...
@Test public void testReadCurrent() throws ReadFailedException { NativeForwardPathsTableBuilder builder = new NativeForwardPathsTableBuilder(); getCustomizer().readCurrentAttributes(validId, builder, ctx); final long lTableId = TABLE_0_IDX; assertEquals(lTableId, builder.getTableId().intValue()); assertEquals(lTableId,...
NativeForwardPathCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<NativeForwardPath, NativeForwardPathKey, NativeForwardPathBuilder>, JvppReplyConsumer, AddressTranslator { @Nonnull @Override public List<NativeForwardPathKey> getAllIds(@Nonnull final InstanceIdentifier<NativeF...
@Test public void testGetAll() throws ReadFailedException { final List<NativeForwardPathKey> allIds = getCustomizer().getAllIds(validId, ctx); assertEquals(2, allIds.size()); final String firstAddress = allIds.get(0).getNextHopAddress().getIpv6Address().getValue(); final String secondAddress = allIds.get(1).getNextHopA...
NativeForwardPathCustomizer extends FutureJVppCustomizer implements InitializingListReaderCustomizer<NativeForwardPath, NativeForwardPathKey, NativeForwardPathBuilder>, JvppReplyConsumer, AddressTranslator { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<NativeForwardPath> id, @No...
@Test public void testReadCurrent() throws ReadFailedException { final NativeForwardPathBuilder builder = new NativeForwardPathBuilder(); getCustomizer().readCurrentAttributes(validId, builder, ctx); assertEquals("192.168.2.1", builder.getNextHopAddress().getIpv4Address().getValue()); assertEquals(ETH_1, builder.getNex...
PitrCfgCustomizer extends CheckedLispCustomizer implements WriterCustomizer<PitrCfg>, JvppReplyConsumer, ByteDataTranslator { @Override public void writeCurrentAttributes(InstanceIdentifier<PitrCfg> id, PitrCfg dataAfter, WriteContext writeContext) throws WriteFailedException { lispStateCheckService.checkLispEnabledAft...
@Test(expected = NullPointerException.class) public void testWriteCurrentAttributesNullData() throws WriteFailedException { customizer.writeCurrentAttributes(null, null, null); } @Test(expected = NullPointerException.class) public void testWriteCurrentAttributesBadData() throws WriteFailedException { customizer.writeCu...
PitrCfgCustomizer extends CheckedLispCustomizer implements WriterCustomizer<PitrCfg>, JvppReplyConsumer, ByteDataTranslator { @Override public void updateCurrentAttributes(InstanceIdentifier<PitrCfg> id, PitrCfg dataBefore, PitrCfg dataAfter, WriteContext writeContext) throws WriteFailedException { lispStateCheckServic...
@Test public void testUpdateCurrentAttributes() throws WriteFailedException { PitrCfg cfg = new PitrCfgBuilder().setLocatorSet("Locator").build(); whenLispPitrSetLocatorSetThenSuccess(); customizer.writeCurrentAttributes(null, cfg, null); ArgumentCaptor<OnePitrSetLocatorSet> cfgCaptor = ArgumentCaptor.forClass(OnePitrS...
PitrCfgCustomizer extends CheckedLispCustomizer implements WriterCustomizer<PitrCfg>, JvppReplyConsumer, ByteDataTranslator { @Override public void deleteCurrentAttributes(InstanceIdentifier<PitrCfg> id, PitrCfg dataBefore, WriteContext writeContext) throws WriteFailedException { lispStateCheckService.checkLispEnabledB...
@Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesNullData() throws WriteFailedException { customizer.deleteCurrentAttributes(null, null, null); } @Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesBadData() throws WriteFailedException { customizer.dele...
ControlPlaneProtocolCustomizer implements ListReaderCustomizer<ControlPlaneProtocol, ControlPlaneProtocolKey, ControlPlaneProtocolBuilder>, RouteMapper { @Nonnull @Override public List<ControlPlaneProtocolKey> getAllIds(@Nonnull final InstanceIdentifier<ControlPlaneProtocol> instanceIdentifier, @Nonnull final R...
@Test public void getAllIds() throws Exception { final List<ControlPlaneProtocolKey> keys = getCustomizer().getAllIds(InstanceIdentifier.create(ControlPlaneProtocol.class), ctx); assertThat(keys, hasSize(3)); assertThat(keys, hasItems(new ControlPlaneProtocolKey(ROUTE_PROTOCOL_NAME, Static.class), new ControlPlaneProto...
LocatorSetCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<LocatorSet, LocatorSetKey>, ByteDataTranslator, LocatorSetReader, ReferenceCheck { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<LocatorSet> id, @Nonnull LocatorSet dataAfter, @Nonnull WriteContext writ...
@Test(expected = NoSuchElementException.class) public void testWriteCurrentAttributesNullData() throws WriteFailedException { customizer.writeCurrentAttributes(null, null, writeContext); } @Test(expected = NoSuchElementException.class) public void testWriteCurrentAttributesBadData() throws WriteFailedException { custom...
LocatorSetCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<LocatorSet, LocatorSetKey>, ByteDataTranslator, LocatorSetReader, ReferenceCheck { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<LocatorSet> id, @Nonnull LocatorSet dataBefore, @Nonnull WriteContext wr...
@Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesNullData() throws WriteFailedException { customizer.deleteCurrentAttributes(null, null, writeContext); } @Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesBadData() throws WriteFailedException { customi...
ControlPlaneProtocolCustomizer implements ListReaderCustomizer<ControlPlaneProtocol, ControlPlaneProtocolKey, ControlPlaneProtocolBuilder>, RouteMapper { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<ControlPlaneProtocol> instanceIdentifier, @Nonnull final ControlPlaneProtocolBui...
@Test public void readCurrentAttributes() throws Exception { final InstanceIdentifier<ControlPlaneProtocol> identifier = InstanceIdentifier.create(ControlPlaneProtocols.class) .child(ControlPlaneProtocol.class, new ControlPlaneProtocolKey(ROUTE_PROTOCOL_NAME, Static.class)); final ControlPlaneProtocolBuilder builder = ...
VrfSubtableCustomizer extends FutureJVppCustomizer implements WriterCustomizer<VrfSubtable>, SubtableWriter { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<VrfSubtable> id, @Nonnull final VrfSubtable dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException { chec...
@Test public void testWriteSuccessfull() throws WriteFailedException { whenAddDelEidTableAddDelMapSuccess(); customizer.writeCurrentAttributes(validId, validData, writeContext); verifyAddDelEidTableAddDelMapInvokedCorrectly(1, 12, 10, 0); } @Test public void testWriteFailed() { whenAddDelEidTableAddDelMapFail(); try { ...
VrfSubtableCustomizer extends FutureJVppCustomizer implements WriterCustomizer<VrfSubtable>, SubtableWriter { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<VrfSubtable> id, @Nonnull final VrfSubtable dataBefore, @Nonnull final WriteContext writeContext) throws WriteFailedException { ch...
@Test public void testDeleteSuccessfull() throws WriteFailedException { whenAddDelEidTableAddDelMapSuccess(); customizer.deleteCurrentAttributes(validId, validData, writeContext); verifyAddDelEidTableAddDelMapInvokedCorrectly(0, 12, 10, 0); } @Test public void testDeleteFailed() { whenAddDelEidTableAddDelMapFail(); try...
AdjacencyCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Adjacency, AdjacencyKey>, ByteDataTranslator, EidTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Adjacency> id, @Nonnull final Adjacency dataAfter, @Nonnull final Write...
@Test public void writeCurrentAttributesNoKey() throws Exception { try { customizer.writeCurrentAttributes(emptyId, failDataBefore, writeContext); } catch (NullPointerException e) { verify(api, times(0)).oneAddDelAdjacency(any()); return; } fail("Test should have failed while reading parent vni table id"); } @Test publ...
Ipv4RouteCustomizer implements ListReaderCustomizer<Route, RouteKey, RouteBuilder>, RouteMapper, Ipv4RoutePathParser { @Nonnull @Override public List<RouteKey> getAllIds(@Nonnull final InstanceIdentifier<Route> instanceIdentifier, @Nonnull final ReadContext readContext) throws ReadFailedException { final Optional<IpFib...
@Test public void getAllIds() throws Exception { final List<RouteKey> keys = getCustomizer().getAllIds(routeIdSpecialHop, ctx); assertThat(keys, hasSize(3)); assertThat(keys, hasItems(new RouteKey(new Ipv4Prefix("192.168.2.1/24")), new RouteKey(new Ipv4Prefix("192.168.2.2/22")), new RouteKey(new Ipv4Prefix("192.168.2.2...
AdjacencyCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Adjacency, AdjacencyKey>, ByteDataTranslator, EidTranslator, JvppReplyConsumer { @Override public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Adjacency> id, @Nonnull final Adjacency dataBefore, @Nonnull final Adj...
@Test(expected = UnsupportedOperationException.class) public void updateCurrentAttributesFail() throws Exception { customizer.updateCurrentAttributes(emptyId, failDataBefore, failDataAfter, writeContext); } @Test public void updateCurrentAttributesIgnore() throws Exception { customizer.updateCurrentAttributes(emptyId, ...
AdjacencyCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Adjacency, AdjacencyKey>, ByteDataTranslator, EidTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Adjacency> id, @Nonnull final Adjacency dataBefore, @Nonnull final Wri...
@Test public void deleteCurrentAttributesNoKey() throws Exception { try { customizer.deleteCurrentAttributes(emptyId, failDataBefore, writeContext); } catch (NullPointerException e) { verify(api, times(0)).oneAddDelAdjacency(any()); return; } fail("Test should have failed while reading parent vni table id"); } @Test(ex...
LispCustomizer extends FutureJVppCustomizer implements WriterCustomizer<Lisp>, ByteDataTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Lisp> id, @Nonnull final Lisp dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException { Precondit...
@Test(expected = NullPointerException.class) public void testWriteCurrentAttributesNullData() throws WriteFailedException { customizer.writeCurrentAttributes(null, null, null); } @Test public void testWriteCurrentAttributes() throws WriteFailedException { Lisp intf = new LispBuilder().setEnable(true).build(); whenlispE...
Ipv4RouteCustomizer implements ListReaderCustomizer<Route, RouteKey, RouteBuilder>, RouteMapper, Ipv4RoutePathParser { @Override public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Route> instanceIdentifier, @Nonnull final RouteBuilder routeBuilder, @Nonnull final ReadContext readContext) throws ReadFai...
@Test public void readCurrentAttributesSpecialHop() throws Exception { final RouteBuilder builder = new RouteBuilder(); getCustomizer().readCurrentAttributes(routeIdSpecialHop, builder, ctx); assertEquals(new Ipv4Prefix("192.168.2.1/24"), builder.getDestinationPrefix()); NextHopOptions hopOptions = builder.getNextHop()...
LispCustomizer extends FutureJVppCustomizer implements WriterCustomizer<Lisp>, ByteDataTranslator, JvppReplyConsumer { @Override public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Lisp> id, @Nonnull final Lisp dataBefore, @Nonnull final Lisp dataAfter, @Nonnull final WriteContext writeContext) throws...
@Test(expected = NullPointerException.class) public void testUpdateCurrentAttributesNullData() throws WriteFailedException { customizer.updateCurrentAttributes(null, null, null, null); } @Test public void testUpdateCurrentAttributes() throws WriteFailedException { Lisp lisp = new LispBuilder().setEnable(true).build(); ...
LispCustomizer extends FutureJVppCustomizer implements WriterCustomizer<Lisp>, ByteDataTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Lisp> id, @Nonnull final Lisp dataBefore, @Nonnull final WriteContext writeContext) throws WriteFailedException { Precond...
@Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesNullData() throws WriteFailedException { customizer.deleteCurrentAttributes(null, null, null); } @Test public void testDeleteCurrentAttributes() throws WriteFailedException { Lisp lisp = new LispBuilder().setEnable(true).build(); whenli...
RlocProbeCustomizer extends CheckedLispCustomizer implements WriterCustomizer<RlocProbe>, ByteDataTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<RlocProbe> instanceIdentifier, @Nonnull RlocProbe rlocProbe, @Nonnull WriteContext writeContext) throws WriteFailedEx...
@Test public void testWriteCurrentAttributes() throws Exception { customizer.writeCurrentAttributes(ID, enabledProbe, writeContext); verifyRequest(true); } @Test public void testWriteLispDisabled() throws WriteFailedException { mockLispDisabledAfter(); try { customizer.writeCurrentAttributes(EMPTY_ID, EMPTY_DATA, write...
RlocProbeCustomizer extends CheckedLispCustomizer implements WriterCustomizer<RlocProbe>, ByteDataTranslator, JvppReplyConsumer { @Override public void updateCurrentAttributes(@Nonnull InstanceIdentifier<RlocProbe> instanceIdentifier, @Nonnull RlocProbe rlocProbeBefore, @Nonnull RlocProbe rlocProbeAfter, @Nonnull Write...
@Test public void testUpdateCurrentAttributesToDisabled() throws Exception { customizer.updateCurrentAttributes(ID, enabledProbe, disabledProbe, writeContext); verifyRequest(false); } @Test public void testUpdateCurrentAttributesToEnabled() throws Exception { customizer.updateCurrentAttributes(ID, disabledProbe, enable...
RlocProbeCustomizer extends CheckedLispCustomizer implements WriterCustomizer<RlocProbe>, ByteDataTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<RlocProbe> instanceIdentifier, @Nonnull RlocProbe rlocProbe, @Nonnull WriteContext writeContext) throws WriteFailedE...
@Test public void testDeleteCurrentAttributes() throws Exception { customizer.deleteCurrentAttributes(ID, disabledProbe, writeContext); verifyRequest(false); } @Test public void testDeleteLispDisabled() throws WriteFailedException { mockLispDisabledBefore(); try { customizer.deleteCurrentAttributes(EMPTY_ID, EMPTY_DATA...
MapServerCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<MapServer, MapServerKey>, AddressTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<MapServer> instanceIdentifier, @Nonnull MapServer mapServer, @Nonnull WriteContext writeCont...
@Test public void writeCurrentAttributes() throws Exception { customizer.writeCurrentAttributes(ID, data, writeContext); verifyRequest(true); } @Test public void testWriteLispDisabled() throws WriteFailedException { mockLispDisabledAfter(); try { customizer.writeCurrentAttributes(EMPTY_ID, EMPTY_DATA, writeContext); } ...
MapServerCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<MapServer, MapServerKey>, AddressTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<MapServer> instanceIdentifier, @Nonnull MapServer mapServer, @Nonnull WriteContext writeCon...
@Test public void deleteCurrentAttributes() throws Exception { customizer.deleteCurrentAttributes(ID, data, writeContext); verifyRequest(false); } @Test public void testDeleteLispDisabled() throws WriteFailedException { mockLispDisabledBefore(); try { customizer.deleteCurrentAttributes(EMPTY_ID, EMPTY_DATA, writeContex...
PetrCfgCustomizer extends CheckedLispCustomizer implements WriterCustomizer<PetrCfg>, AddressTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<PetrCfg> instanceIdentifier, @Nonnull PetrCfg petrCfg, @Nonnull WriteContext writeContext) throws WriteFailedException { l...
@Test public void testWriteCurrentAttributes() throws Exception { customizer.writeCurrentAttributes(ID, enabledCfg, writeContext); verifyEnabledInvoked(); } @Test public void testWriteLispDisabled() throws WriteFailedException { mockLispDisabledAfter(); try { customizer.writeCurrentAttributes(EMPTY_ID, EMPTY_DATA, writ...
PetrCfgCustomizer extends CheckedLispCustomizer implements WriterCustomizer<PetrCfg>, AddressTranslator, JvppReplyConsumer { @Override public void updateCurrentAttributes(@Nonnull InstanceIdentifier<PetrCfg> instanceIdentifier, @Nonnull PetrCfg petrCfgBefore, @Nonnull PetrCfg petrCfgAfter, @Nonnull WriteContext writeCo...
@Test public void testUpdateCurrentAttributesToEnabled() throws Exception { customizer.updateCurrentAttributes(ID, disabledCfg, enabledCfg, writeContext); verifyEnabledInvoked(); } @Test public void testUpdateCurrentAttributesToDisabled() throws Exception { customizer.updateCurrentAttributes(ID, enabledCfg, disabledCfg...
PetrCfgCustomizer extends CheckedLispCustomizer implements WriterCustomizer<PetrCfg>, AddressTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<PetrCfg> instanceIdentifier, @Nonnull PetrCfg petrCfg, @Nonnull WriteContext writeContext) throws WriteFailedException { ...
@Test public void testDeleteCurrentAttributes() throws Exception { customizer.deleteCurrentAttributes(ID, disabledCfg, writeContext); verifyDisabledInvoked(); } @Test public void testDeleteLispDisabled() throws WriteFailedException { mockLispDisabledBefore(); try { customizer.deleteCurrentAttributes(EMPTY_ID, EMPTY_DAT...
RemoteMappingCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<RemoteMapping, RemoteMappingKey>, EidTranslator, AddressTranslator, JvppReplyConsumer, MappingProducer { @Override public void writeCurrentAttributes(InstanceIdentifier<RemoteMapping> id, RemoteMapping dataAfter, WriteContext w...
@Test public void testWritePositiveMappingNoPrioNoWeight() throws WriteFailedException { customizer.writeCurrentAttributes(id, positiveMappingNoPrioNoWeight, writeContext); verify(api, times(1)).oneAddDelRemoteMapping(mappingCaptor.capture()); final OneAddDelRemoteMapping request = mappingCaptor.getValue(); assertNotNu...
RemoteMappingCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<RemoteMapping, RemoteMappingKey>, EidTranslator, AddressTranslator, JvppReplyConsumer, MappingProducer { @Override public void updateCurrentAttributes(InstanceIdentifier<RemoteMapping> id, RemoteMapping dataBefore, RemoteMappin...
@Test(expected = UnsupportedOperationException.class) public void testUpdateCurrentAttributesFail() throws WriteFailedException { customizer.updateCurrentAttributes(null, failUpdateBefore, failUpdateAfter, writeContext); } @Test public void testUpdateCurrentAttributesIgnore() throws WriteFailedException { customizer.up...
InterfaceAclCustomizer extends FutureJVppAclCustomizer implements WriterCustomizer<Interface> { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Interface> id, @Nonnull final Interface dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException { AclSets egress = dataA...
@Test public void testWrite() throws Exception { customizer.writeCurrentAttributes(IFC_IID, ifcAcl, writeContext); final AclInterfaceSetAclList list = new AclInterfaceSetAclList(); list.swIfIndex = IFACE_ID; list.acls = new int[]{ACL_ID}; list.count = 1; list.nInput = 1; verify(aclApi).aclInterfaceSetAclList(list); }
FibTableCustomizer implements InitializingListReaderCustomizer<Table, TableKey, TableBuilder>, ByteDataTranslator { @Nonnull @Override public Initialized<Table> init(@Nonnull final InstanceIdentifier<Table> id, @Nonnull final Table readValue, @Nonnull final ReadContext ctx) { return Initialized.create(id, readValue); }...
@Test public void testInit() { final Table data = new TableBuilder().build(); invokeInitTest(TABLE_V4_ID, data, TABLE_V4_ID, data); }
RemoteMappingCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<RemoteMapping, RemoteMappingKey>, EidTranslator, AddressTranslator, JvppReplyConsumer, MappingProducer { @Override public void deleteCurrentAttributes(InstanceIdentifier<RemoteMapping> id, RemoteMapping dataBefore, WriteContext...
@Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesNullData() throws WriteFailedException { customizer.deleteCurrentAttributes(null, null, writeContext); } @Test public void testDeleteCurrentAttributes() throws WriteFailedException { when(remoteMappingContext.containsEid(any(), eq(mappi...
MapRegisterCustomizer extends CheckedLispCustomizer implements WriterCustomizer<MapRegister>, ByteDataTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<MapRegister> instanceIdentifier, @Nonnull MapRegister mapRegister, @Nonnull WriteContext writeContext) throws Wri...
@Test public void writeCurrentAttributes() throws Exception { customizer.writeCurrentAttributes(ID, enabledRegister, writeContext); verifyRequest(true, 7, 4); } @Test public void testWriteLispDisabled() throws WriteFailedException { mockLispDisabledAfter(); try { customizer.writeCurrentAttributes(EMPTY_ID, EMPTY_DATA, ...
MapRegisterCustomizer extends CheckedLispCustomizer implements WriterCustomizer<MapRegister>, ByteDataTranslator, JvppReplyConsumer { @Override public void updateCurrentAttributes(@Nonnull InstanceIdentifier<MapRegister> instanceIdentifier, @Nonnull MapRegister mapRegisterBefore, @Nonnull MapRegister mapRegisterAfter, ...
@Test public void updateCurrentAttributesToDisabled() throws Exception { customizer.updateCurrentAttributes(ID, enabledRegister, disabledRegister, writeContext); verifyRequest(false, 7, 4); } @Test public void updateCurrentAttributesToEnabled() throws Exception { customizer.updateCurrentAttributes(ID, disabledRegister,...
MapRegisterCustomizer extends CheckedLispCustomizer implements WriterCustomizer<MapRegister>, ByteDataTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<MapRegister> instanceIdentifier, @Nonnull MapRegister mapRegister, @Nonnull WriteContext writeContext) throws Wr...
@Test public void deleteCurrentAttributes() throws Exception { customizer.deleteCurrentAttributes(ID, disabledRegister, writeContext); verifyRequest(false, 0, 0); } @Test public void testDeleteLispDisabled() throws WriteFailedException { mockLispDisabledBefore(); try { customizer.deleteCurrentAttributes(EMPTY_ID, EMPTY...
VniTableCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<VniTable, VniTableKey> { @Override public void writeCurrentAttributes(InstanceIdentifier<VniTable> id, VniTable dataAfter, WriteContext writeContext) throws WriteFailedException { lispStateCheckService.checkLispEnabledAfter(writeContext); ...
@Test public void testWriteSuccessfull() { whenReadAfterReturnValid(); try { customizer.writeCurrentAttributes(validId, validData, writeContext); } catch (Exception e) { fail("Test should pass without exception"); } } @Test(expected = IllegalStateException.class) public void testWriteFailed() throws WriteFailedExceptio...
InterfaceAclCustomizer extends FutureJVppAclCustomizer implements WriterCustomizer<Interface> { @Override public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Interface> id, @Nonnull final Interface dataBefore, @Nonnull final Interface dataAfter, @Nonnull final WriteContext writeContext) throws WriteFa...
@Test public void testUpdate() throws Exception { final Interface updIfcAcl = new InterfaceBuilder().build(); customizer.updateCurrentAttributes(IFC_IID, updIfcAcl, ifcAcl, writeContext); final AclInterfaceSetAclList list = new AclInterfaceSetAclList(); list.swIfIndex = IFACE_ID; list.acls = new int[]{ACL_ID}; list.cou...
VniTableCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<VniTable, VniTableKey> { @Override public void deleteCurrentAttributes(InstanceIdentifier<VniTable> id, VniTable dataBefore, WriteContext writeContext) throws WriteFailedException { lispStateCheckService.checkLispEnabledBefore(writeContext...
@Test public void testDeleteSuccessfull() { whenReadBeforeReturnValid(); try { customizer.deleteCurrentAttributes(validId, validData, writeContext); } catch (Exception e) { fail("Test should pass without exception"); } } @Test(expected = IllegalStateException.class) public void testDeleteFailed() throws WriteFailedExce...
ItrRemoteLocatorSetCustomizer extends CheckedLispCustomizer implements WriterCustomizer<ItrRemoteLocatorSet>, ByteDataTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<ItrRemoteLocatorSet> id, @Nonnull final ItrRemoteLocatorSet dataAfter, @Nonnull fin...
@Test public void writeCurrentAttributesSuccess() throws Exception { onWriteSuccess(); customizer.writeCurrentAttributes(validId, validData, writeContext); verifyWriteInvoked(true, VALID_NAME); } @Test public void writeCurrentAttributesFailed() { onWriteThrow(); try { customizer.writeCurrentAttributes(validId, validDat...
ItrRemoteLocatorSetCustomizer extends CheckedLispCustomizer implements WriterCustomizer<ItrRemoteLocatorSet>, ByteDataTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<ItrRemoteLocatorSet> id, @Nonnull final ItrRemoteLocatorSet dataBefore, @Nonnull f...
@Test public void deleteCurrentAttributesSuccess() throws Exception { onWriteSuccess(); customizer.deleteCurrentAttributes(validId, validData, writeContext); verifyWriteInvoked(false, VALID_NAME); }
InterfaceCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Interface, InterfaceKey>, ByteDataTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(InstanceIdentifier<Interface> id, Interface dataAfter, WriteContext writeContext) throws WriteFailedException { checkNotNull(dat...
@Test(expected = NullPointerException.class) public void testWriteCurrentAttributesNullData() throws WriteFailedException { customizer.writeCurrentAttributes(null, null, null); } @Test(expected = NullPointerException.class) public void testWriteCurrentAttributesNullPriority() throws WriteFailedException { Interface int...
InterfaceAclCustomizer extends FutureJVppAclCustomizer implements WriterCustomizer<Interface> { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Interface> id, @Nonnull final Interface dataBefore, @Nonnull final WriteContext writeContext) throws WriteFailedException { AclSets ingress = da...
@Test public void testDelete() throws Exception { customizer.deleteCurrentAttributes(IFC_IID, ifcAcl, writeContext); final AclInterfaceSetAclList list = new AclInterfaceSetAclList(); list.swIfIndex = IFACE_ID; list.acls = new int[]{}; verify(aclApi).aclInterfaceSetAclList(list); }
InterfaceCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Interface, InterfaceKey>, ByteDataTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(InstanceIdentifier<Interface> id, Interface dataBefore, WriteContext writeContext) throws WriteFailedException { checkNotNull(d...
@Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesNullData() throws WriteFailedException { customizer.deleteCurrentAttributes(null, null, null); } @Test(expected = NullPointerException.class) public void testDeleteCurrentAttributesNullPriority() throws WriteFailedException { Interface ...
LocalMappingCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<LocalMapping, LocalMappingKey>, ByteDataTranslator, EidTranslator, JvppReplyConsumer, MappingProducer { @Override public void writeCurrentAttributes(InstanceIdentifier<LocalMapping> id, LocalMapping dataAfter, WriteContext write...
@Test(expected = NullPointerException.class) public void testWriteCurrentAttributesNullData() throws WriteFailedException { customizer.writeCurrentAttributes(null, null, writeContext); } @Test(expected = NullPointerException.class) public void testWriteCurrentAttributesNullEid() throws WriteFailedException { LocalMappi...
AclCustomizer extends FutureJVppAclCustomizer implements ListWriterCustomizer<Acl, AclKey>, AclDataExtractor { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException { AclAddReplaceReques...
@Test public void writeCurrentAttributesMacip(@InjectTestData(resourcePath = "/acl/macip/macip-acl.json") Acls macipAcl) throws WriteFailedException { aclCustomizer.writeCurrentAttributes(validMacipId, macipAcl.getAcl().get(0), writeContext); verify(aclApi, times(1)).macipAclAdd(macipAclAddReplaceRequestCaptor.capture(...
LocalMappingCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<LocalMapping, LocalMappingKey>, ByteDataTranslator, EidTranslator, JvppReplyConsumer, MappingProducer { @Override public void updateCurrentAttributes(InstanceIdentifier<LocalMapping> id, LocalMapping dataBefore, LocalMapping dat...
@Test(expected = UnsupportedOperationException.class) public void testUpdateCurrentAttributesFail() throws WriteFailedException { customizer.updateCurrentAttributes(null, failUpdateBefore, failUpdateAfter, writeContext); } @Test public void testUpdateCurrentAttributesIgnore() throws WriteFailedException { customizer.up...
LocalMappingCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<LocalMapping, LocalMappingKey>, ByteDataTranslator, EidTranslator, JvppReplyConsumer, MappingProducer { @Override public void deleteCurrentAttributes(InstanceIdentifier<LocalMapping> id, LocalMapping dataBefore, WriteContext wri...
@Test public void testDeleteCurrentAttributes() throws WriteFailedException, InterruptedException, ExecutionException { when(eidMappingContext.containsEid(any(), eq(mappingContext))).thenReturn(true); customizer.deleteCurrentAttributes(id, mapping, writeContext); verify(api, times(1)).oneAddDelLocalEid(mappingCaptor.ca...
MapRequestModeCustomizer extends CheckedLispCustomizer implements WriterCustomizer<MapRequestMode>, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull InstanceIdentifier<MapRequestMode> instanceIdentifier, @Nonnull MapRequestMode mapRequestMode, @Nonnull WriteContext writeContext) throws WriteFai...
@Test public void writeCurrentAttributes() throws Exception { customizer.writeCurrentAttributes(ID, sourceDestinationMode, writeContext); verifyModeRequest(SourceDestination); } @Test public void testWriteLispDisabled() throws WriteFailedException { mockLispDisabledAfter(); try { customizer.writeCurrentAttributes(EMPTY...
MapRequestModeCustomizer extends CheckedLispCustomizer implements WriterCustomizer<MapRequestMode>, JvppReplyConsumer { @Override public void updateCurrentAttributes(@Nonnull InstanceIdentifier<MapRequestMode> instanceIdentifier, @Nonnull MapRequestMode mapRequestModeBefore, @Nonnull MapRequestMode mapRequestModeAfter,...
@Test public void updateCurrentAttributes() throws Exception { customizer.updateCurrentAttributes(ID, sourceDestinationMode, destinationOnlyMode, writeContext); verifyModeRequest(DestinationOnly); } @Test public void testUpdateLispDisabled() throws WriteFailedException { mockLispDisabledAfter(); try { customizer.update...
MapRequestModeCustomizer extends CheckedLispCustomizer implements WriterCustomizer<MapRequestMode>, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier<MapRequestMode> instanceIdentifier, @Nonnull MapRequestMode mapRequestMode, @Nonnull WriteContext writeContext) throws WriteFa...
@Test public void deleteCurrentAttributes() throws Exception { customizer.deleteCurrentAttributes(ID, sourceDestinationMode, writeContext); verifyModeRequest(DestinationOnly); }
MapResolverCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<MapResolver, MapResolverKey>, AddressTranslator, JvppReplyConsumer { @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<MapResolver> id, @Nonnull final MapResolver dataAfter, @Nonnull final WriteConte...
@Test(expected = NullPointerException.class) public void testWriteCurrentAttributesNullData() throws WriteFailedException { customizer.writeCurrentAttributes(null, null, null); } @Test(expected = NullPointerException.class) public void testWriteCurrentAttributesBadData() throws WriteFailedException { customizer.writeCu...
MapResolverCustomizer extends CheckedLispCustomizer implements ListWriterCustomizer<MapResolver, MapResolverKey>, AddressTranslator, JvppReplyConsumer { @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<MapResolver> id, @Nonnull final MapResolver dataBefore, @Nonnull final WriteCon...
@Test public void testDeleteCurrentAttributes() throws InterruptedException, ExecutionException, WriteFailedException { Ipv4Address address = new Ipv4Address("192.168.2.1"); MapResolver resolver = new MapResolverBuilder().setIpAddress(new IpAddress(address)).build(); whenOneAddDelMapResolverThenSuccess(); customizer.de...
LispStateCheckServiceImpl implements LispStateCheckService, JvppReplyConsumer, ByteDataTranslator { @Override public void checkLispEnabledBefore(@Nonnull final WriteContext ctx) { checkState(ctx.readBefore(InstanceIdentifier.create(Lisp.class)) .orElse(STATIC_LISP_INSTANCE).isEnable(), "Lisp feature not enabled"); } @I...
@Test(expected = IllegalStateException.class) public void testCheckLispEnabledBeforeNoConfig() throws Exception { when(writeContext.readBefore(InstanceIdentifier.create(Lisp.class))).thenReturn(Optional.empty()); impl.checkLispEnabledBefore(writeContext); } @Test(expected = IllegalStateException.class) public void test...
AclCustomizer extends FutureJVppAclCustomizer implements ListWriterCustomizer<Acl, AclKey>, AclDataExtractor { @Override public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataBefore, @Nonnull final Acl dataAfter, @Nonnull final WriteContext writeContext) throws WriteFaile...
@Test public void updateCurrentAttributesIcmpIpv4(@InjectTestData(resourcePath = "/acl/standard/standard-acl-icmp.json") Acls standardAcls) throws Exception { final int aclIndex = 4; when(standardAclContext.getAclIndex("standard-acl", mappingContext)).thenReturn(aclIndex); final Acl data = standardAcls.getAcl().get(0);...