summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-service/src/main/java')
-rwxr-xr-xcps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
index bd86cd0c33..7ded95fa06 100755
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
@@ -292,8 +292,7 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService
private void parseAndRemoveCmHandlesInDmiRegistration(final DmiPluginRegistration dmiPluginRegistration) {
for (final String cmHandle : dmiPluginRegistration.getRemovedCmHandles()) {
try {
- cpsModuleService.deleteSchemaSet(NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME, cmHandle,
- CASCADE_DELETE_ALLOWED);
+ attemptToDeleteSchemaSetWithCascade(cmHandle);
cpsDataService.deleteListOrListElement(NCMP_DATASPACE_NAME, NCMP_DMI_REGISTRY_ANCHOR,
"/dmi-registry/cm-handles[@id='" + cmHandle + "']", NO_TIMESTAMP);
} catch (final DataNodeNotFoundException e) {
@@ -302,6 +301,15 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService
}
}
+ private void attemptToDeleteSchemaSetWithCascade(final String schemaSetName) {
+ try {
+ cpsModuleService.deleteSchemaSet(NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME, schemaSetName,
+ CASCADE_DELETE_ALLOWED);
+ } catch (final Exception e) {
+ log.warn("Schema set {} delete failed, reason {}", schemaSetName, e.getMessage());
+ }
+ }
+
private void syncAndCreateSchemaSet(final PersistenceCmHandle persistenceCmHandle) {
final List<ModuleReference> moduleReferencesFromCmHandle =
dmiModelOperations.getModuleReferences(persistenceCmHandle);