Support policy type upgrade 08/135908/2
authorMichaelMorris <michael.morris@est.tech>
Mon, 4 Sep 2023 10:53:56 +0000 (11:53 +0100)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Tue, 5 Sep 2023 20:09:24 +0000 (20:09 +0000)
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-4614
Change-Id: I4d8e29bf96bcdd6c24be14d805bbeae374e06b98

catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java

index 8c5f9ce..4001102 100644 (file)
@@ -97,8 +97,7 @@ public class PolicyTypeImportManager {
     private Either<List<ImmutablePair<PolicyTypeDefinition, Boolean>>, ResponseFormat> upsertPolicyTypesByDao(
         List<PolicyTypeDefinition> policyTypesToCreate, String modelName) {
         return commonImportManager.createElementTypesWithVersionByDao(policyTypesToCreate, this::validatePolicyType,
-            policyType -> new ImmutablePair<>(ElementTypeEnum.POLICY_TYPE, UniqueIdBuilder.buildPolicyTypeUid(policyType.getModel(),
-                policyType.getType(), policyType.getVersion(), NodeTypeEnum.PolicyType.getName()).toLowerCase()),
+            policyType -> new ImmutablePair<>(ElementTypeEnum.POLICY_TYPE, policyType.getType()),
             policyTypeOperation::getLatestPolicyTypeByType,
             policyTypeOperation::addPolicyType, this::updatePolicyType, modelName);
     }