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;fp=esr-mgr%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fesr%2Fexternalservice%2Faai%2FExternalSystemProxy.java;h=6c34265151a7837c83d5c4517b2bd7d6b3caefac;hb=3ca84f4c73c5996a2cc5d4372d70f1e7bce5cf0f;hp=a571369cedab821abc4975710bbef3e9229b283e;hpb=4bc5af16cefb4c33f83bf499b385c94e0c850595;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 a571369..6c34265 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 @@ -80,6 +80,14 @@ public class ExternalSystemProxy { } public static String queryVnfmList() throws ExtsysException { + if(isTest) { + String vnfmListStr = "{\"esr-vnfm\": " + + "[{\"vnfm-id\": \"123456\"," + + "\"vim-id\": \"987654\"," + + "\"certificate-url\": \"http://11.22.33.44:5000/v3\"," + + "\"resource-version\": \"1\"}]}"; + return vnfmListStr; + } try { return externalSystemproxy.queryVNFMList(transactionId, fromAppId, authorization); } catch (Exception e) { @@ -88,10 +96,12 @@ public class ExternalSystemProxy { } public static void deleteVnfm(String vnfmId, String resourceVersion) throws ExtsysException { - try { - externalSystemproxy.deleteVNFM(transactionId, fromAppId, authorization, vnfmId, resourceVersion); - } catch (Exception e) { - throw new ExtsysException("Delete VNFM from A&AI failed.", e); + if(!isTest) { + try { + externalSystemproxy.deleteVNFM(transactionId, fromAppId, authorization, vnfmId, resourceVersion); + } catch (Exception e) { + throw new ExtsysException("Delete VNFM from A&AI failed.", e); + } } }