Merge master code to casablanca branch 98/73698/1
authorzhangab <zhanganbing@chinamobile.com>
Tue, 27 Nov 2018 16:12:28 +0000 (00:12 +0800)
committerzhangab <zhanganbing@chinamobile.com>
Tue, 27 Nov 2018 16:12:29 +0000 (00:12 +0800)
Change-Id: I1208f4e3e74b7b3700f71940d340473f587fe907
Issue-ID: USECASEUI-153
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
15 files changed:
pom.xml
server/pom.xml
server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java
server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java
server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionService.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceLcmService.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceTemplateService.java
standalone/pom.xml
standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql
version.properties

diff --git a/pom.xml b/pom.xml
index d03717b..927cb8b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.usecase-ui.server</groupId>
     <artifactId>usecase-ui-server-parent</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>usecase-ui-server</name>
     <description>project for usecase-ui server</description>
index 3ab2c04..0817d8e 100644 (file)
     <parent>
         <groupId>org.onap.usecase-ui.server</groupId>
         <artifactId>usecase-ui-server-parent</artifactId>
-        <version>1.2.1-SNAPSHOT</version>
+        <version>1.3.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.usecase-ui.server</groupId>
     <artifactId>usecase-ui-server</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
     <packaging>jar</packaging>
     <name>usecase-ui-server/server</name>
     <description>project for usecase-ui server</description>
index 4308e9f..f9654d8 100644 (file)
@@ -35,6 +35,7 @@ import org.onap.usecaseui.server.util.UuiCommonUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -47,6 +48,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 
 @RestController
+@CrossOrigin(origins="*")
 @org.springframework.context.annotation.Configuration
 @EnableAspectJAutoProxy
 public class PackageDistributionController {
@@ -114,7 +116,21 @@ public class PackageDistributionController {
     @RequestMapping(value = {"/uui-lcm/jobs/getNsLcmJobStatus/{jobId}"}, method = RequestMethod.GET , produces = "application/json")
     public JobStatus getNsLcmJobStatus(@PathVariable(value="jobId") String jobId, HttpServletRequest request){
         String responseId = request.getParameter("responseId");
-        return packageDistributionService.getNsLcmJobStatus(jobId, responseId);
+        String serviceInstanceId = request.getParameter("serviceInstanceId");
+        JobStatus jobStatus = packageDistributionService.getNsLcmJobStatus(jobId, responseId);
+        if(UuiCommonUtil.isNotNullOrEmpty(jobStatus)&&UuiCommonUtil.isNotNullOrEmpty(jobStatus.getResponseDescriptor())&&UuiCommonUtil.isNotNullOrEmpty(jobStatus.getResponseDescriptor().getProgress())){
+               String processNum = jobStatus.getResponseDescriptor().getProgress();
+               String status="processing";
+               if(Integer.parseInt(processNum)==100){
+                       status = "finished";
+               }else if(Integer.parseInt(processNum)>100){
+                       status="error";
+               }else{
+                       status="processing";
+               }
+               serviceLcmService.updateServiceInstanceStatusById(status,serviceInstanceId);
+        }
+        return jobStatus;
     }
     
     @ResponseBody
@@ -229,9 +245,12 @@ public class PackageDistributionController {
        String serviceType = request.getParameter("serviceType");
        String serviceDomain = request.getParameter("serviceDomain");
        String ns_instance_id = request.getParameter("ns_instance_id");
-       ServiceBean serviceBean = new ServiceBean(UuiCommonUtil.getUUID(),ns_instance_id,customerId,serviceType,serviceDomain,null,null,null);
+       String object = packageDistributionService.instantiateNetworkServiceInstance(request,ns_instance_id);
+       JSONObject jobObject = JSONObject.parseObject(object);
+       String jobId = jobObject.getString("jobId");
+       ServiceBean serviceBean = new ServiceBean(UuiCommonUtil.getUUID(),ns_instance_id,customerId,serviceType,serviceDomain,jobId,null,null);
        serviceLcmService.saveOrUpdateServiceBean(serviceBean);
-        return packageDistributionService.instantiateNetworkServiceInstance(request,ns_instance_id);
+        return object;
     }
     
     @RequestMapping(value = {"/uui-lcm/terminateNetworkServiceInstance"}, method = RequestMethod.POST , produces = "application/json")
@@ -249,7 +268,7 @@ public class PackageDistributionController {
         return packageDistributionService.scaleNetworkServiceInstance(request,ns_instance_id);
     }
     
-    @RequestMapping(value = {"/uui-lcm/VnfInfo/{vnfinstid}"}, method = RequestMethod.POST , produces = "application/json")
+    @RequestMapping(value = {"/uui-lcm/VnfInfo/{vnfinstid}"}, method = RequestMethod.GET , produces = "application/json")
     public String getVnfInfoById(@PathVariable String vnfinstid){
         return packageDistributionService.getVnfInfoById(vnfinstid);
     }
index 9a8feb6..77c7ec5 100644 (file)
@@ -67,7 +67,7 @@ public class ServiceLcmController {
     @RequestMapping(value = {"/uui-lcm/services/{serviceId}/operations/{operationId}"}, method = RequestMethod.GET , produces = "application/json")
     public OperationProgressInformation queryOperationProgress(@PathVariable(value="serviceId") String serviceId, @PathVariable(value="operationId") String operationId){
        OperationProgressInformation operationProgressInformation =serviceLcmService.queryOperationProgress(serviceId, operationId);
-       if(UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation)&&UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation.getOperationStatus())){
+       if(UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation)&&UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation.getOperationStatus())&&"CREATE".equals(operationProgressInformation.getOperationStatus().getOperation())){
                serviceLcmService.updateServiceInstanceStatusById(operationProgressInformation.getOperationStatus().getResult(), serviceId);
        }
        return operationProgressInformation;
index 18d57d0..2cba0a0 100644 (file)
@@ -52,7 +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){
-       ServiceTemplateInput serviceTemplateInput = serviceTemplateService.fetchServiceTemplateInput(uuid, toscaModelPath);
+       ServiceTemplateInput serviceTemplateInput = serviceTemplateService.fetchServiceTemplateInput(uuid, "/api"+toscaModelPath);
        logger.info("returned template content :"+serviceTemplateInput);
         return serviceTemplateInput;
     }
