Code Review
/
holmes
/
common.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed the Request Path for AAI Queries
[holmes/common.git]
/
holmes-actions
/
src
/
main
/
java
/
org
/
onap
/
holmes
/
common
/
aai
/
AaiQuery.java
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
2a8d3e9
..
683836e
100644
(file)
--- 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
@@
-60,13
+60,7
@@
public class AaiQuery {
private String getVmUrl(String vserverId, String vserverName) throws CorrelationException {
String url = "";
String resourceLinkUrl = getVmResourceLinks(vserverId, vserverName);
private String getVmUrl(String vserverId, String vserverName) throws CorrelationException {
String url = "";
String resourceLinkUrl = getVmResourceLinks(vserverId, vserverName);
- String baseUrl = getBaseUrl("");
- if (baseUrl.startsWith("http")) {
- url = baseUrl + getMsbSuffixAddr(resourceLinkUrl);
- } else {
- url = baseUrl + resourceLinkUrl;
- }
- return url;
+ return getBaseUrl("") + resourceLinkUrl;
}
private String getVmResourceLinks(String vserverId, String vserverName) throws CorrelationException {
}
private String getVmResourceLinks(String vserverId, String vserverName) throws CorrelationException {
@@
-79,20
+73,20
@@
public class AaiQuery {
}
private String getResourceLinksResponse(String vserverId, String vserverName) throws CorrelationException {
}
private String getResourceLinksResponse(String vserverId, String vserverName) throws CorrelationException {
- String url = getBaseUrl(
getMsbSuffixAddr(AaiConfig.AaiConsts.AAI_VM_ADDR)
+ "vserver-id:EQUALS:" + vserverId);
+ String url = getBaseUrl(
AaiConfig.AaiConsts.AAI_VM_ADDR
+ "vserver-id:EQUALS:" + vserverId);
String response = getResponse(url);
if ("".equals(response) || "{}".equals(response)) {
String response = getResponse(url);
if ("".equals(response) || "{}".equals(response)) {
- url = getBaseUrl(
getMsbSuffixAddr(AaiConfig.AaiConsts.AAI_VM_ADDR)
+ "vserver-name:EQUALS:" + vserverName);
+ url = getBaseUrl(
AaiConfig.AaiConsts.AAI_VM_ADDR
+ "vserver-name:EQUALS:" + vserverName);
response = getResponse(url);
}
return response;
}
private String getVnfDataResponse(String vnfId, String vnfName) throws CorrelationException {
response = getResponse(url);
}
return response;
}
private String getVnfDataResponse(String vnfId, String vnfName) throws CorrelationException {
- String url = getBaseUrl(
getMsbSuffixAddr(AaiConfig.AaiConsts.AAI_VNF_ADDR)
+ "/" + vnfId);
+ String url = getBaseUrl(
AaiConfig.AaiConsts.AAI_VNF_ADDR
+ "/" + vnfId);
String response = getResponse(url);
if ("".equals(response) || "{}".equals(response)) {
String response = getResponse(url);
if ("".equals(response) || "{}".equals(response)) {
- url = getBaseUrl(
getMsbSuffixAddr(AaiConfig.AaiConsts.AAI_VNF_ADDR) + "
vnf-name=" + vnfName);
+ url = getBaseUrl(
AaiConfig.AaiConsts.AAI_VNF_ADDR + "?
vnf-name=" + vnfName);
response = getResponse(url);
}
return response;
response = getResponse(url);
}
return response;