diff options
author | guochuyicmri <guochuyi@chinamobile.com> | 2018-11-22 17:45:07 +0800 |
---|---|---|
committer | guochuyicmri <guochuyi@chinamobile.com> | 2018-11-22 17:45:15 +0800 |
commit | b248d33597f58a0b42cbc9cb22177b87ce2d660c (patch) | |
tree | 62d0a10874e2ae84603ebdc9ca9726c654d96b05 | |
parent | 5e373056b435f35f577e4e69ab068c9611e9de91 (diff) |
update aai,so request url
Change-Id: Ia9d87a76b861e5d9e20ffadbf1a1f079d40a08c8
Issue-ID: USECASEUI-167
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
4 files changed, 27 insertions, 25 deletions
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 383774e0..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,7 +252,7 @@ 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); @Headers({ @@ -261,6 +261,6 @@ public interface AAIService { "Authorization: Basic QUFJOkFBSQ==", "Accept: application/json" }) - @DELETE("/api/aai-network/v13/ext-aai-networks/ext-aai-network/{aai-id}") + @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); } |