aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
authoreeginux <henry.xie@est.tech>2019-08-22 09:36:49 +0000
committereeginux <henry.xie@est.tech>2019-08-22 09:36:49 +0000
commit8d6c0ac3d5af09808bd08137704d7acc5c6db8a2 (patch)
treee1bebceb11a78b0aee0394b91d087ce8fccf0a80 /asdc-controller
parent8ecfa2367d322bdcaec91336d1ba1e16c1fb9830 (diff)
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 <henry.xie@est.tech>
Diffstat (limited to 'asdc-controller')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java23
1 files changed, 11 insertions, 12 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 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);
+ }
}
}