Update AAI Assistant Tools for CCVPN Extenstion 21/85421/1
authorRama-Huawei <rama.subba.reddy.s@huawei.com>
Tue, 16 Apr 2019 06:49:33 +0000 (12:19 +0530)
committerRama-Huawei <rama.subba.reddy.s@huawei.com>
Tue, 16 Apr 2019 06:49:33 +0000 (12:19 +0530)
When there are no site-resource is configured
then vnfid is null

Issue-ID: HOLMES-194

Change-Id: I275ab60b20ca2ea0fe1ced9ce2b9ef0f99875c15
Signed-off-by: Rama-Huawei <rama.subba.reddy.s@huawei.com>
holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2.java

index 9b13b8e..d025fea 100644 (file)
@@ -96,6 +96,9 @@ public class AaiQuery4Ccvpn2 {
 
     public JSONObject getSiteServiceInstance(String siteService) throws CorrelationException {
         String vnfId = getSiteVNFId(siteService);
+        if (vnfId == null) {
+            return null;
+        }
         JSONObject serviceInstanceInfo = getServiceInstanceByVnfId(vnfId);
         String serviceInstancePath = serviceInstanceInfo.getString("related-link");
         Response response = get(getHostAddr(), getPath(serviceInstancePath));