aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/aai
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2019-06-25 11:42:46 +0200
committerWojciech Sliwka <wojciech.sliwka@nokia.com>2019-07-01 09:24:34 +0200
commit4751c29632d2f32abba85dd91296fb91672a2f59 (patch)
tree970fcde9591168089bda86ee2a5453c5eb693f03 /vid-app-common/src/main/java/org/onap/vid/aai
parent72b3fb69e548cf665204ec025d2778dcf3ce0216 (diff)
Extend probe mechanism
Fixes from latest review. Introduce probe interface. ResponseWithRequestInfo is not used - it belongs to aai package and requires javax.ws.rs.core.Response. Fallback in aai client will be removed as soon as sdc provides https support (hopefully in El Alto). Change-Id: I4527d447a273328d38ff2ef7f9d2a93453cec9f2 Issue-ID: VID-490 Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/aai')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java7
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClient.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClientInterface.java7
4 files changed, 6 insertions, 12 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java
index 1710d984f..7b78f0712 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java
@@ -744,7 +744,7 @@ public class AaiClient implements AaiClientInterface {
}
@Override
- public ExternalComponentStatus probeAaiGetAllSubscribers(){
+ public ExternalComponentStatus probeComponent(){
long startTime = System.currentTimeMillis();
try {
AaiResponseWithRequestInfo<SubscriberList> responseWithRequestInfo = getAllSubscribers(true);
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java
index 43be049a6..3f914649d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java
@@ -31,13 +31,12 @@ import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse;
import org.onap.vid.aai.model.PortDetailsTranslator;
import org.onap.vid.aai.model.Properties;
import org.onap.vid.aai.model.ResourceType;
+import org.onap.vid.controller.ProbeInterface;
import org.onap.vid.model.SubscriberList;
-import org.onap.vid.model.probes.ExternalComponentStatus;
-
/**
* Created by Oren on 7/4/17.
*/
-public interface AaiClientInterface {
+public interface AaiClientInterface extends ProbeInterface {
boolean isNodeTypeExistsByName(String name, ResourceType type);
@@ -87,8 +86,6 @@ public interface AaiClientInterface {
AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId);
- ExternalComponentStatus probeAaiGetAllSubscribers();
-
Response doAaiGet(String uri, boolean xml);
String getCloudOwnerByCloudRegionId(String cloudRegionId);
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClient.java
index 46bb6cef4..6dc7b6860 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClient.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClient.java
@@ -98,7 +98,7 @@ public class AaiOverTLSClient implements AaiOverTLSClientInterface {
}
@Override
- public ExternalComponentStatus probeGetAllSubscribers() {
+ public ExternalComponentStatus probeComponent() {
String url = urlBase + String.format(URIS.SUBSCRIBERS, 0);
long startTime = System.currentTimeMillis();
ExternalComponentStatus externalComponentStatus;
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClientInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClientInterface.java
index c430b098e..4cc95890d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClientInterface.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiOverTLSClientInterface.java
@@ -23,10 +23,10 @@ package org.onap.vid.aai;
import io.joshworks.restclient.http.HttpResponse;
import org.onap.portalsdk.core.util.SystemProperties;
import org.onap.vid.aai.model.ResourceType;
+import org.onap.vid.controller.ProbeInterface;
import org.onap.vid.model.SubscriberList;
-import org.onap.vid.model.probes.ExternalComponentStatus;
-public interface AaiOverTLSClientInterface {
+public interface AaiOverTLSClientInterface extends ProbeInterface {
class URIS {
@@ -48,7 +48,4 @@ public interface AaiOverTLSClientInterface {
HttpResponse<SubscriberList> getAllSubscribers();
-
- ExternalComponentStatus probeGetAllSubscribers();
-
}