Fix url wrong. 83/18883/1
authorLuji7 <lu.ji3@zte.com.cn>
Sat, 14 Oct 2017 08:31:27 +0000 (16:31 +0800)
committerLuji7 <lu.ji3@zte.com.cn>
Sat, 14 Oct 2017 08:31:33 +0000 (16:31 +0800)
Change-Id: I71a956b7603087791a528f90926f453583af009c
Issue-id: USECASEUI-36
Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java
server/src/main/java/org/onap/usecaseui/server/controller/lcm/PackageDistributionController.java
server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.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/service/lcm/domain/sdc/SDCCatalogService.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/SDCServiceTemplate.java

index ae6fb2f..9d332e7 100644 (file)
@@ -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);
     }
index ccdd308..0de43e1 100644 (file)
@@ -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);
     }
index 21464dc..e900365 100644 (file)
@@ -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");
index 846196b..af6e1a4 100644 (file)
@@ -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);
     }
index f64612a..bbe25b7 100644 (file)
@@ -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();
     }
index 690edad..199e324 100644 (file)
@@ -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
index 52b516d..0c434b4 100644 (file)
@@ -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;
     }