From 8d6c0ac3d5af09808bd08137704d7acc5c6db8a2 Mon Sep 17 00:00:00 2001 From: eeginux Date: Thu, 22 Aug 2019 09:36:49 +0000 Subject: Fix the ingestion of mixed resource Identify the non-VNF resource per resource artifact Handle all the resoure artifact Issue-ID: SO-1872 Change-Id: Ie29acfb138ca214a400040daaf780aa27e80ff0e Signed-off-by: eeginux --- .../org/onap/so/asdc/client/ASDCController.java | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'asdc-controller') 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 073412133c..9ffc38d34b 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 @@ -723,7 +723,6 @@ public class ASDCController { // For each artifact, create a structure describing the VFModule in a ordered flat level ResourceStructure resourceStructure = null; String msoConfigPath = getMsoConfigPath(); - boolean hasVFResource = false; ToscaResourceStructure toscaResourceStructure = new ToscaResourceStructure(msoConfigPath); DistributionStatusEnum deployStatus = DistributionStatusEnum.DEPLOY_OK; String errorMessage = null; @@ -738,7 +737,7 @@ public class ASDCController { for (IResourceInstance resource : iNotif.getResources()) { String resourceType = resource.getResourceType(); - + boolean hasVFResource = false; logger.info("Processing Resource Type: {}, Model UUID: {}", resourceType, resource.getResourceUUID()); @@ -802,19 +801,19 @@ public class ASDCController { errorMessage = e.getMessage(); logger.error("Exception occurred", e); } - } - if (!hasVFResource) { + if (!hasVFResource) { - logger.debug("No resources found for Service: " + iNotif.getServiceUUID()); + logger.debug("No resources found for Service: " + iNotif.getServiceUUID()); - logger.debug("Preparing to deploy Service: {}", iNotif.getServiceUUID()); - try { - this.deployResourceStructure(resourceStructure, toscaResourceStructure); - } catch (ArtifactInstallerException e) { - deployStatus = DistributionStatusEnum.DEPLOY_ERROR; - errorMessage = e.getMessage(); - logger.error("Exception occurred", e); + logger.debug("Preparing to deploy Service: {}", iNotif.getServiceUUID()); + try { + this.deployResourceStructure(resourceStructure, toscaResourceStructure); + } catch (ArtifactInstallerException e) { + deployStatus = DistributionStatusEnum.DEPLOY_ERROR; + errorMessage = e.getMessage(); + logger.error("Exception occurred", e); + } } } -- cgit 1.2.3-korg