summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRama-Huawei <rama.subba.reddy.s@huawei.com>2019-05-16 14:11:38 +0530
committerRama-Huawei <rama.subba.reddy.s@huawei.com>2019-05-16 14:15:03 +0530
commit8aa19f8f7ea63044ffb9837e2aa21a6914c64fbc (patch)
tree1d802ef85eb1af4dcf32edecdda4869046c67396
parent02ca90c5c95e234e5331cd6643467b0492d49f0c (diff)
Update AAI Assistant Tools for CCVPN Extenstion
Fix for Dublin integration test issues Issue-ID: HOLMES-194 Change-Id: I496a9899cff498977dd2e72db87affa495336ad2 Signed-off-by: Rama-Huawei <rama.subba.reddy.s@huawei.com>
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2.java8
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java2
-rw-r--r--holmes-actions/src/test/resources/ccvpn2.data.json4
3 files changed, 6 insertions, 8 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2.java
index d025fea..aff064b 100644
--- a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2.java
+++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn2.java
@@ -68,16 +68,14 @@ public class AaiQuery4Ccvpn2 {
for (int i = 0; i < siteResources.size(); i++) {
final JSONObject object = siteResources.getJSONObject(i);
if (siteService.equals(object.getString("site-resource-name"))) {
- JSONObject vnfInfo = getInfo(object.toJSONString(), "vnf-instance");
+ JSONObject vnfInfo = getInfo(object.toJSONString(), "generic-vnf");
String vnfPath = vnfInfo.getString("related-link");
String vnfId = null;
- Pattern pattern = Pattern.compile("/aai/v\\d+/business/customers/customer/(.+)" +
- "/service-subscriptions/service-subscription/(.+)" +
- "/vnf-instances/vnf-instance/(.+)");
+ Pattern pattern = Pattern.compile("/aai/v\\d+/network/generic-vnfs/generic-vnf/(.+)");
Matcher matcher = pattern.matcher(vnfPath);
if (matcher.find()) {
- vnfId = matcher.group(3);
+ vnfId = matcher.group(1);
}
return vnfId;
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java
index 8d86900..4879e33 100644
--- a/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java
+++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java
@@ -15,7 +15,7 @@ package org.onap.holmes.common.aai.config;
public class AaiConfig {
- private static final String AAI_API_VERSION = "v14";
+ private static final String AAI_API_VERSION = "v16";
public static final String X_TRANSACTION_ID = "9999";
diff --git a/holmes-actions/src/test/resources/ccvpn2.data.json b/holmes-actions/src/test/resources/ccvpn2.data.json
index 7739893..5b71553 100644
--- a/holmes-actions/src/test/resources/ccvpn2.data.json
+++ b/holmes-actions/src/test/resources/ccvpn2.data.json
@@ -22,9 +22,9 @@
}
},
{
- "related-to": "vnf-instance",
+ "related-to": "generic-vnf",
"relationship-label": "org.onap.relationships.inventory.PartOf",
- "related-link": "/aai/v14/business/customers/customer/ONSDEMOBJHKCustomer/service-subscriptions/service-subscription/service-ccvpn/vnf-instances/vnf-instance/499hkg9933NNN",
+ "related-link": "/aai/v14/network/generic-vnfs/generic-vnf/499hkg9933NNN",
"relationship-data": [
{
"relationship-key": "customer.global-customer-id",