@Test public void testOnServiceFunctionClassifierCreated() throws Exception { ServiceFunctionClassifier serviceFunctionClassifier = buildServiceFunctionClassifier(); when(dataTreeModification.getRootNode()).thenReturn(dataObjectModification); when(dataObjectModification.getModificationType()).thenReturn(ModificationType.WRITE); when(dataObjectModification.getDataBefore()).thenReturn(null); when(dataObjectModification.getDataAfter()).thenReturn(serviceFunctionClassifier); collection.add(dataTreeModification); serviceFunctionClassifierListener.onDataTreeChanged(collection); Thread.sleep(500); AccessListState acl = SfcProviderAclAPI.readAccessListState(serviceFunctionClassifier.getAcl().getName(), serviceFunctionClassifier.getAcl().getType()); assertNotNull(acl); assertTrue(SfcProviderAclAPI.deleteClassifierFromAccessListState(serviceFunctionClassifier.getAcl().getName(), serviceFunctionClassifier.getAcl().getType(), serviceFunctionClassifier.getName())); }
@Override protected void add(ServiceFunctionClassifier serviceFunctionClassifier) { if (serviceFunctionClassifier != null) { LOG.debug("Adding Service Function Classifier: {}", serviceFunctionClassifier.getName()); if (serviceFunctionClassifier.getName() != null && serviceFunctionClassifier.getAcl() != null) { SfcProviderAclAPI.addClassifierToAccessListState(serviceFunctionClassifier.getAcl().getName(), serviceFunctionClassifier.getAcl().getType(), serviceFunctionClassifier.getName()); } } }
ServiceFunctionClassifierListener extends AbstractDataTreeChangeListener<ServiceFunctionClassifier> { @Override protected void add(ServiceFunctionClassifier serviceFunctionClassifier) { if (serviceFunctionClassifier != null) { LOG.debug("Adding Service Function Classifier: {}", serviceFunctionClassifier.getName()); if (serviceFunctionClassifier.getName() != null && serviceFunctionClassifier.getAcl() != null) { SfcProviderAclAPI.addClassifierToAccessListState(serviceFunctionClassifier.getAcl().getName(), serviceFunctionClassifier.getAcl().getType(), serviceFunctionClassifier.getName()); } } } }
ServiceFunctionClassifierListener extends AbstractDataTreeChangeListener<ServiceFunctionClassifier> { @Override protected void add(ServiceFunctionClassifier serviceFunctionClassifier) { if (serviceFunctionClassifier != null) { LOG.debug("Adding Service Function Classifier: {}", serviceFunctionClassifier.getName()); if (serviceFunctionClassifier.getName() != null && serviceFunctionClassifier.getAcl() != null) { SfcProviderAclAPI.addClassifierToAccessListState(serviceFunctionClassifier.getAcl().getName(), serviceFunctionClassifier.getAcl().getType(), serviceFunctionClassifier.getName()); } } } ServiceFunctionClassifierListener(final DataBroker dataBroker); }
ServiceFunctionClassifierListener extends AbstractDataTreeChangeListener<ServiceFunctionClassifier> { @Override protected void add(ServiceFunctionClassifier serviceFunctionClassifier) { if (serviceFunctionClassifier != null) { LOG.debug("Adding Service Function Classifier: {}", serviceFunctionClassifier.getName()); if (serviceFunctionClassifier.getName() != null && serviceFunctionClassifier.getAcl() != null) { SfcProviderAclAPI.addClassifierToAccessListState(serviceFunctionClassifier.getAcl().getName(), serviceFunctionClassifier.getAcl().getType(), serviceFunctionClassifier.getName()); } } } ServiceFunctionClassifierListener(final DataBroker dataBroker); void init(); @Override void close(); }
ServiceFunctionClassifierListener extends AbstractDataTreeChangeListener<ServiceFunctionClassifier> { @Override protected void add(ServiceFunctionClassifier serviceFunctionClassifier) { if (serviceFunctionClassifier != null) { LOG.debug("Adding Service Function Classifier: {}", serviceFunctionClassifier.getName()); if (serviceFunctionClassifier.getName() != null && serviceFunctionClassifier.getAcl() != null) { SfcProviderAclAPI.addClassifierToAccessListState(serviceFunctionClassifier.getAcl().getName(), serviceFunctionClassifier.getAcl().getType(), serviceFunctionClassifier.getName()); } } } ServiceFunctionClassifierListener(final DataBroker dataBroker); void init(); @Override void close();  }