summaryrefslogtreecommitdiffstats
path: root/graph-inventory
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-04-12 08:05:16 +0000
committerGerrit Code Review <gerrit@onap.org>2023-04-12 08:05:16 +0000
commit53448a95871868d5009958ede72e724bc80c0961 (patch)
tree92a1bbe0b2127521f608131c05b017fd5e83a996 /graph-inventory
parentc41c04b7b53bce7354d8cd1d47db3144e267a599 (diff)
parent4647e3ef6c87e271794e06fb1660cad5ee72ab04 (diff)
Merge "Code changes in SO api-handler for RAN Slice"
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) {