diff options
author | 2017-09-27 17:03:16 +0800 | |
---|---|---|
committer | 2017-09-27 17:03:16 +0800 | |
commit | 43e1dfbcdb2a84d5e69a8b038f76fa626718e5d7 (patch) | |
tree | 245744d43d620b89dcc14cd5db0746357bf013b7 /holmes-actions/src/main | |
parent | c9ed775685b01f5622618216748eeac3000285c4 (diff) |
modify unit test and aai bug
Issue-ID: HOLMES-44
Change-Id: I83b7d90eb25289326a76613ea160442ed3bdd1e1
Signed-off-by: Shiwei Tian <tian.shiwei@zte.com.cn>
Diffstat (limited to 'holmes-actions/src/main')
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery.java index aa840ba..074c509 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery.java @@ -76,7 +76,7 @@ public class AaiQuery { private String getResourceLinksResponse(String vserverId, String vserverName) throws CorrelationException { String url = getBaseUrl(getMsbSuffixAddr(AaiConfig.AAI_VNF_ADDR) + "vserver-id:EQUALS:" + vserverId); String response = getResponse(url); - if (response.equals("")) { + if ("".equals(response) || "{}".equals(response)) { url = getBaseUrl(AaiConfig.AAI_VM_ADDR + "vserver-name:EQUALS:" + vserverName); response = getResponse(url); } @@ -86,7 +86,7 @@ public class AaiQuery { private String getVnfDataResponse(String vnfId, String vnfName) throws CorrelationException { String url = getBaseUrl(getMsbSuffixAddr(AaiConfig.AAI_VM_ADDR)+ "vnf-id=" + vnfId); String response = getResponse(url); - if (response.equals("")) { + if ("".equals(response) || "{}".equals(response)) { url = getBaseUrl(AaiConfig.AAI_VNF_ADDR + "vnf-name=" + vnfName); response = getResponse(url); } |