X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=esr-mgr%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fesr%2Fexternalservice%2Faai%2FExternalSystemProxy.java;h=046a25ba5054354ead0637b1878cf02af2296202;hb=fbc14fb126199394da2ccc459460e69672772c1c;hp=ea7c805d6440431c5e1ba5bb5bdbdec7ef2e971a;hpb=66596a09241e9548bb2a286f2341705a3ddf26f2;p=aai%2Fesr-server.git diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxy.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxy.java index ea7c805..046a25b 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxy.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxy.java @@ -16,6 +16,8 @@ package org.onap.aai.esr.externalservice.aai; import org.glassfish.jersey.client.ClientConfig; +import org.onap.aai.esr.entity.aai.EsrEmsDetail; +import org.onap.aai.esr.entity.aai.EsrThirdpartySdncDetail; import org.onap.aai.esr.entity.aai.EsrVnfmDetail; import com.eclipsesource.jaxrs.consumer.ConsumerFactory; @@ -34,7 +36,7 @@ public class ExternalSystemProxy { } public static void registerVnfm(String vnfmId, EsrVnfmDetail esrVnfmDetail) throws Exception { - ClientConfig config = new ClientConfig(new RegisterVnfmProvider()); + ClientConfig config = new ClientConfig(new VnfmRegisterProvider()); IExternalSystem registerVnfmServiceproxy = ConsumerFactory .createConsumer(AaiAdapterConfig.getExternalSystemAddr(), config, IExternalSystem.class); registerVnfmServiceproxy.registerVNFM(transactionId, fromAppId, authorization, vnfmId, @@ -48,4 +50,48 @@ public class ExternalSystemProxy { public static String queryVnfmList() throws Exception { return externalSystemproxy.queryVNFMList(transactionId, fromAppId, authorization); } + + public static void deleteVnfm(String vnfmId, String resourceVersion) throws Exception { + externalSystemproxy.deleteVNFM(transactionId, fromAppId, authorization, vnfmId, resourceVersion); + } + + public static void registerSdnc(String thirdpartySdncId, EsrThirdpartySdncDetail esrSdncDetail) throws Exception { + ClientConfig config = new ClientConfig(new ThirdpartySdncRegisterProvider()); + IExternalSystem registerSdncServiceproxy = ConsumerFactory + .createConsumer(AaiAdapterConfig.getExternalSystemAddr(), config, IExternalSystem.class); + registerSdncServiceproxy.registerThirdpartySdnc(transactionId, fromAppId, authorization, thirdpartySdncId, + esrSdncDetail); + } + + public static String queryThirdpartySdncDetail(String thirdpartySdncId) throws Exception{ + return externalSystemproxy.queryThirdpartySdncDetail(transactionId, fromAppId, authorization, thirdpartySdncId); + } + + public static String querySdncList() throws Exception { + return externalSystemproxy.queryThirdpartySdncList(transactionId, fromAppId, authorization); + } + + public static void deleteThirdpartySdnc(String sdncId, String resourceVersion) throws Exception { + externalSystemproxy.deleteThirdpartySdnc(transactionId, fromAppId, authorization, sdncId, resourceVersion); + } + + public static void registerEms(String emsId, EsrEmsDetail emsDetail) throws Exception { + ClientConfig config = new ClientConfig(new EmsRegisterProvider()); + IExternalSystem registerEmsServiceproxy = ConsumerFactory + .createConsumer(AaiAdapterConfig.getExternalSystemAddr(), config, IExternalSystem.class); + registerEmsServiceproxy.registerEMS(transactionId, fromAppId, authorization, emsId, + emsDetail); + } + + public static String queryEmsDetail(String emsId) throws Exception { + return externalSystemproxy.queryEMSDetail(transactionId, fromAppId, authorization, emsId); + } + + public static String queryEmsList() throws Exception { + return externalSystemproxy.queryEMSList(transactionId, fromAppId, authorization); + } + + public static void deleteEms(String emsId, String resourceVersion) throws Exception { + externalSystemproxy.deleteEMS(transactionId, fromAppId, authorization, emsId, resourceVersion); + } }