X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Fimpl%2Finventory%2Fsync%2FModuleSyncService.java;h=72d322605ffb00b78a7a9ded8cf72a5a92f6bc24;hb=8bcb8ee9f7edbf12d3300f34642e2efacabe4ea8;hp=b21a2f1f85bec32d622cb5fcf3553fda9e179024;hpb=ddc467140f29038f4506468a30b2eb1414e93aad;p=cps.git diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/sync/ModuleSyncService.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/sync/ModuleSyncService.java index b21a2f1f8..72d322605 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/sync/ModuleSyncService.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/sync/ModuleSyncService.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2022-2023 Nordix Foundation + * Copyright (C) 2022-2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,6 +91,9 @@ public class ModuleSyncService { existingAnchorName, inUpgrade); updateModuleSetTagCache(moduleSetTag, moduleReferencesFromExistingCmHandle); } else { + if (inUpgrade) { + deleteSchemaSetIfExists(cmHandleId); + } final Collection allModuleReferencesFromCmHandle = syncAndCreateSchemaSet(yangModelCmHandle); updateModuleSetTagCache(moduleSetTag, allModuleReferencesFromCmHandle);