filter a&ai query to discard relationship list 35/115335/2
authorPATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com>
Tue, 24 Nov 2020 21:32:15 +0000 (16:32 -0500)
committerSAUMYA PATTANAYAK <sp931a@att.com>
Wed, 25 Nov 2020 20:01:52 +0000 (20:01 +0000)
Issue-ID: VID-924
Change-Id: I1bb8bad294f5a5fcceb80f05177e50ad7d14e40d
Signed-off-by: PATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com>
vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java

index e25fa85..00137b6 100644 (file)
@@ -546,7 +546,11 @@ public class AaiClient implements AaiClientInterface {
     public AaiResponse<Services> getSubscriberData(String subscriberId, boolean omitServiceInstances) {
         String depth = omitServiceInstances ? "1" : "2";
         AaiResponse<Services> subscriberDataResponse;
-        Response resp = doAaiGet(BUSINESS_CUSTOMERS_CUSTOMER + subscriberId + "?depth=" + depth, false);
+       String query = depth.equals("1") ?
+                BUSINESS_CUSTOMERS_CUSTOMER + subscriberId + "?depth=" + depth :
+                BUSINESS_CUSTOMERS_CUSTOMER + subscriberId + "?depth=" + depth +"&nodes-only";
+                               
+        Response resp = doAaiGet(query, false);
         subscriberDataResponse = processAaiResponse(resp, Services.class, null);
         return subscriberDataResponse;
     }