print csar analysis result 77/47377/1
authorzhangab <zhanganbing@chinamobile.com>
Mon, 14 May 2018 10:17:43 +0000 (18:17 +0800)
committerzhangab <zhanganbing@chinamobile.com>
Mon, 14 May 2018 10:17:50 +0000 (18:17 +0800)
Change-Id: I5ccfe022fa4c309f1a89028dd57e6484440fb905
Issue-ID: USECASEUI-115
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceTemplateService.java

index 9683eab..6a7b7fa 100644 (file)
@@ -52,6 +52,7 @@ public class ServiceTemplateController {
     @ResponseBody
     @RequestMapping(value = {"/uui-lcm/service-templates/{uuid}"}, method = RequestMethod.GET , produces = "application/json")
     public ServiceTemplateInput getServiceTemplateInput(@PathVariable("uuid") String uuid, @RequestParam("toscaModelPath") String toscaModelPath){
+        logger.info("returned template content :"+serviceTemplateService.fetchServiceTemplateInput(uuid, toscaModelPath));
         return serviceTemplateService.fetchServiceTemplateInput(uuid, toscaModelPath);
     }
 
index d4c9b1a..1040ea4 100644 (file)
@@ -91,7 +91,6 @@ public class DefaultServiceTemplateService implements ServiceTemplateService {
 
     private ServiceTemplateInput fetchServiceTemplate(String uuid, String toscaModelPath, boolean isVF) {
        String toPath = String.format("/home/uui/%s.csar", uuid);
-//        String toPath = String.format("D:\\volte/%s.csar", uuid);
         try {
             downloadFile(toscaModelPath, toPath);
             return extractTemplate(toPath, isVF);
@@ -116,6 +115,7 @@ public class DefaultServiceTemplateService implements ServiceTemplateService {
 
     public ServiceTemplateInput extractTemplate(String toPath, boolean isVF) throws JToscaException, IOException {
         ToscaTemplate tosca = translateToToscaTemplate(toPath);
+        logger.info("csar analysis result :" + tosca);
         ServiceTemplateInput serviceTemplateInput = newServiceTemplateInput(tosca);
         Map<String, Input> inputsMap = getInputsMap(tosca);
         for (NodeTemplate nodeTemplate : tosca.getNodeTemplates()) {