aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main
diff options
context:
space:
mode:
authorpriyanshu <pagarwal@amdocs.com>2018-10-22 12:18:41 +0530
committerOren Kleks <orenkle@amdocs.com>2018-10-22 07:32:18 +0000
commit34aeb856c5f1a6016e6b39e1d73ac5a772b703ea (patch)
treeabe3ccbc13db9a866968344d8be73c3f95357287 /openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main
parentbb9146de4f4f98029719f6f3b3161e03618678d7 (diff)
Discrepancy in Entitlement Pool1.3.0
Discrepancy in Entitlement Pool between vendor-license-model.xml and vf-license-model.xml Change-Id: Ic68081c6a2d29840bd2cb6dab10f4c024c7bba86 Issue-ID: SDC-1856 Signed-off-by: priyanshu <pagarwal@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java
index 3a635de1ee..4183f7950c 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java
@@ -18,6 +18,7 @@ package org.openecomp.sdc.vendorlicense.impl;
import org.openecomp.core.dao.UniqueValueDao;
import org.openecomp.core.util.UniqueValueUtil;
+import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
@@ -516,8 +517,11 @@ public class VendorLicenseManagerImpl implements VendorLicenseManager {
public void updateLimit(LimitEntity limit) {
getLimit(limit);
validateLimit(limit);
- vendorLicenseFacade.updateLimit(limit);
- updateParentForLimit(limit);
+ LimitEntity retrieved = limitDao.get(limit);
+ if(!retrieved.equals(limit)){
+ vendorLicenseFacade.updateLimit(limit);
+ updateParentForLimit(limit);
+ }
}
private boolean isLimitPresent(LimitEntity limit) {
@@ -545,14 +549,16 @@ public class VendorLicenseManagerImpl implements VendorLicenseManager {
EntitlementPoolEntity entitlementPoolEntity =
entitlementPoolDao.get(new EntitlementPoolEntity(limit.getVendorLicenseModelId(),
limit.getVersion(), limit.getEpLkgId()));
- vendorLicenseFacade.updateEntitlementPool(entitlementPoolEntity);
+ entitlementPoolEntity.setVersionUuId(CommonMethods.nextUuId());
+ entitlementPoolDao.update(entitlementPoolEntity);
}
if ("LicenseKeyGroup".equals(limit.getParent())) {
LicenseKeyGroupEntity licenseKeyGroupEntity = licenseKeyGroupDao.get(
new LicenseKeyGroupEntity(limit.getVendorLicenseModelId(), limit.getVersion(),
limit.getEpLkgId()));
- vendorLicenseFacade.updateLicenseKeyGroup(licenseKeyGroupEntity);
+ licenseKeyGroupEntity.setVersionUuId(CommonMethods.nextUuId());
+ licenseKeyGroupDao.update(licenseKeyGroupEntity);
}
}