summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLizi <li.zi30@zte.com.cn>2018-01-25 11:57:36 +0000
committerLizi <li.zi30@zte.com.cn>2018-01-25 11:57:47 +0000
commita9c5b27687df9f1d72c58fa64899b6783f6aef5a (patch)
treed38fff1e67868c650109910916bb3b2000b3e969
parent0d6ba27cdb051f6883687ace5d4d5f4b77ff0a85 (diff)
Change the static method to unstatic.
Change-Id: I47926c5de4d89f203866de663e74f3cec026959d Issue-ID: AAI-638 Signed-off-by: Lizi <li.zi30@zte.com.cn>
-rw-r--r--esr-mgr/pom.xml14
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxy.java24
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java20
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapper.java19
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java7
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java19
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java24
7 files changed, 78 insertions, 49 deletions
diff --git a/esr-mgr/pom.xml b/esr-mgr/pom.xml
index 8cf1933..58d7932 100644
--- a/esr-mgr/pom.xml
+++ b/esr-mgr/pom.xml
@@ -193,7 +193,7 @@
<version>1.6.5</version>
<scope>test</scope>
</dependency>
- <dependency>
+ <!-- <dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.7.1</version>
@@ -204,6 +204,18 @@
<artifactId>powermock-module-junit4-rule</artifactId>
<version>1.6.5</version>
<scope>test</scope>
+ </dependency> -->
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.5.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.5.5</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
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 ae8a501..caec4bc 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
@@ -38,7 +38,7 @@ public class ExternalSystemProxy {
public static IsTest test = new IsTest(false);
- public static void registerVnfm(String vnfmId, EsrVnfmDetail esrVnfmDetail) throws ExtsysException {
+ public void registerVnfm(String vnfmId, EsrVnfmDetail esrVnfmDetail) throws ExtsysException {
if (!test.getIsTest()){
ClientConfig config = new ClientConfig(new VnfmRegisterProvider());
IExternalSystem registerVnfmServiceproxy =
@@ -51,7 +51,7 @@ public class ExternalSystemProxy {
}
}
- public static String queryVnfmDetail(String vnfmId) throws ExtsysException {
+ public String queryVnfmDetail(String vnfmId) throws ExtsysException {
if (test.getIsTest()) {
String esrVnfmDetailStr = "{\"vnfm-id\":\"123456\",\"vim-id\":\"987654\","
+ "\"certificate-url\":\"http://ip:5000/v3\",\"esr-system-info-list\":{"
@@ -68,7 +68,7 @@ public class ExternalSystemProxy {
}
}
- public static String queryVnfmList() throws ExtsysException {
+ public String queryVnfmList() throws ExtsysException {
if (test.getIsTest()) {
String vnfmListStr = "{\"esr-vnfm\": [{\"vnfm-id\": \"123456\",\"vim-id\": \"987654\","
+ "\"certificate-url\": \"http://ip:5000/v3\",\"resource-version\": \"1\"}]}";
@@ -81,7 +81,7 @@ public class ExternalSystemProxy {
}
}
- public static void deleteVnfm(String vnfmId, String resourceVersion) throws ExtsysException {
+ public void deleteVnfm(String vnfmId, String resourceVersion) throws ExtsysException {
if (!test.getIsTest()) {
try {
externalSystemproxy.deleteVNFM(transactionId, fromAppId, authorization, vnfmId, resourceVersion);
@@ -91,7 +91,7 @@ public class ExternalSystemProxy {
}
}
- public static void registerSdnc(String thirdpartySdncId, EsrThirdpartySdncDetail esrSdncDetail)
+ public void registerSdnc(String thirdpartySdncId, EsrThirdpartySdncDetail esrSdncDetail)
throws ExtsysException {
if (!test.getIsTest()) {
ClientConfig config = new ClientConfig(new ThirdpartySdncRegisterProvider());
@@ -106,7 +106,7 @@ public class ExternalSystemProxy {
}
}
- public static String queryThirdpartySdncDetail(String thirdpartySdncId) throws ExtsysException {
+ public String queryThirdpartySdncDetail(String thirdpartySdncId) throws ExtsysException {
if (test.getIsTest()) {
String sdncDetail = "{\"thirdparty-sdnc-id\":\"123456\",\"location\":\"edge\","
+ "\"product-name\":\"thirdparty SDNC\",\"esr-system-info-list\":{\"esr-system-info\":"
@@ -124,7 +124,7 @@ public class ExternalSystemProxy {
}
}
- public static String querySdncList() throws ExtsysException {
+ public String querySdncList() throws ExtsysException {
if (test.getIsTest()) {
String sdncList =
"{\"esr-thirdparty-sdnc\": [{\"thirdparty-sdnc-id\": \"123456\",\"location\": \"edge\","
@@ -138,7 +138,7 @@ public class ExternalSystemProxy {
}
}
- public static void deleteThirdpartySdnc(String sdncId, String resourceVersion) throws ExtsysException {
+ public void deleteThirdpartySdnc(String sdncId, String resourceVersion) throws ExtsysException {
if (!test.getIsTest()) {
try {
externalSystemproxy.deleteThirdpartySdnc(transactionId, fromAppId, authorization, sdncId,
@@ -149,7 +149,7 @@ public class ExternalSystemProxy {
}
}
- public static void registerEms(String emsId, EsrEmsDetail emsDetail) throws ExtsysException {
+ public void registerEms(String emsId, EsrEmsDetail emsDetail) throws ExtsysException {
if (!test.getIsTest()) {
ClientConfig config = new ClientConfig(new EmsRegisterProvider());
IExternalSystem registerEmsServiceproxy =
@@ -162,7 +162,7 @@ public class ExternalSystemProxy {
}
}
- public static String queryEmsDetail(String emsId) throws ExtsysException {
+ public String queryEmsDetail(String emsId) throws ExtsysException {
if (test.getIsTest()) {
String emsDetailStr = "{\"ems-id\":\"123456\",\"esr-system-info-list\":{\"esr-system-info\":"
+ "[{\"esr-system-info-id\":\"234567\",\"system-name\":\"EMS_TEST\",\"type\":\"sftp\","
@@ -185,7 +185,7 @@ public class ExternalSystemProxy {
}
}
- public static String queryEmsList() throws ExtsysException {
+ public String queryEmsList() throws ExtsysException {
if (test.getIsTest()) {
return "{\"esr-ems\": [ {\"ems-id\": \"123456\",\"resource-version\": \"1\"}]}";
}
@@ -196,7 +196,7 @@ public class ExternalSystemProxy {
}
}
- public static void deleteEms(String emsId, String resourceVersion) throws ExtsysException {
+ public void deleteEms(String emsId, String resourceVersion) throws ExtsysException {
if (!test.getIsTest()) {
try {
externalSystemproxy.deleteEMS(transactionId, fromAppId, authorization, emsId, resourceVersion);
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java
index 63ffa87..588baad 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/EmsManagerWrapper.java
@@ -35,7 +35,7 @@ public class EmsManagerWrapper {
private static EmsManagerWrapper emsManagerWrapper;
private static final Logger LOG = LoggerFactory.getLogger(EmsManagerWrapper.class);
private static EmsManagerUtil emsManagerUtil = new EmsManagerUtil();
-
+ private static ExternalSystemProxy externalSystemProxy = new ExternalSystemProxy();
/**
* get VnfmManagerWrapper instance.
*
@@ -43,17 +43,21 @@ public class EmsManagerWrapper {
*/
public static EmsManagerWrapper getInstance() {
if (emsManagerWrapper == null) {
- emsManagerWrapper = new EmsManagerWrapper();
+ emsManagerWrapper = new EmsManagerWrapper(externalSystemProxy);
}
return emsManagerWrapper;
}
+
+ public EmsManagerWrapper(ExternalSystemProxy externalSystemProxy){
+ EmsManagerWrapper.externalSystemProxy = externalSystemProxy;
+ }
public Response registerEms(EmsRegisterInfo emsRegisterInfo) {
CommonRegisterResponse result = new CommonRegisterResponse();
EsrEmsDetail esrEmsDetail = emsManagerUtil.emsRegisterInfo2EsrEms(emsRegisterInfo);
String emsId = esrEmsDetail.getEmsId();
try {
- ExternalSystemProxy.registerEms(emsId, esrEmsDetail);
+ externalSystemProxy.registerEms(emsId, esrEmsDetail);
result.setId(emsId);
return Response.ok(result).build();
} catch (ExtsysException e) {
@@ -66,7 +70,7 @@ public class EmsManagerWrapper {
CommonRegisterResponse result = new CommonRegisterResponse();
EsrEmsDetail esrEmsDetail = getNewEsrEmsDetail(emsRegisterInfo, emsId);
try {
- ExternalSystemProxy.registerEms(emsId, esrEmsDetail);
+ externalSystemProxy.registerEms(emsId, esrEmsDetail);
result.setId(emsId);
return Response.ok(result).build();
} catch (ExtsysException e) {
@@ -79,7 +83,7 @@ public class EmsManagerWrapper {
List<EmsRegisterInfo> emsList = new ArrayList<>();
EsrEmsList esrEms = new EsrEmsList();
try {
- String esrEmsStr = ExternalSystemProxy.queryEmsList();
+ String esrEmsStr = externalSystemProxy.queryEmsList();
esrEms = new Gson().fromJson(esrEmsStr, EsrEmsList.class);
LOG.info("Response from AAI by query EMS list: " + esrEms);
emsList = getEmsDetailList(esrEms);
@@ -103,7 +107,7 @@ public class EmsManagerWrapper {
EsrEmsDetail esrEmsDetail = queryEsrEmsDetail(emsId);
String resourceVersion = esrEmsDetail.getResourceVersion();
try {
- ExternalSystemProxy.deleteEms(emsId, resourceVersion);
+ externalSystemProxy.deleteEms(emsId, resourceVersion);
return Response.noContent().build();
} catch (ExtsysException e) {
LOG.error("Delete EMS from A&AI failed! EMS ID: " + emsId + "resouce-version:" + resourceVersion, e);
@@ -115,7 +119,7 @@ public class EmsManagerWrapper {
EmsRegisterInfo emsRegisterInfo = new EmsRegisterInfo();
EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
try {
- String esrEmsStr = ExternalSystemProxy.queryEmsDetail(emsId);
+ String esrEmsStr = externalSystemProxy.queryEmsDetail(emsId);
LOG.info("Response from AAI by query EMS: " + esrEmsStr);
esrEmsDetail = new Gson().fromJson(esrEmsStr, EsrEmsDetail.class);
emsRegisterInfo = emsManagerUtil.EsrEms2EmsRegisterInfo(esrEmsDetail);
@@ -140,7 +144,7 @@ public class EmsManagerWrapper {
private EsrEmsDetail queryEsrEmsDetail(String emsId) {
EsrEmsDetail esrEmsDetail = new EsrEmsDetail();
try {
- String esrEmsStr = ExternalSystemProxy.queryEmsDetail(emsId);
+ String esrEmsStr = externalSystemProxy.queryEmsDetail(emsId);
LOG.info("Response from AAI by query EMS: " + esrEmsStr);
esrEmsDetail = new Gson().fromJson(esrEmsStr, EsrEmsDetail.class);
} catch (ExtsysException e) {
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapper.java
index 0979ec0..8742059 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapper.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpartySdncWrapper.java
@@ -36,6 +36,7 @@ public class ThirdpartySdncWrapper {
private static ThirdpartySdncWrapper thirdpatySdncWrapper;
private static final Logger LOG = LoggerFactory.getLogger(ThirdpartySdncWrapper.class);
private static ThirdpartySdncManagerUtil thirdpartySdncManagerUtil = new ThirdpartySdncManagerUtil();
+ private static ExternalSystemProxy externalSystemProxy = new ExternalSystemProxy();
/**
* get ThirdpatySdncWrapper instance.
@@ -44,17 +45,21 @@ public class ThirdpartySdncWrapper {
*/
public static ThirdpartySdncWrapper getInstance() {
if (thirdpatySdncWrapper == null) {
- thirdpatySdncWrapper = new ThirdpartySdncWrapper();
+ thirdpatySdncWrapper = new ThirdpartySdncWrapper(externalSystemProxy);
}
return thirdpatySdncWrapper;
}
+
+ public ThirdpartySdncWrapper(ExternalSystemProxy externalSystemProxy){
+ ThirdpartySdncWrapper.externalSystemProxy = externalSystemProxy;
+ }
public Response registerThirdpartySdnc(ThirdpartySdncRegisterInfo thirdpartySdnc) {
CommonRegisterResponse result = new CommonRegisterResponse();
EsrThirdpartySdncDetail esrSdncDetail = thirdpartySdncManagerUtil.sdncRegisterInfo2EsrSdnc(thirdpartySdnc);
String sdncId = esrSdncDetail.getThirdpartySdncId();
try {
- ExternalSystemProxy.registerSdnc(sdncId, esrSdncDetail);
+ externalSystemProxy.registerSdnc(sdncId, esrSdncDetail);
result.setId(sdncId);
return Response.ok(result).build();
} catch (ExtsysException e) {
@@ -77,7 +82,7 @@ public class ThirdpartySdncWrapper {
esrSdncDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0)
.setResouceVersion(originalEsrSystemInfo.getResouceVersion());
try {
- ExternalSystemProxy.registerSdnc(sdncId, esrSdncDetail);
+ externalSystemProxy.registerSdnc(sdncId, esrSdncDetail);
result.setId(sdncId);
return Response.ok(result).build();
} catch (ExtsysException e) {
@@ -90,7 +95,7 @@ public class ThirdpartySdncWrapper {
List<ThirdpartySdncRegisterInfo> sdncList = new ArrayList<>();
EsrThirdpartySdncList esrSdnc = new EsrThirdpartySdncList();
try {
- String esrSdncStr = ExternalSystemProxy.querySdncList();
+ String esrSdncStr = externalSystemProxy.querySdncList();
esrSdnc = new Gson().fromJson(esrSdncStr, EsrThirdpartySdncList.class);
LOG.info("Response from AAI by query thirdparty SDNC list: " + esrSdnc);
sdncList = getSdncDetailList(esrSdnc);
@@ -109,7 +114,7 @@ public class ThirdpartySdncWrapper {
EsrThirdpartySdncDetail thirdpartySdncDetail = queryEsrThirdpartySdncDetail(thirdpartySdncId);
String resourceVersion = thirdpartySdncDetail.getResourceVersion();
try {
- ExternalSystemProxy.deleteThirdpartySdnc(thirdpartySdncId, resourceVersion);
+ externalSystemProxy.deleteThirdpartySdnc(thirdpartySdncId, resourceVersion);
return Response.noContent().build();
} catch (ExtsysException e) {
LOG.error("Delete VNFM from A&AI failed! thirdparty SDNC ID: " + thirdpartySdncId + "resouce-version:"
@@ -122,7 +127,7 @@ public class ThirdpartySdncWrapper {
ThirdpartySdncRegisterInfo sdncRegisterInfo = new ThirdpartySdncRegisterInfo();
EsrThirdpartySdncDetail esrSdncDetail = new EsrThirdpartySdncDetail();
try {
- String esrSdncStr = ExternalSystemProxy.queryThirdpartySdncDetail(sdncId);
+ String esrSdncStr = externalSystemProxy.queryThirdpartySdncDetail(sdncId);
LOG.info("Response from AAI by query thirdparty SDNC: " + esrSdncStr);
esrSdncDetail = new Gson().fromJson(esrSdncStr, EsrThirdpartySdncDetail.class);
sdncRegisterInfo = thirdpartySdncManagerUtil.esrSdnc2SdncRegisterInfo(esrSdncDetail);
@@ -148,7 +153,7 @@ public class ThirdpartySdncWrapper {
private EsrThirdpartySdncDetail queryEsrThirdpartySdncDetail(String sdncId) {
EsrThirdpartySdncDetail esrSdncDetail = new EsrThirdpartySdncDetail();
try {
- String esrThirdpartySdncStr = ExternalSystemProxy.queryThirdpartySdncDetail(sdncId);
+ String esrThirdpartySdncStr = externalSystemProxy.queryThirdpartySdncDetail(sdncId);
LOG.info("Response from AAI by query thirdparty SDNC: " + esrThirdpartySdncStr);
esrSdncDetail = new Gson().fromJson(esrThirdpartySdncStr, EsrThirdpartySdncDetail.class);
} catch (ExtsysException e) {
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java
index ce80807..bc7e872 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java
@@ -52,10 +52,13 @@ public class VimManagerWrapper {
*/
public static VimManagerWrapper getInstance() {
if (vimManagerWrapper == null) {
- vimManagerWrapper = new VimManagerWrapper();
+ vimManagerWrapper = new VimManagerWrapper(cloudRegionProxy);
}
return vimManagerWrapper;
-
+ }
+
+ public VimManagerWrapper(CloudRegionProxy cloudRegionProxy) {
+ VimManagerWrapper.cloudRegionProxy = cloudRegionProxy;
}
public Response registerVim(VimRegisterInfo vimRegisterInfo) {
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java
index ee28b77..8c7c5d3 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VnfmManagerWrapper.java
@@ -36,6 +36,7 @@ public class VnfmManagerWrapper {
private static final Logger LOG = LoggerFactory.getLogger(VnfmManagerWrapper.class);
private static VnfmManagerUtil vnfmManagerUtil = new VnfmManagerUtil();
+ private static ExternalSystemProxy externalSystemProxy = new ExternalSystemProxy();
/**
* get VnfmManagerWrapper instance.
@@ -44,17 +45,21 @@ public class VnfmManagerWrapper {
*/
public static VnfmManagerWrapper getInstance() {
if (vnfmManagerWrapper == null) {
- vnfmManagerWrapper = new VnfmManagerWrapper();
+ vnfmManagerWrapper = new VnfmManagerWrapper(externalSystemProxy);
}
return vnfmManagerWrapper;
}
+
+ public VnfmManagerWrapper(ExternalSystemProxy externalSystemProxy){
+ VnfmManagerWrapper.externalSystemProxy = externalSystemProxy;
+ }
public Response registerVnfm(VnfmRegisterInfo vnfm) {
CommonRegisterResponse result = new CommonRegisterResponse();
EsrVnfmDetail esrVnfmDetail = vnfmManagerUtil.vnfmRegisterInfo2EsrVnfm(vnfm);
String vnfmId = esrVnfmDetail.getVnfmId();
try {
- ExternalSystemProxy.registerVnfm(vnfmId, esrVnfmDetail);
+ externalSystemProxy.registerVnfm(vnfmId, esrVnfmDetail);
result.setId(vnfmId);
return Response.ok(result).build();
} catch (ExtsysException e) {
@@ -76,7 +81,7 @@ public class VnfmManagerWrapper {
esrVnfmDetail.getEsrSystemInfoList().getEsrSystemInfo().get(0)
.setResouceVersion(originalEsrSystemInfo.getResouceVersion());
try {
- ExternalSystemProxy.registerVnfm(vnfmId, esrVnfmDetail);
+ externalSystemProxy.registerVnfm(vnfmId, esrVnfmDetail);
result.setId(vnfmId);
return Response.ok(result).build();
} catch (ExtsysException e) {
@@ -89,7 +94,7 @@ public class VnfmManagerWrapper {
List<VnfmRegisterInfo> vnfmList = new ArrayList<>();
EsrVnfmList esrVnfm = new EsrVnfmList();
try {
- String esrVnfmStr = ExternalSystemProxy.queryVnfmList();
+ String esrVnfmStr = externalSystemProxy.queryVnfmList();
esrVnfm = new Gson().fromJson(esrVnfmStr, EsrVnfmList.class);
LOG.info("Response from AAI by query VNFM list: " + esrVnfm);
vnfmList = getVnfmDetailList(esrVnfm);
@@ -112,7 +117,7 @@ public class VnfmManagerWrapper {
public Response delVnfm(String vnfmId) {
String resourceVersion = getResourceVersion(vnfmId);
try {
- ExternalSystemProxy.deleteVnfm(vnfmId, resourceVersion);
+ externalSystemProxy.deleteVnfm(vnfmId, resourceVersion);
return Response.noContent().build();
} catch (ExtsysException e) {
LOG.error("Delete VNFM from A&AI failed! VNFM ID: " + vnfmId + "resouce-version:" + resourceVersion, e);
@@ -124,7 +129,7 @@ public class VnfmManagerWrapper {
VnfmRegisterInfo vnfm = new VnfmRegisterInfo();
EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
try {
- String esrVnfmstr = ExternalSystemProxy.queryVnfmDetail(vnfmId);
+ String esrVnfmstr = externalSystemProxy.queryVnfmDetail(vnfmId);
LOG.info("Response from AAI by query VNFM: " + esrVnfmstr);
esrVnfmDetail = new Gson().fromJson(esrVnfmstr, EsrVnfmDetail.class);
vnfm = vnfmManagerUtil.esrVnfm2VnfmRegisterInfo(esrVnfmDetail);
@@ -158,7 +163,7 @@ public class VnfmManagerWrapper {
private EsrVnfmDetail queryEsrVnfmDetail(String vnfmId) {
EsrVnfmDetail esrVnfmDetail = new EsrVnfmDetail();
try {
- String esrVnfmstr = ExternalSystemProxy.queryVnfmDetail(vnfmId);
+ String esrVnfmstr = externalSystemProxy.queryVnfmDetail(vnfmId);
LOG.info("Response from AAI by query VNFM: " + esrVnfmstr);
esrVnfmDetail = new Gson().fromJson(esrVnfmstr, EsrVnfmDetail.class);
} catch (ExtsysException e) {
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java
index 09e6318..da5d27e 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/externalservice/aai/ExternalSystemProxyTest.java
@@ -36,63 +36,63 @@ public class ExternalSystemProxyTest {
@Test(expected = ExtsysException.class)
public void testRegisterVnfm() throws ExtsysException {
EsrVnfmDetail detail = new EsrVnfmDetail();
- ExternalSystemProxy.registerVnfm("vnfm-1", detail);
+ externalSystemProxy.registerVnfm("vnfm-1", detail);
}
@Test(expected = ExtsysException.class)
public void testQueryVnfmDetail() throws ExtsysException {
- ExternalSystemProxy.queryVnfmDetail("vnfm-1");
+ externalSystemProxy.queryVnfmDetail("vnfm-1");
}
@Test(expected = ExtsysException.class)
public void testQueryVnfmList() throws ExtsysException {
- ExternalSystemProxy.queryVnfmList();
+ externalSystemProxy.queryVnfmList();
}
@Test(expected = ExtsysException.class)
public void testDeleteVnfm() throws ExtsysException {
- ExternalSystemProxy.deleteVnfm("vnfm-1", "version-1");
+ externalSystemProxy.deleteVnfm("vnfm-1", "version-1");
}
@Test(expected = ExtsysException.class)
public void testRegisterSdnc() throws ExtsysException {
EsrThirdpartySdncDetail detail = new EsrThirdpartySdncDetail();
- ExternalSystemProxy.registerSdnc("sdnc-1", detail);
+ externalSystemProxy.registerSdnc("sdnc-1", detail);
}
@Test(expected = ExtsysException.class)
public void testQueryThirdpartySdncDetail() throws ExtsysException {
- ExternalSystemProxy.queryThirdpartySdncDetail("sdnc-1");
+ externalSystemProxy.queryThirdpartySdncDetail("sdnc-1");
}
@Test(expected = ExtsysException.class)
public void testQuerySdncList() throws ExtsysException {
- ExternalSystemProxy.querySdncList();
+ externalSystemProxy.querySdncList();
}
@Test(expected = ExtsysException.class)
public void testDeleteThirdpartySdnc() throws ExtsysException {
- ExternalSystemProxy.deleteThirdpartySdnc("sdnc-1", "version-1");
+ externalSystemProxy.deleteThirdpartySdnc("sdnc-1", "version-1");
}
@Test(expected = ExtsysException.class)
public void testRegisterEms() throws ExtsysException {
EsrEmsDetail detail = new EsrEmsDetail();
- ExternalSystemProxy.registerEms("ems-1", detail);
+ externalSystemProxy.registerEms("ems-1", detail);
}
@Test(expected = ExtsysException.class)
public void testQueryEmsDetail() throws ExtsysException {
- ExternalSystemProxy.queryEmsDetail("ems-1");
+ externalSystemProxy.queryEmsDetail("ems-1");
}
@Test(expected = ExtsysException.class)
public void testQueryEmsList() throws ExtsysException {
- ExternalSystemProxy.queryEmsList();
+ externalSystemProxy.queryEmsList();
}
@Test(expected = ExtsysException.class)
public void testDeleteEms() throws ExtsysException {
- ExternalSystemProxy.deleteEms("ems-1", "version-1");
+ externalSystemProxy.deleteEms("ems-1", "version-1");
}
}