X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fesr-server.git;a=blobdiff_plain;f=esr-mgr%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fesr%2Fexternalservice%2Faai%2FICloudRegion.java;h=f2e47b695e71692f9b84f059c45c432f24ae2b46;hp=3b51e29e2734bcd60a142519890db98c49664a7a;hb=06fe3f5d62f9b986ebb8babf6fb140baed44769f;hpb=07c89153d16b14bda54f16ef9f37e54bfc0a68f8 diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java index 3b51e29..f2e47b6 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2018 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,48 +25,62 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; - import org.onap.aai.esr.entity.aai.CloudRegionDetail; +import org.onap.aai.esr.entity.aai.Relationship; +import org.onap.aai.esr.exception.ExtsysException; - -@Path("/cloud-regions") +@Path("/") public interface ICloudRegion { - @PUT - @Path("/cloud-region/{cloud_owner}/{cloud_region_id}") - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) - public void registerVIMService(@HeaderParam("X-TransactionId") String transactionId, - @HeaderParam("X-FromAppId") String fromApp, - @HeaderParam("Authorization") String authorization, - @PathParam("cloud_owner") String cloud_owner, - @PathParam("cloud_region_id") String cloud_region_id, CloudRegionDetail cloudRegion) throws Exception; + @PUT + @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public void registerVIMService(@HeaderParam("X-TransactionId") String transactionId, + @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization, + @PathParam("cloud_owner") String cloud_owner, @PathParam("cloud_region_id") String cloud_region_id, + CloudRegionDetail cloudRegion) throws ExtsysException; + + @GET + @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}?depth=all") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public String queryVIMDetail(@HeaderParam("X-TransactionId") String transactionId, + @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization, + @PathParam("cloud_owner") String cloud_owner, @PathParam("cloud_region_id") String cloud_region_id) + throws ExtsysException; - @GET - @Path("/cloud-region/{cloud_owner}/{cloud_region_id}?depth=all") - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) - public String queryVIMDetail(@HeaderParam("X-TransactionId") String transactionId, - @HeaderParam("X-FromAppId") String fromApp, - @HeaderParam("Authorization") String authorization, - @PathParam("cloud_owner") String cloud_owner, - @PathParam("cloud_region_id") String cloud_region_id) throws Exception; - - @GET - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) - public String queryVIMList(@HeaderParam("X-TransactionId") String transactionId, - @HeaderParam("X-FromAppId") String fromApp, - @HeaderParam("Authorization") String authorization) throws Exception; + @GET + @Path("/cloud-regions") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public String queryVIMList(@HeaderParam("X-TransactionId") String transactionId, + @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization) + throws ExtsysException; - @DELETE - @Path("/cloud-region/{cloud_owner}/{cloud_region_id}") - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) - public void deleteVim(@HeaderParam("X-TransactionId") String transactionId, - @HeaderParam("X-FromAppId") String fromApp, - @HeaderParam("Authorization") String authorization, - @PathParam("cloud_owner") String cloud_owner, - @PathParam("cloud_region_id") String cloud_region_id, - @QueryParam("resource-version") String resourceVersion) throws Exception; + @DELETE + @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public void deleteVim(@HeaderParam("X-TransactionId") String transactionId, + @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization, + @PathParam("cloud_owner") String cloud_owner, @PathParam("cloud_region_id") String cloud_region_id, + @QueryParam("resource-version") String resourceVersion) throws ExtsysException; + + @PUT + @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}/relationship-list/relationship") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public void createCloudRegionRelationship(@HeaderParam("X-TransactionId") String transactionId, + @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization, + @PathParam("cloud_owner") String cloud_owner, @PathParam("cloud_region_id") String cloud_region_id, + Relationship relationship) throws ExtsysException; + + @GET + @Path("/complexes") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public String queryComplexList(@HeaderParam("X-TransactionId") String transactionId, + @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization) + throws ExtsysException; }