summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery.java16
-rw-r--r--holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java4
-rw-r--r--pom.xml2
-rw-r--r--version.properties2
4 files changed, 9 insertions, 15 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 2a8d3e9..683836e 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
@@ -60,13 +60,7 @@ public class AaiQuery {
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 {
@@ -79,20 +73,20 @@ public class AaiQuery {
}
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)) {
- 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 {
- 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)) {
- 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;
diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java
index 11dba54..c3407e6 100644
--- a/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java
+++ b/holmes-actions/src/test/java/org/onap/holmes/common/aai/AaiQueryTest.java
@@ -97,7 +97,7 @@ public class AaiQueryTest {
headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
- String url = "http://10.96.33.33:80/api/aai-cloudInfrastructure/v11";
+ String url = "http://10.96.33.33:80/aai/v11/cloud-infrastructure";
HttpResponse httpResponse = PowerMock.createMock(HttpResponse.class);
CloseableHttpClient httpClient = PowerMock.createMock(CloseableHttpClient.class);
when(HttpsUtils.getHttpClient(30000)).thenReturn(httpClient);
@@ -136,7 +136,7 @@ public class AaiQueryTest {
headers.put("X-FromAppId", AaiConfig.X_FROMAPP_ID);
headers.put("Authorization", AaiConfig.getAuthenticationCredentials());
headers.put("Accept", "application/json");
- String url = "http://10.96.33.33:80/api/aai-cloudInfrastructure/v11";
+ String url = "http://10.96.33.33:80/aai/v11/cloud-infrastructure";
CloseableHttpClient httpClient = PowerMock.createMock(CloseableHttpClient.class);
when(HttpsUtils.getHttpClient(30000)).thenReturn(httpClient);
HttpGet httpGet = new HttpGet(url);
diff --git a/pom.xml b/pom.xml
index d3f45be..1fb0532 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
<artifactId>holmes-common-parent</artifactId>
<packaging>pom</packaging>
- <version>1.2.3</version>
+ <version>1.2.4</version>
<name>holmes-common</name>
<modules>
<module>holmes-actions</module>
diff --git a/version.properties b/version.properties
index 08d323a..550f852 100644
--- a/version.properties
+++ b/version.properties
@@ -4,7 +4,7 @@
major=1
minor=2
-patch=3
+patch=4
base_version=${major}.${minor}.${patch}