@Test public void testOnServiceFunctionForwarderRemovedWithRSP() throws Exception { RenderedServicePath renderedServicePath = build_and_commit_rendered_service_path(); assertNotNull(renderedServicePath); SffName sffName = renderedServicePath.getRenderedServicePathHop().get(0).getServiceFunctionForwarder(); ServiceFunctionForwarder serviceFunctionForwarder = SfcProviderServiceForwarderAPI .readServiceFunctionForwarder(sffName); assertNotNull(serviceFunctionForwarder); when(dataTreeModification.getRootNode()).thenReturn(dataObjectModification); when(dataObjectModification.getModificationType()).thenReturn(ModificationType.DELETE); when(dataObjectModification.getDataBefore()).thenReturn(serviceFunctionForwarder); collection.add(dataTreeModification); serviceFunctionForwarderListener.onDataTreeChanged(collection); Thread.sleep(2000); assertNull(SfcProviderRenderedPathAPI.readRenderedServicePath(renderedServicePath.getName())); assertNull(SfcProviderRenderedPathAPI.readRenderedServicePath(renderedServicePath.getName())); List<SffServicePath> sffServicePathList = SfcProviderServiceForwarderAPI.readSffState(sffName); assertNull(sffServicePathList); }
@Override protected void add(ServiceFunctionForwarder serviceFunctionForwarder) { LOG.info("Adding Service Function Forwarder: {}", serviceFunctionForwarder.getName()); }
ServiceFunctionForwarderListener extends AbstractDataTreeChangeListener<ServiceFunctionForwarder> { @Override protected void add(ServiceFunctionForwarder serviceFunctionForwarder) { LOG.info("Adding Service Function Forwarder: {}", serviceFunctionForwarder.getName()); } }
ServiceFunctionForwarderListener extends AbstractDataTreeChangeListener<ServiceFunctionForwarder> { @Override protected void add(ServiceFunctionForwarder serviceFunctionForwarder) { LOG.info("Adding Service Function Forwarder: {}", serviceFunctionForwarder.getName()); } ServiceFunctionForwarderListener(final DataBroker dataBroker); }
ServiceFunctionForwarderListener extends AbstractDataTreeChangeListener<ServiceFunctionForwarder> { @Override protected void add(ServiceFunctionForwarder serviceFunctionForwarder) { LOG.info("Adding Service Function Forwarder: {}", serviceFunctionForwarder.getName()); } ServiceFunctionForwarderListener(final DataBroker dataBroker); void init(); @Override void close(); }
ServiceFunctionForwarderListener extends AbstractDataTreeChangeListener<ServiceFunctionForwarder> { @Override protected void add(ServiceFunctionForwarder serviceFunctionForwarder) { LOG.info("Adding Service Function Forwarder: {}", serviceFunctionForwarder.getName()); } ServiceFunctionForwarderListener(final DataBroker dataBroker); void init(); @Override void close();  }