summaryrefslogtreecommitdiffstats
path: root/esr-mgr/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'esr-mgr/src/main')
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxy.java25
1 files changed, 15 insertions, 10 deletions
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 6fca0e6..a4c80eb 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
@@ -26,8 +26,8 @@ import com.eclipsesource.jaxrs.consumer.ConsumerFactory;
public class ExternalSystemProxy {
+ public static boolean isTest = false;
private static IExternalSystem externalSystemproxy;
-
private static String transactionId = "9999";
private static String fromAppId = "esr-server";
private static String authorization = AaiCommon.getAuthenticationCredentials();
@@ -37,15 +37,20 @@ public class ExternalSystemProxy {
config, IExternalSystem.class);
}
- public static void registerVnfm(String vnfmId, EsrVnfmDetail esrVnfmDetail) throws ExtsysException {
- ClientConfig config = new ClientConfig(new VnfmRegisterProvider());
- IExternalSystem registerVnfmServiceproxy = ConsumerFactory
- .createConsumer(MsbConfig.getExternalSystemAddr(), config, IExternalSystem.class);
- try {
- registerVnfmServiceproxy.registerVNFM(transactionId, fromAppId, authorization, vnfmId,
- esrVnfmDetail);
- } catch (Exception e) {
- throw new ExtsysException("PUT VNFM to A&AI failed.", e);
+ public static void registerVnfm(String vnfmId, EsrVnfmDetail esrVnfmDetail)
+ throws ExtsysException {
+ if (isTest) {
+
+ } else {
+ ClientConfig config = new ClientConfig(new VnfmRegisterProvider());
+ IExternalSystem registerVnfmServiceproxy = ConsumerFactory
+ .createConsumer(MsbConfig.getExternalSystemAddr(), config, IExternalSystem.class);
+ try {
+ registerVnfmServiceproxy.registerVNFM(transactionId, fromAppId, authorization, vnfmId,
+ esrVnfmDetail);
+ } catch (Exception e) {
+ throw new ExtsysException("PUT VNFM to A&AI failed.", e);
+ }
}
}