summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuji7 <lu.ji3@zte.com.cn>2017-10-14 16:31:27 +0800
committerLuji7 <lu.ji3@zte.com.cn>2017-10-14 16:31:33 +0800
commit6a8d64d01cb22c8d804342ad653e73c595c6a436 (patch)
treeb5ac28da23a982c4bffccc7849291a07de003511
parentd4a65cb4eb1377f4b376f5d2f3636e5bb7cf057c (diff)
Fix url wrong.
Change-Id: I71a956b7603087791a528f90926f453583af009c Issue-id: USECASEUI-36 Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java4
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java8
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java6
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceTemplateController.java6
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/SDCCatalogService.java14
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/SDCServiceTemplate.java18
7 files changed, 32 insertions, 26 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java
index ae6fb2fe..9d332e7b 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java
@@ -41,13 +41,13 @@ public class CustomerController {
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/customers"}, method = RequestMethod.GET , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/customers"}, method = RequestMethod.GET , produces = "application/json")
public List<AAICustomer> getCustomers(){
return customerService.listCustomer();
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/customers/{customerId}/service-subscriptions"}, method = RequestMethod.GET , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/customers/{customerId}/service-subscriptions"}, method = RequestMethod.GET , produces = "application/json")
public List<AAIServiceSubscription> getServiceSubscriptions(@PathVariable(value="customerId") String customerId){
return customerService.listServiceSubscriptions(customerId);
}
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 ccdd308b..0de43e1d 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
@@ -44,25 +44,25 @@ public class PackageDistributionController {
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/vf-ns-packages"}, method = RequestMethod.GET , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/vf-ns-packages"}, method = RequestMethod.GET , produces = "application/json")
public VfNsPackageInfo retrievePackageInfo(){
return packageDistributionService.retrievePackageInfo();
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/ns-packages"}, method = RequestMethod.POST , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/ns-packages"}, method = RequestMethod.POST , produces = "application/json")
public DistributionResult distributeNsPackage(@RequestBody Csar csar){
return packageDistributionService.postNsPackage(csar);
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/vf-packages"}, method = RequestMethod.POST , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/vf-packages"}, method = RequestMethod.POST , produces = "application/json")
public Job distributeVfPackage(@RequestBody Csar csar){
return packageDistributionService.postVfPackage(csar);
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/jobs/{jobId}"}, method = RequestMethod.POST , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/jobs/{jobId}"}, method = RequestMethod.POST , produces = "application/json")
public JobStatus getJobStatus(@PathVariable(value="jobId") String jobId){
return packageDistributionService.getJobStatus(jobId);
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java
index 21464dc4..e900365d 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java
@@ -44,7 +44,7 @@ public class ServiceInstanceController {
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/service-instances"}, method = RequestMethod.GET , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/service-instances"}, method = RequestMethod.GET , produces = "application/json")
public List<ServiceInstance> listServiceInstances(HttpServletRequest request){
String customerId = request.getParameter("customerId");
String serviceType = request.getParameter("serviceType");
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 846196b8..af6e1a46 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
@@ -45,19 +45,19 @@ public class ServiceLcmController {
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/services/"}, method = RequestMethod.POST , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/services/"}, method = RequestMethod.POST , produces = "application/json")
public ServiceOperation instantiateService(HttpServletRequest request){
return serviceLcmService.instantiateService(request);
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/services/{serviceId}/operations/{operationId}"}, method = RequestMethod.GET , produces = "application/json")
+ @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){
return serviceLcmService.queryOperationProgress(serviceId, operationId);
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/services/{serviceId}"}, method = RequestMethod.DELETE , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/services/{serviceId}"}, method = RequestMethod.DELETE , produces = "application/json")
public ServiceOperation terminateService(@PathVariable(value = "serviceId") String serviceId){
return serviceLcmService.terminateService(serviceId);
}
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 f64612a5..bbe25b70 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
@@ -43,19 +43,19 @@ public class ServiceTemplateController {
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/service-templates"}, method = RequestMethod.GET , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/service-templates"}, method = RequestMethod.GET , produces = "application/json")
public List<SDCServiceTemplate> getServiceTemplates(){
return serviceTemplateService.listDistributedServiceTemplate();
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/service-templates/{uuid}"}, method = RequestMethod.GET , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/service-templates/{uuid}"}, method = RequestMethod.GET , produces = "application/json")
public ServiceTemplateInput getServiceTemplateInput(@PathVariable("uuid") String uuid, @RequestParam("toscaModelPath") String toscaModelPath){
return serviceTemplateService.fetchServiceTemplateInput(uuid, toscaModelPath);
}
@ResponseBody
- @RequestMapping(value = {"/onapapi/uui-lcm/v1/locations/"}, method = RequestMethod.GET , produces = "application/json")
+ @RequestMapping(value = {"/uui-lcm/locations/"}, method = RequestMethod.GET , produces = "application/json")
public List<VimInfo> getLocations(){
return serviceTemplateService.listVim();
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/SDCCatalogService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/SDCCatalogService.java
index 690edad1..199e324f 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/SDCCatalogService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/SDCCatalogService.java
@@ -27,29 +27,29 @@ public interface SDCCatalogService {
@Headers({
"X-ECOMP-InstanceID: 777",
- "authorization : Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
+ "Authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
})
- @GET("sdc/v1/catalog/services")
+ @GET("/sdc/v1/catalog/services")
Call<List<SDCServiceTemplate>> listServices(@Query("category")String category, @Query("distributionStatus") String distributionStatus);
@Headers({
"X-ECOMP-InstanceID: 777",
- "authorization : Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
+ "Authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
})
- @GET("sdc/v1/catalog/services/{uuid}/metadata")
+ @GET("/sdc/v1/catalog/services/{uuid}/metadata")
Call<SDCServiceTemplate> getService(@Path("uuid") String uuid);
@Headers({
"X-ECOMP-InstanceID: 777",
- "authorization : Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
+ "Authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
})
@GET
Call<ResponseBody> downloadCsar(@Url String fileUrl);
@Headers({
"X-ECOMP-InstanceID: 777",
- "authorization : Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
+ "Authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
})
- @GET("sdc/v1/catalog/resources")
+ @GET("/sdc/v1/catalog/resources")
Call<List<Vnf>> listResources(@Query("resourceType") String resourceType, @Query("distributionStatus") String distributionStatus);
} \ No newline at end of file
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/SDCServiceTemplate.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/SDCServiceTemplate.java
index 52b516d1..0c434b4e 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/SDCServiceTemplate.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/SDCServiceTemplate.java
@@ -36,12 +36,12 @@ public class SDCServiceTemplate {
@JsonCreator
public SDCServiceTemplate(
- @JsonProperty String uuid,
- @JsonProperty String invariantUUID,
- @JsonProperty String name,
- @JsonProperty String version,
- @JsonProperty String toscaModelURL,
- @JsonProperty String category) {
+ @JsonProperty("uuid") String uuid,
+ @JsonProperty("invariantUUID") String invariantUUID,
+ @JsonProperty("name") String name,
+ @JsonProperty("version") String version,
+ @JsonProperty("toscaModelURL") String toscaModelURL,
+ @JsonProperty("category") String category) {
this.uuid = uuid;
this.invariantUUID = invariantUUID;
this.name = name;
@@ -50,26 +50,32 @@ public class SDCServiceTemplate {
this.category = category;
}
+ @JsonProperty("uuid")
public String getUuid() {
return uuid;
}
+ @JsonProperty("invariantUUID")
public String getInvariantUUID() {
return invariantUUID;
}
+ @JsonProperty("name")
public String getName() {
return name;
}
+ @JsonProperty("version")
public String getVersion() {
return version;
}
+ @JsonProperty("toscaModelURL")
public String getToscaModelURL() {
return toscaModelURL;
}
+ @JsonProperty("category")
public String getCategory() {
return category;
}