Define the AAI API in esr-server. 09/12709/1
authorlizi00164331 <li.zi30@zte.com.cn>
Fri, 15 Sep 2017 12:13:01 +0000 (20:13 +0800)
committerlizi00164331 <li.zi30@zte.com.cn>
Fri, 15 Sep 2017 12:13:01 +0000 (20:13 +0800)
These API will be used by esr-server.

Change-Id: Ife44846118b8d93d2cd258414e91b79921d1e9ae
Issue-ID: AAI-261
Signed-off-by: lizi00164331 <li.zi30@zte.com.cn>
esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/IExternalSystem.java [new file with mode: 0644]

diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/IExternalSystem.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/IExternalSystem.java
new file mode 100644 (file)
index 0000000..13b172a
--- /dev/null
@@ -0,0 +1,142 @@
+/**
+ * Copyright 2017 ZTE Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.aai.esr.externalservice.aai;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+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.EsrEmsDetail;
+import org.onap.aai.esr.entity.aai.EsrThirdpartySdncDetail;
+import org.onap.aai.esr.entity.aai.EsrVnfmDetail;
+
+public interface IExternalSystem {
+
+  @PUT
+  @Path("/esr-vnfm-list/esr-vnfm/{vnfm_id}")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public void registerVNFM(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization, @PathParam("vnfm_id") String vnfmId,
+      EsrVnfmDetail esrVnfmDetail) throws Exception;
+
+  @GET
+  @Path("/esr-vnfm-list/esr-vnfm/{vnfm_id}?depth=all")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public String queryVNFMDetail(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization, @PathParam("vnfm_id") String vnfmId)
+      throws Exception;
+
+  @GET
+  @Path("/esr-vnfm-list")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public String queryVNFMList(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization) throws Exception;
+
+  @DELETE
+  @Path("/esr-vnfm-list/esr-vnfm/{vnfm_id}")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public void deleteVNFM(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization,
+      @PathParam("vnfm_id") String vnfmId,
+      @QueryParam("resouce-version") String resourceVersion) throws Exception;
+
+  @PUT
+  @Path("/esr-ems-list/esr-ems/{ems_id}")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public void registerEMS(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization, @PathParam("ems_id") String emsId,
+      EsrEmsDetail esrEmsDetail) throws Exception;
+
+  @GET
+  @Path("/esr-ems-list/esr-ems/{ems_id}?depth=all")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public String queryEMSDetail(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization, @PathParam("ems_id") String emsId)
+      throws Exception;
+
+  @GET
+  @Path("/esr-ems-list")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public String queryEMSList(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization) throws Exception;
+
+  @DELETE
+  @Path("/esr-ems-list/esr-ems/{ems_id}")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public void deleteEMS(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization,
+      @PathParam("ems_id") String emsId,
+      @QueryParam("resouce-version") String resourceVersion) throws Exception;
+  
+  @PUT
+  @Path("/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{thirdparty-sdnc-id}")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public void registerThirdpartySdnc(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization, @PathParam("thirdparty-sdnc-id") String thirdpartySdncId,
+      EsrThirdpartySdncDetail esrThirdpartySdncDetail) throws Exception;
+
+  @GET
+  @Path("/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{thirdparty-sdnc-id}?depth=all")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public String queryThirdpartySdncDetail(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization, @PathParam("thirdparty-sdnc-id") String thirdpartySdncId)
+      throws Exception;
+
+  @GET
+  @Path("/esr-thirdparty-sdnc-list")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public String queryThirdpartySdncList(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization) throws Exception;
+
+  @DELETE
+  @Path("/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{thirdparty-sdnc-id}")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public void deleteThirdpartySdnc(@HeaderParam("X-TransactionId") String transactionId,
+      @HeaderParam("X-FromAppId") String fromApp,
+      @HeaderParam("Authorization") String authorization,
+      @PathParam("thirdparty-sdnc-id") String thirdpartySdncId,
+      @QueryParam("resouce-version") String resourceVersion) throws Exception;
+}