summaryrefslogtreecommitdiffstats
path: root/appc-inbound
diff options
context:
space:
mode:
authorDilip kumar Pampana <dp583p@att.com>2018-03-30 16:34:33 -0400
committerTakamune Cho <tc012c@att.com>2018-04-03 15:42:19 +0000
commit3f49608f5c05b093c05a1e7f80b3ebfd2dd18f9a (patch)
tree9c2b9fc790d24e7db8ec2faec934fdd8ae4b8dac /appc-inbound
parent1ea70b88e2f4eb4819e4bfcbe38ab9672588024b (diff)
Changes made to Inbound/Design-Services
Error Displayed in CDT while saving the artifacts to APPC DB using SAVE ALL TO APPC though the artifacts are saved in DB Issue-ID: APPC-817 Change-Id: I748dd099b3df2ace95b9930aec2fcf1de3f6d148 Signed-off-by: Dilip kumar Pampana <dp583p@att.com>
Diffstat (limited to 'appc-inbound')
-rw-r--r--appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java b/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java
index 02de3609c..83ef0f914 100644
--- a/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java
+++ b/appc-inbound/appc-design-services/provider/src/main/java/org/onap/appc/design/dbervices/DesignDBService.java
@@ -2,23 +2,21 @@
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
@@ -197,7 +195,8 @@ public class DesignDBService {
createArtifactTrackingRecord(payload, requestID, sdcArtifactId, sdcReferenceId);
String status = getDataFromActionStatus(payload, STATUS);
if (status == null || status.isEmpty()) {
- setActionStatus(payload, "Not Tested");
+ log.info("Action Status is: "+ status);
+ setActionStatus(payload, "Not Tested");
}
linkstatusRelationShip(sdcArtifactId, sdcReferenceId, payload);
@@ -227,9 +226,9 @@ public class DesignDBService {
if (payloadObject.get(DesignServiceConstants.VNFC_TYPE) != null && !payloadObject
.get(DesignServiceConstants.VNFC_TYPE).textValue().isEmpty()) {
- queryString = queryString + " AND VNFC_TYPE = ? ) )";
+ queryString = queryString + " AND VNFC_TYPE = ? GROUP BY VNF_TYPE HAVING COUNT(VNF_TYPE)>=1 ) )";
} else {
- queryString = queryString + " ) ) ";
+ queryString = queryString + " GROUP BY VNF_TYPE HAVING COUNT(VNF_TYPE)>=1 ) ) ";
}
log.info(QUERY_STR + queryString);
boolean data = dbservice.updateDBData(queryString, argList);
@@ -310,6 +309,7 @@ public class DesignDBService {
if (payloadObject.get(DesignServiceConstants.VNFC_TYPE) != null && !payloadObject
.get(DesignServiceConstants.VNFC_TYPE).textValue().isEmpty()) {
argList.add(payloadObject.get(DesignServiceConstants.VNFC_TYPE).textValue());
+ log.info("Vnfc-Type: " + payloadObject.get(DesignServiceConstants.VNFC_TYPE).textValue());
} else {
argList.add(null);
}
@@ -322,6 +322,8 @@ public class DesignDBService {
}
argList.add(status);
+ log.info("QueryString: " + insertQuery);
+ log.info("Arguments List: " + argList);
boolean updateStatus = dbservice.updateDBData(insertQuery, argList);
if (!updateStatus)
throw new DBException("Error while updating Action Status");