aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml2
-rw-r--r--server/pom.xml4
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java27
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java44
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java10
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionService.java30
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceLcmService.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceTemplateService.java1
-rw-r--r--standalone/pom.xml6
-rw-r--r--standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql14
-rw-r--r--version.properties4
15 files changed, 97 insertions, 55 deletions
diff --git a/pom.xml b/pom.xml
index d03717bf..927cb8bb 100644
--- 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>
diff --git a/server/pom.xml b/server/pom.xml
index 3ab2c044..0817d8ef 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -19,13 +19,13 @@
<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>
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java
index 4308e9f5..f9654d84 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java
@@ -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);
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
index 9a8feb66..77c7ec55 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
@@ -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;
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java
index 18d57d01..2cba0a06 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java
@@ -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;
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
index d787f87d..7f3f3188 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
@@ -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 {
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
index 81ee6efe..e11e8bde 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
@@ -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);
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java
index a5ba0971..323329b6 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java
@@ -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);
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionService.java
index 25598f09..14ca9ed6 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionService.java
@@ -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;
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java
index 88a516ff..04561302 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceInstanceService.java
@@ -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<>();
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceLcmService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceLcmService.java
index fa9cf6aa..f8243e5d 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceLcmService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceLcmService.java
@@ -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){
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceTemplateService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceTemplateService.java
index abad7fb1..704e4112 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceTemplateService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultServiceTemplateService.java
@@ -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) {
diff --git a/standalone/pom.xml b/standalone/pom.xml
index 69babfdc..2a3ae07a 100644
--- a/standalone/pom.xml
+++ b/standalone/pom.xml
@@ -18,12 +18,12 @@
<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>
diff --git a/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql b/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql
index a8f7c21f..59d51a80 100644
--- a/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql
+++ b/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql
@@ -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;
diff --git a/version.properties b/version.properties
index 688582d3..a254b216 100644
--- a/version.properties
+++ b/version.properties
@@ -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}