index d787f87..7f3f318 100644 (file)
@@ -29,6 +29,7 @@ import org.onap.usecaseui.server.constant.Constant;
 import org.onap.usecaseui.server.service.sotn.SOTNService;
 import org.onap.usecaseui.server.util.HttpUtil;
 import org.onap.usecaseui.server.util.UuiCommonUtil;
+import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -40,6 +41,7 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
 @RestController
+@CrossOrigin(origins="*")
 @RequestMapping("/uui-sotn")
 public class SotnController {
        
index 81ee6ef..e11e8bd 100644 (file)
@@ -99,7 +99,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-       @GET("/api/aai-network/v13/network-resources")
+       @GET("/api/aai-network/v14/network-resources")
        Call<ResponseBody> listNetWorkResources();
     
     @Headers({
@@ -108,7 +108,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-       @GET("/api/aai-network/v13/pnfs/pnf/{pnfName}/p-interfaces")
+       @GET("/api/aai-network/v14/pnfs/pnf/{pnfName}/p-interfaces")
        Call<PinterfaceRsp> getPinterfaceByPnfName(@Path("pnfName") String pnfName);
     
     @Headers({
@@ -117,7 +117,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-       @GET("/api/aai-network/v13/logical-links")
+       @GET("/api/aai-network/v14/logical-links")
        Call<ResponseBody> getLogicalLinks();
     
     @Headers({
@@ -126,7 +126,7 @@ public interface AAIService {
        "Authorization: Basic QUFJOkFBSQ==",
        "Accept: application/json"
     })
-    @GET("/api/aai-network/v13/logical-links/logical-link/{link-name}")
+    @GET("/api/aai-network/v14/logical-links/logical-link/{link-name}")
     Call<ResponseBody> getSpecificLogicalLink(@Path("link-name") String linkName);
     
     @Headers({
@@ -135,7 +135,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-    @PUT("/api/aai-network/v13/network-resources/network-resource/{networkId}")
+    @PUT("/api/aai-network/v14/network-resources/network-resource/{networkId}")
     Call<ResponseBody> createTopoNetwork(@Body RequestBody body,@Path("networkId") String networkId);
     
     @Headers({
@@ -144,7 +144,7 @@ public interface AAIService {
        "Authorization: Basic QUFJOkFBSQ==",
        "Accept: application/json"
     })
-    @PUT("/api/aai-network/v13/ext-aai-networks/ext-aai-network/{aai-id}")
+    @PUT("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}")
     Call<ResponseBody> createHostUrl(@Body RequestBody body,@Path("aai-id") String aaiId);
     
     @Headers({
@@ -153,7 +153,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-       @GET("/api/aai-network/v13/ext-aai-networks/ext-aai-network/{aai-id}")
+       @GET("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}")
        Call<ResponseBody> getExtAaiId(@Path("aai-id") String aaiId);
     
     @Headers({
@@ -162,7 +162,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-       @GET("/api/aai-network/v13/ext-aai-networks/ext-aai-network/{aai-id}/esr-system-info")
+       @GET("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}/esr-system-info")
        Call<ResponseBody> getHostUrl(@Path("aai-id") String aaiId);
     
     @Headers({
@@ -171,7 +171,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-    @PUT("/api/aai-network/v13/pnfs/pnf/{pnfName}/p-interfaces/p-interface/{tp-id}")
+    @PUT("/api/aai-network/v14/pnfs/pnf/{pnfName}/p-interfaces/p-interface/{tp-id}")
     Call<ResponseBody> createTerminationPoint(@Body RequestBody body,@Path("pnfName") String pnfName,@Path("tp-id") String tpId);
     
     @Headers({
@@ -180,7 +180,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-    @PUT("/api/aai-network/v13/pnfs/pnf/{pnfname}")
+    @PUT("/api/aai-network/v14/pnfs/pnf/{pnfname}")
     Call<ResponseBody> createPnf(@Body RequestBody body,@Path("pnfname") String pnfname);
     
     @Headers({
@@ -189,7 +189,7 @@ public interface AAIService {
        "Authorization: Basic QUFJOkFBSQ==",
        "Accept: application/json"
     })
-    @PUT("/api/aai-network/v13/logical-links/logical-link/{linkName}")
+    @PUT("/api/aai-network/v14/logical-links/logical-link/{linkName}")
     Call<ResponseBody> createLink(@Body RequestBody body,@Path("linkName") String linkName);
     
     @Headers({
@@ -198,7 +198,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-    @DELETE("/api/aai-network/v13/logical-links/logical-link/{linkName}")
+    @DELETE("/api/aai-network/v14/logical-links/logical-link/{linkName}")
     Call<ResponseBody> deleteLink(@Path("linkName") String linkName,@Query("resource-version") String resourceVersion);
     
     @Headers({
@@ -207,7 +207,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-    @GET("/api/aai-business/v13/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
+    @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
     Call<ResponseBody> getServiceInstances(@Path("global-customer-id") String customerId,@Path("service-type") String serviceType);
     
     @Headers({
@@ -216,7 +216,7 @@ public interface AAIService {
         "Authorization: Basic QUFJOkFBSQ==",
         "Accept: application/json"
     })
-    @GET("/api/aai-business/v13/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
+    @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances")
     Call<ResponseBody> serviceInstaneInfo(@Path("global-customer-id") String globalCustomerId,@Path("service-type") String serviceType,@Query("service-instance-id") String serviceInstanceId);
     
     @Headers({
@@ -225,7 +225,7 @@ public interface AAIService {
        "Authorization: Basic QUFJOkFBSQ==",
        "Accept: application/json"
     })
-    @GET("/api/aai-business/v13/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}/allotted-resources")
+    @GET("/api/aai-business/v14/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}/allotted-resources")
     Call<ResponseBody> getAllottedResources(@Path("global-customer-id") String globalCustomerId,@Path("service-type") String serviceType,@Path("service-instance-id") String serviceInstanceId);
     
     @Headers({
@@ -234,7 +234,7 @@ public interface AAIService {
        "Authorization: Basic QUFJOkFBSQ==",
        "Accept: application/json"
     })
-    @GET("/api/aai-network/v13/pnfs/pnf/{pnfName}")
+    @GET("/api/aai-network/v14/pnfs/pnf/{pnfName}")
     Call<ResponseBody> getPnfInfo(@Path("pnfName") String pnfName);
     
     @Headers({
@@ -243,7 +243,7 @@ public interface AAIService {
        "Authorization: Basic QUFJOkFBSQ==",
        "Accept: application/json"
     })
-    @GET("/api/aai-network/v13/connectivities")
+    @GET("/api/aai-network/v14/connectivities")
     Call<ResponseBody> getConnectivityInfo(@Query("connectivity-id") String connectivityId);
     
     @Headers({
@@ -252,9 +252,15 @@ public interface AAIService {
        "Authorization: Basic QUFJOkFBSQ==",
        "Accept: application/json"
     })
-    @GET("/api/aai-network/v13/vpn-bindings")
+    @GET("/api/aai-network/v14/vpn-bindings")
     Call<ResponseBody> getPinterfaceByVpnId(@Query("vpn-id") String vpnId);
     
-    @DELETE("/api/aai-network/v13/ext-aai-networks/ext-aai-network/{aai-id}")
+    @Headers({
+       "X-TransactionId: 7777",
+       "X-FromAppId: uui",
+       "Authorization: Basic QUFJOkFBSQ==",
+       "Accept: application/json"
+    })
+    @DELETE("/api/aai-network/v14/ext-aai-networks/ext-aai-network/{aai-id}")
     Call<ResponseBody> deleteExtNetwork(@Path("aai-id") String aaiId,@Query("resource-version") String resourceVersion);
 }
index a5ba097..323329b 100644 (file)
@@ -29,14 +29,14 @@ public interface SOService {
             "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
             "Accept: application/json"
     })
-    @POST("/onap/so/infra/e2eServiceInstances/v3")
+    @POST("/api/so-serviceInstances/v5")
     Call<ServiceOperation> instantiateService(@Body RequestBody body);
 
     @Headers({
             "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
             "Accept: application/json"
     })
-    @GET("/onap/so/infra/e2eServiceInstances/v3/{serviceId}/operations/{operationId}")
+    @GET("/api/so-serviceInstances/v5/{serviceId}/operations/{operationId}")
     Call<OperationProgressInformation> queryOperationProgress(@Path("serviceId") String serviceId, @Path("operationId") String operationId);
 
     @Headers({
@@ -44,20 +44,20 @@ public interface SOService {
             "Accept: application/json"
     })
 //    @DELETE("/ecomp/mso/infra/e2eServiceInstances/v3/{serviceId}")
-    @HTTP(method="DELETE", path="/onap/so/infra/e2eServiceInstances/v3/{serviceId}", hasBody = true)
+    @HTTP(method="DELETE", path="/api/so-serviceInstances/v5/{serviceId}", hasBody = true)
     Call<DeleteOperationRsp> terminateService(@Path("serviceId") String serviceId, @Body RequestBody body);
     
     @Headers({
         "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
         "Accept: application/json"
     })
-       @POST("/onap/so/infra/e2eServiceInstances/v3/{serviceId}/scale")
+       @POST("/api/so-serviceInstances/v5/{serviceId}/scale")
        Call<SaveOrUpdateOperationRsp> scaleService(@Path("serviceId") String serviceId, @Body RequestBody body);
     
     @Headers({
         "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
         "Accept: application/json"
     })
-       @PUT("/onap/so/infra/e2eServiceInstances/v3/{serviceId}")
+       @PUT("/api/so-serviceInstances/v5/{serviceId}")
        Call<SaveOrUpdateOperationRsp> updateService(@Path("serviceId") String serviceId, @Body RequestBody body);
 }
index 25598f0..14ca9ed 100644 (file)
@@ -344,11 +344,11 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
 
        @Override
        public String deleteNsdPackage(String nsdInfoId) {
-
+               Response<ResponseBody> response=null;
                String result="";
         try {
                logger.info("vfc deleteNsdPackage is starting!");
-            Response<ResponseBody> response = this.vfcService.deleteNsdPackage(nsdInfoId).execute();
+            response = this.vfcService.deleteNsdPackage(nsdInfoId).execute();
             logger.info("vfc deleteNsdPackage has finished!");
             if (response.isSuccessful()) {
                result=Constant.CONSTANT_SUCCESS;
@@ -357,6 +357,9 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
                 result=Constant.CONSTANT_FAILED;;
             }
         } catch (IOException e) {
+               if(e.getMessage().contains("204")){
+                       return Constant.CONSTANT_SUCCESS;
+               }
             logger.error("deleteNsdPackage occur exception:"+e);
             result=Constant.CONSTANT_FAILED;;
         }
@@ -366,11 +369,11 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
 
        @Override
        public String deleteVnfPackage(String vnfPkgId) {
-
+               Response<ResponseBody> response=null;
                String result="";
         try {
                logger.info("vfc deleteVnfPackage is starting!");
-            Response<ResponseBody> response = this.vfcService.deleteVnfdPackage(vnfPkgId).execute();
+            response = this.vfcService.deleteVnfdPackage(vnfPkgId).execute();
             logger.info("vfc deleteVnfPackage has finished!");
             if (response.isSuccessful()) {
                result=Constant.CONSTANT_SUCCESS;
@@ -379,6 +382,9 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
                 result=Constant.CONSTANT_FAILED;;
             }
         } catch (IOException e) {
+               if(e.getMessage().contains("204")){
+                       return Constant.CONSTANT_SUCCESS;
+               }
             logger.error("deleteVnfPackage occur exception:"+e);
             result=Constant.CONSTANT_FAILED;;
         }
@@ -388,11 +394,11 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
 
        @Override
        public String deletePnfPackage(String pnfdInfoId) {
-
+               Response<ResponseBody> response=null;
                String result="";
         try {
                logger.info("vfc deletePnfPackage is starting!");
-            Response<ResponseBody> response = this.vfcService.deletePnfdPackage(pnfdInfoId).execute();
+               response = this.vfcService.deletePnfdPackage(pnfdInfoId).execute();
             logger.info("vfc deletePnfPackage has finished!");
             if (response.isSuccessful()) {
                result=Constant.CONSTANT_SUCCESS;
@@ -401,6 +407,9 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
                 result=Constant.CONSTANT_FAILED;;
             }
         } catch (IOException e) {
+               if(e.getMessage().contains("204")){
+                       return Constant.CONSTANT_SUCCESS;
+               }
             logger.error("deletePnfPackage occur exception:"+e);
             result=Constant.CONSTANT_FAILED;;
         }
@@ -462,11 +471,11 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
 
        @Override
        public String deleteNetworkServiceInstance(String nsInstanceId) {
-
+               Response response = null;
                String result="";
         try {
                logger.info("vfc deleteNetworkServiceInstance is starting!");
-            Response<ResponseBody> response = this.vfcService.deleteNetworkServiceInstance(nsInstanceId).execute();
+            response = this.vfcService.deleteNetworkServiceInstance(nsInstanceId).execute();
             logger.info("vfc deleteNetworkServiceInstance has finished!");
             if (response.isSuccessful()) {
                result=Constant.CONSTANT_SUCCESS;
@@ -475,8 +484,11 @@ public class DefaultPackageDistributionService implements PackageDistributionSer
                 result=Constant.CONSTANT_FAILED;;
             }
         } catch (IOException e) {
+               if(e.getMessage().contains("204")){
+                       return Constant.CONSTANT_SUCCESS;
+               }
             logger.error("deleteNetworkServiceInstance occur exception:"+e);
-            result=Constant.CONSTANT_FAILED;;
+            result=Constant.CONSTANT_FAILED;
         }
         return result;
        
index 88a516f..0456130 100644 (file)
@@ -114,6 +114,8 @@ public class DefaultServiceInstanceService implements ServiceInstanceService {
                        }
                        String serviceDomain = serviceBean.getServiceDomain();
                                object.put("serviceDomain",serviceDomain);
+                               object.put("serviceStatus",serviceBean.getStatus());
+                               object.put("operationId",serviceBean.getOperationId());
                                if("SOTN".equals(serviceDomain)||"CCVPN".equals(serviceDomain)||"E2E Service".equals(serviceDomain)||"Network Service".equals(serviceDomain)){
                                        List<String> parentIds = serviceLcmService.getServiceInstanceIdByParentId(serviceInstanceId);
                                        List<String> parentServiceInstances = new ArrayList<>();
index fa9cf6a..f8243e5 100644 (file)
@@ -218,7 +218,7 @@ public class DefaultServiceLcmService implements ServiceLcmService {
 
                        String string = "from ServiceBean  where 1=1 and parentServiceInstanceId=:parentServiceInstanceId";
                        Query q = session.createQuery(string);
-                       q.setString("serviceInstanceId",parentServiceInstanceId);
+                       q.setString("parentServiceInstanceId",parentServiceInstanceId);
                        list = q.list();
                        session.flush();
                }catch (Exception e){
index abad7fb..704e411 100644 (file)
@@ -107,6 +107,7 @@ public class DefaultServiceTemplateService implements ServiceTemplateService {
         try {
             String msbUrl = RestfulServices.getMsbAddress();
             String templateUrl = String.format("http://%s%s", msbUrl, toscaModelPath);
+            logger.info("download Csar File Url is:"+templateUrl);
             ResponseBody body = sdcCatalog.downloadCsar(templateUrl).execute().body();
             Files.write(body.bytes(),new File(toPath));
         } catch (IOException e) {
index 69babfd..2a3ae07 100644 (file)
     <parent>
         <groupId>org.onap.usecase-ui.server</groupId>
         <artifactId>usecase-ui-server-parent</artifactId>
-        <version>1.2.1-SNAPSHOT</version>
+        <version>1.3.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <artifactId>standalone</artifactId>
-    <version>1.2.1-SNAPSHOT</version>
+    <version>1.3.0-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>usecase-ui-server-standalone</name>
 
@@ -34,7 +34,7 @@
         <linux64outputdir>target/assembly/${linux64}/</linux64outputdir>
         <win64outputdir>target/assembly/${win64id}/</win64outputdir>
         <version.output>target/version/</version.output>
-        <usecaseui.version>1.2.1</usecaseui.version>
+        <usecaseui.version>1.3.0</usecaseui.version>
         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
     </properties>
 
index a8f7c21..59d51a8 100644 (file)
@@ -121,13 +121,13 @@ ALTER TABLE `performance_commoneventheader` ADD INDEX `performance_commoneventhe
 DROP TABLE IF EXISTS `service_instances`;
 CREATE TABLE `service_instances`  (
   `id` varchar(100) NOT NULL,
-  `serviceInstanceId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
-  `customerId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
-  `serviceType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
-  `serviceDomain` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
-  `operationId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
-  `parentServiceInstanceId` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
-  `status` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `serviceInstanceId` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `customerId` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `serviceType` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `serviceDomain` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `operationId` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `parentServiceInstanceId` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `status` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
index 688582d..a254b21 100644 (file)
@@ -3,8 +3,8 @@
 # because they are used in Jenkins, whose plug-in doesn't support
 
 major=1
-minor=2
-patch=1
+minor=3
+patch=0
 
 base_version=${major}.${minor}.${patch}