diff options
Diffstat (limited to 'asdc-controller/src/main/java')
3 files changed, 16 insertions, 3 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java index fc0197dc52..dd159c0b38 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java @@ -599,6 +599,8 @@ public class ASDCController { } } + wd.updateCatalogDBStatus(iNotif.getServiceInvariantUUID(), overallStatus); + if (isDeploySuccess && watchdogError == null) { sendFinalDistributionStatus(iNotif.getDistributionID(), DistributionStatusEnum.DISTRIBUTION_COMPLETE_OK, null); @@ -613,7 +615,6 @@ public class ASDCController { wdsRepo.save(wds); } - } catch (ObjectOptimisticLockingFailureException e) { logger.debug( diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java index ddf1f3d84b..fce8c5655b 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java @@ -2271,7 +2271,7 @@ public class ToscaResourceInstaller { // setting resource input for vnf customization vnfResourceCustomization.setResourceInput( getResourceInput(toscaResourceStructure, vnfResourceCustomization.getModelCustomizationUUID())); - vnfResource.getVnfResourceCustomizations().add(vnfResourceCustomization); + service.getVnfCustomizations().add(vnfResourceCustomization); } return vnfResourceCustomization; diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java b/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java index 3659ceed12..0128078a59 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java @@ -30,6 +30,7 @@ import org.onap.so.client.aai.AAIResourcesClient; import org.onap.so.client.aai.entities.uri.AAIResourceUri; import org.onap.so.client.aai.entities.uri.AAIUriFactory; import org.onap.so.client.graphinventory.entities.uri.Depth; +import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.data.repository.ServiceRepository; import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus; import org.onap.so.db.request.beans.WatchdogDistributionStatus; @@ -140,7 +141,6 @@ public class WatchdogDistribution { logger.debug("Updating overall DistributionStatus to: {} for distributionId: ", status, distributionId); - watchdogDistributionStatus.setDistributionIdStatus(status); watchdogDistributionStatusRepository.save(watchdogDistributionStatus); } else { logger.debug("Components Size Didn't match with the WatchdogComponentDistributionStatus results."); @@ -181,6 +181,8 @@ public class WatchdogDistribution { throw new Exception(error); } + + AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, serviceModelInvariantUUID, serviceModelVersionId); aaiUri.depth(Depth.ZERO); // Do not return relationships if any @@ -198,6 +200,16 @@ public class WatchdogDistribution { } } + public void updateCatalogDBStatus(String serviceModelVersionId, String status) { + try { + Service foundService = serviceRepo.findOneByModelUUID(serviceModelVersionId); + foundService.setDistrobutionStatus(status); + serviceRepo.save(foundService); + } catch (Exception e) { + logger.error("Error updating CatalogDBStatus", e); + } + } + public AAIResourcesClient getAaiClient() { if (aaiClient == null) { aaiClient = new AAIResourcesClient(); |