diff options
author | Toine Siebelink <toine.siebelink@est.tech> | 2023-06-29 13:49:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2023-06-29 13:49:21 +0000 |
commit | 9965f958530e0341b109a7df20c88103bdd83862 (patch) | |
tree | cbf77526ad878ec4a6cda4de5724e8a41e1a75a7 /cps-service | |
parent | d4c0b1447ec73ae98df4644cc0f68056e35074e3 (diff) | |
parent | e3eb74579dddeb1a96c52bbf7b96e00d0e7198a9 (diff) |
Merge "Normalize parent xpath when building datanodes in CpsDataService"
Diffstat (limited to 'cps-service')
-rwxr-xr-x | cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java index 99cda229db..0a7afc8f64 100755 --- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java +++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java @@ -39,6 +39,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.onap.cps.api.CpsAdminService; import org.onap.cps.api.CpsDataService; +import org.onap.cps.cpspath.parser.CpsPathUtil; import org.onap.cps.notification.NotificationService; import org.onap.cps.notification.Operation; import org.onap.cps.spi.CpsDataPersistenceService; @@ -354,10 +355,11 @@ public class CpsDataServiceImpl implements CpsDataService { } return dataNodes; } + final String normalizedParentNodeXpath = CpsPathUtil.getNormalizedXpath(parentNodeXpath); final ContainerNode containerNode = - timedYangParser.parseData(contentType, nodeData, schemaContext, parentNodeXpath); + timedYangParser.parseData(contentType, nodeData, schemaContext, normalizedParentNodeXpath); final Collection<DataNode> dataNodes = new DataNodeBuilder() - .withParentNodeXpath(parentNodeXpath) + .withParentNodeXpath(normalizedParentNodeXpath) .withContainerNode(containerNode) .buildCollection(); if (dataNodes.isEmpty()) { |