summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main
diff options
context:
space:
mode:
authormpriyank <priyank.maheshwari@est.tech>2024-02-12 16:16:36 +0000
committermpriyank <priyank.maheshwari@est.tech>2024-02-12 17:41:14 +0000
commit33ffcd9a60f464ca2c4a55f9aac0cb35d7aeaa88 (patch)
treeb81b539e6335340f690207b571fe7a3f6ace22ce /cps-ncmp-service/src/main
parent1302ce8ecc2772d258bdd10f32af23e7e9861880 (diff)
Update cm-data-subscriptions model
- rename leaf-list subscribers to subscriptionIds - code using the same also updated - not creating a new version of model as nobody is using it at the moment Issue-ID: CPS-2088 Change-Id: I43d679047bdfc665b56f262757acc4bbaba2733f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/main')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionPersistenceServiceImpl.java5
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java2
-rw-r--r--cps-ncmp-service/src/main/resources/models/cm-data-subscriptions@2024-02-12.yang (renamed from cps-ncmp-service/src/main/resources/models/cm-data-subscriptions@2023-11-13.yang)4
3 files changed, 6 insertions, 5 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionPersistenceServiceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionPersistenceServiceImpl.java
index ca9adb36b2..63f12ad623 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionPersistenceServiceImpl.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionPersistenceServiceImpl.java
@@ -37,7 +37,8 @@ import org.springframework.stereotype.Service;
public class CmNotificationSubscriptionPersistenceServiceImpl implements CmNotificationSubscriptionPersistenceService {
private static final String IS_ONGOING_CM_SUBSCRIPTION_CPS_PATH_QUERY = """
- /datastores/datastore[@name='%s']/cm-handles/cm-handle[@id='%s']/filters/filter[@xpath='%s']""";
+ /datastores/datastore[@name='%s']/cm-handles/cm-handle[@id='%s']/filters/filter[@xpath='%s']
+ """.trim();
private final CpsQueryService cpsQueryService;
@@ -60,7 +61,7 @@ public class CmNotificationSubscriptionPersistenceServiceImpl implements CmNotif
if (existingNodes.isEmpty()) {
return Collections.emptyList();
}
- return (List<String>) existingNodes.iterator().next().getLeaves().get("subscribers");
+ return (List<String>) existingNodes.iterator().next().getLeaves().get("subscriptionIds");
}
private static String escapeQuotesByDoublingThem(final String inputXpath) {
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
index c0b1f34d49..7cee87a2a0 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
@@ -39,7 +39,7 @@ import org.springframework.stereotype.Service;
@Service
public class CmDataSubscriptionModelLoader extends AbstractModelLoader {
- private static final String MODEL_FILENAME = "cm-data-subscriptions@2023-11-13.yang";
+ private static final String MODEL_FILENAME = "cm-data-subscriptions@2024-02-12.yang";
private static final String SCHEMASET_NAME = "cm-data-subscriptions";
private static final String ANCHOR_NAME = "cm-data-subscriptions";
private static final String REGISTRY_DATANODE_NAME = "datastores";
diff --git a/cps-ncmp-service/src/main/resources/models/cm-data-subscriptions@2023-11-13.yang b/cps-ncmp-service/src/main/resources/models/cm-data-subscriptions@2024-02-12.yang
index de675b117c..e9d9658eb1 100644
--- a/cps-ncmp-service/src/main/resources/models/cm-data-subscriptions@2023-11-13.yang
+++ b/cps-ncmp-service/src/main/resources/models/cm-data-subscriptions@2024-02-12.yang
@@ -4,7 +4,7 @@ module cm-data-subscriptions {
prefix cmds;
- revision "2023-11-13" {
+ revision "2024-02-12" {
description
"First release of cm data (notification) subscriptions model";
}
@@ -36,7 +36,7 @@ module cm-data-subscriptions {
type string;
}
- leaf-list subscribers {
+ leaf-list subscriptionIds {
type string;
}