diff options
author | 2023-03-31 10:39:46 +0530 | |
---|---|---|
committer | 2023-03-31 10:39:46 +0530 | |
commit | 4647e3ef6c87e271794e06fb1660cad5ee72ab04 (patch) | |
tree | cfd7b52595ea2f0f500648b26293893fa4adaa76 /graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client | |
parent | dbbde62a1ee7a1f46bd9ccdf1d2c46fc90779dff (diff) |
Code changes in SO api-handler for RAN Slice
Issue-ID: SO-4038
Change-Id: Ifad4e0a65dc810a753d30741a84c08081bcfd258
Signed-off-by: Patil <Abhishek.Patil@t-systems.com>
Diffstat (limited to 'graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client')
-rw-r--r-- | graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java | 12 |
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) { |