summaryrefslogtreecommitdiffstats
path: root/graph-inventory
diff options
context:
space:
mode:
Diffstat (limited to 'graph-inventory')
-rw-r--r--graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java
index bf9ad56da7..03260dbfae 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java
@@ -36,6 +36,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
import org.onap.aaiclient.client.graphinventory.Format;
+import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -114,6 +115,17 @@ public class AAIRestClientImpl implements AAIRestClientI {
return Optional.ofNullable(response.readEntity(ServiceInstance.class));
}
+ public Optional<ServiceInstance> getServiceInstanceByIdWithDepth(String serviceInstanceId, String serviceType,
+ String globalSubscriberId) {
+ Response response =
+ new AAIResourcesClient()
+ .getFullResponse(AAIUriFactory
+ .createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId)
+ .serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
+ .depth(Depth.ALL));
+ return Optional.ofNullable(response.readEntity(ServiceInstance.class));
+ }
+
@Override
public void updateServiceInstance(String serviceInstanceId, String serviceType, String globalSubscriberId,
ServiceInstance serviceInstance) {