Clear instance based Schema Context Cache upon validation errors 24/137024/3
authorToineSiebelink <toine.siebelink@est.tech>
Tue, 16 Jan 2024 08:40:51 +0000 (08:40 +0000)
committerToineSiebelink <toine.siebelink@est.tech>
Wed, 17 Jan 2024 14:56:53 +0000 (14:56 +0000)
commit6229cfeafade160ed281fc410454c7498b8a21dc
tree714247ebb871c00fce2b60fd5f0dcbdcebf1a233
parent2dce7ab2fd627450550666e3993e28e10f6a8548
Clear instance based Schema Context Cache upon validation errors

- retry yang parser exceptions one time by clearing cache
- split yangUtils into YangParserHelper (instance based) and YangUtils for non-parsering static methods
- removed public methods only used from test. Refactored to use variation with (empty) parent path
- removed use of optional for parentPath, easier to handle with just an empty string!
- make methods no longer used in production code in YangUtils are private
- udpate testware to use proper public methods instead of private methods of yang utils / parser (helper)

Issue-ID:CPS-2000

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I0c7590a5e1495d047006e7136f1bd873be37f7b0
16 files changed:
cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java
cps-service/src/main/java/org/onap/cps/utils/TimedYangParser.java [deleted file]
cps-service/src/main/java/org/onap/cps/utils/XmlFileUtils.java
cps-service/src/main/java/org/onap/cps/utils/YangParser.java [new file with mode: 0644]
cps-service/src/main/java/org/onap/cps/utils/YangParserHelper.java [new file with mode: 0644]
cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy
cps-service/src/test/groovy/org/onap/cps/api/impl/E2ENetworkSliceSpec.groovy
cps-service/src/test/groovy/org/onap/cps/spi/model/DataNodeBuilderSpec.groovy
cps-service/src/test/groovy/org/onap/cps/utils/GsonSpec.groovy
cps-service/src/test/groovy/org/onap/cps/utils/XmlFileUtilsSpec.groovy
cps-service/src/test/groovy/org/onap/cps/utils/YangParserHelperSpec.groovy [new file with mode: 0644]
cps-service/src/test/groovy/org/onap/cps/utils/YangParserSpec.groovy [new file with mode: 0644]
cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/base/TestConfig.groovy