Change order of CM Handle Reference lookup depending on special character 98/140298/2
authorseanbeirne <sean.beirne@est.tech>
Thu, 20 Feb 2025 11:16:11 +0000 (11:16 +0000)
committerseanbeirne <sean.beirne@est.tech>
Thu, 27 Feb 2025 11:35:18 +0000 (11:35 +0000)
commitb3dfa9ba4771b3d98bbfbdb870b8ed063d4dd2ce
treed5981045a29094f191164797b6a0d1f243c7b851
parent138cae7d9d060c0f194eccb213fa2aa4cbac7105
Change order of CM Handle Reference lookup depending on special character

- implemented new algorithm using validator to rule out standard id / prefer alternate id
- moved validator imp to cps-service (not in RI) TBC!!!
- changed order of characters tested in validator to fail fast (on '=')
- added Boolean variation validator method to reduce overhead and prevent logic based on exceptions
- improved integration test to cover all scenarios
- add performance test for alternate id look up (report only)
- ensured all performance test use alternate ids it '='
- added small groovy tests to restore cps-ri code coverage to 0.31

Issue-ID: CPS-2605
Change-Id: Id9c22bb69904b7f5d376b7f8319332428435333e
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Signed-off-by: seanbeirne <sean.beirne@est.tech>
12 files changed:
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/DmiDataOperations.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/utils/AlternateIdMatcher.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/data/DmiDataOperationsSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/utils/AlternateIdMatcherSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/ri/CpsModulePersistenceServiceImplSpec.groovy
cps-service/src/main/java/org/onap/cps/utils/CpsValidator.java
cps-service/src/main/java/org/onap/cps/utils/CpsValidatorImpl.java [moved from cps-ri/src/main/java/org/onap/cps/ri/utils/CpsValidatorImpl.java with 81% similarity]
cps-service/src/test/groovy/org/onap/cps/utils/CpsValidatorImplSpec.groovy [moved from cps-ri/src/test/groovy/org/onap/cps/ri/utils/CpsValidatorImplSpec.groovy with 76% similarity]
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/AlternateIdSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/AlternateIdPerfTest.groovy [new file with mode: 0644]
integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryPerfTest.groovy