aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
AgeCommit message (Collapse)AuthorFilesLines
2024-11-29Bump CPS to 3.5.6-SNAPSHOTegernug1-1/+1
Issue-ID: CPS-2488 Change-Id: Ib17e4283de959ec4aab3c68bb3ba8018a10a10b2 Signed-off-by: egernug <gerard.nugent@est.tech>
2024-11-27Merge "Catch data validation exception in dmi data operation"Daniel Hanrahan2-7/+12
2024-11-25Catch data validation exception in dmi data operationseanbeirne2-7/+12
Issue-ID: CPS-2510 Change-Id: I4093459c824c202dc8dec4b869e338d4b80fbac8 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-11-25Registration Optimization remaining Code CommentsToineSiebelink3-6/+3
Issue-ID: CPS-2478 Change-Id: I0aa3804225f053ff99176056fe71322a23cff31c Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-11-21Merge "Prioritize cm handle ids over alternate ids in data operations"Daniel Hanrahan5-8/+43
2024-11-21Prioritize cm handle ids over alternate ids in data operationsToineSiebelink5-8/+43
Issue-ID: CPS-2510 Change-Id: I7068d0de45cc2c2e5d8815f0e78c260369f3551e Signed-off-by: seanbeirne <sean.beirne@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-11-21[BUG] Fix for module endpoints using alternate IDdanielhanrahan1-7/+21
The endpoints for fetching modules and module definitions previously returned empty result if a CM handle was not found or not ready. Recent changes for alternate ID have changed the behaviour so it returns an error instead. This restores original behaviour by swallowing the exception. Change-Id: I63091d04d171e6f4ac6ad1c44b359b9a0c4b8f65 Issue-ID: CPS-2509 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
2024-11-20Update error response for ncmp endpointsseanbeirne12-29/+68
Issue-ID: CPS-2386 Change-Id: I0d1f09cff202e055be255b365fc2271a5ee43b37 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-11-20Revert "Update error response for ncmp endpoints"ToineSiebelink10-64/+25
This reverts commit 7e6fee9321e4f13cc4a0d81f83fc3693309cb5d7. Reason for revert: This patch is causing blocking issues at ESH see CPS-2509 Issue-ID: CPS-2509 Change-Id: Ie1bd26ccca4abcac09faf35e2b97491dab32b14d Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-11-19Merge "Test to highlight ModuleSetTag Inefficiencies"Sourabh Sourabh9-26/+175
2024-11-18Update error response for ncmp endpointsseanbeirne10-25/+64
Issue-ID: CPS-2386 Change-Id: Ib4f37858f5f107e350a13e4bf7ed93493864ce60 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-11-18Test to highlight ModuleSetTag InefficienciesToineSiebelink9-26/+175
- Add (micrometer) instrumentation to expose inefficiencies - Add test config for micrometer - Add setup methods in base to create many cm handles - Set module sync parallelism to 2 for testing - Add clean up methods for hazelcast related tests - added test to show inefficiencies - POC 1 use hazelcast set to prevent multiple threads working on same ModuleSetTag - POC 2 'cache' module set tags per thread to prevent DB looks ups - Main inefficiency left: create schemaset for EACH cm Handled even if same tag. No easy PoC... Change-Id: Idf46b44c475a24727dd7084bb613459f4c29be55 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-11-15Merge "Support alternate Id interface for ncmp inventory /ch/cmhandles endpoint"Priyank Maheshwari13-80/+108
2024-11-13Merge "Hashmark support in 3gpp objects"Toine Siebelink2-7/+12
2024-11-13Support alternate Id interface for ncmp inventory /ch/cmhandles endpointseanbeirne13-80/+108
Issue-ID: CPS-2481 Change-Id: I8a200495be1afb9a4f256127f886bed78c77f653 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-11-12Hashmark support in 3gpp objectsegernug2-7/+12
NCMP should cut off the part after the # of an alternateid and use only the first part in CPS match check, but send the complete request to the DMI plugin. Issue-ID: CPS-2485 Change-Id: Icc1442f2be9545036619043692c3559ffadecb0d Signed-off-by: egernug <gerard.nugent@est.tech>
2024-11-11Merge "Support Alternate-Id for CPS-E05 data batch interface"Priyank Maheshwari12-56/+130
2024-11-07Merge "Cm Avc Event to have same key"Toine Siebelink2-7/+12
2024-11-07Merge "Removing ONAP O-Parent as parent from CPS"Toine Siebelink1-1/+1
2024-11-06Merge "Change the dmi address source from dmi-service-name to ↵Sourabh Sourabh2-10/+28
dmi-data-service-name for writeDataJob"
2024-11-05Change the dmi address source from dmi-service-name to dmi-data-service-name ↵egernug2-10/+28
for writeDataJob -Change implementation to convert datanode to yang model -Change to resolve service name consistent with other implementations Issue-ID: CPS-2455 Change-Id: I9cbe494b8c37eb963c42abee1ac5f04a3f695d07 Signed-off-by: egernug <gerard.nugent@est.tech>
2024-11-05Support Alternate-Id for CPS-E05 data batch interfaceseanbeirne12-56/+130
Issue-ID: CPS-2274 Change-Id: I75163bc7943fca5cbbe8c24601a2dfc184a9e6cc Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-11-05Removing ONAP O-Parent as parent from CPSsourabh_sourabh1-1/+1
- Fixed checkstyle and license validation. - Updated checkstyle configuration (`onap-java-style.xml` and `check-license.xml`) to ensure compatibility with Maven Checkstyle Plugin version 3.3.1 - Removed obsolete properties causing build failures. - Improved code style rules to meet ONAP Java guidelines. - Vulnerabilities scan are now configured on parent pom.xml - Fixed all code style. Issue-ID: CPS-2470 Change-Id: I1e72af604415aa7587cbe1dff471ed0323e29aa3 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-11-04Refactor module synch taskhalil.cakal1-26/+29
- improve readablity of ModuleSyncTasks Issue-ID: CPS-2474 Change-Id: Ib0342e8fad00b431a293c5095fe54f4917f7a51b Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-11-04Cm Avc Event to have same keympriyank2-7/+12
- incoming Cm Avc Event from DMI Plugin is consumed and forwarded to target topic - the key from source topic to be used in the target topic while forwarding - with same key the ordering of the message will be preserved - NOTE: the RTD related changes will be a separate patchset Issue-ID: CPS-2436 Change-Id: Ie692663706b378022ec0d621d92ca5054bad8d1b Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-11-04[Module Sync] Always update states at end of batchdanielhanrahan1-5/+5
This commit moves the state update code into the 'finally' block, so that state updates are always sent for the handles that finished syncing, even if an exception occurred. This commit also fixes a typo in cmHandleStatePerCmHandle. Issue-ID: CPS-2474 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ic25608a5772c0873fe0d0f8aca8d70bcda51d94a
2024-11-01[Module Sync] Log state changes after persistencedanielhanrahan7-153/+151
Currently, module sync will output messages such as: "cm-handle-1 is now in READY state" before the state change is persisted to the DB. If an exception occurs, the new state may not be persisted, which makes debugging hard due to misleading log entries. This commit moves the logging to the LCM state handler immediately after the change is persisted. - Move logging of state changes to LcmEventsCmHandleStateHandler. - Remove unused code in LcmEventsCmHandleStateHandler. - Add tests of state change logging. - Update the main test showing the bug to instead show expected behaviour, but disable test for now using @Ignore. Issue-ID: CPS-2474 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I58646af6df95e07e69ca525744713a7c01c25e41
2024-10-29Merge "Fix failing CSIT and add unit test proving the bug"Toine Siebelink2-3/+24
2024-10-29Merge "Support Alternate-Id for CPS-E05 id-searches and searchCmHandleIds"Daniel Hanrahan13-136/+257
2024-10-25Support Alternate-Id for CPS-E05 id-searches and searchCmHandleIdsseanbeirne13-136/+257
Issue-ID: CPS-2402 Issue-ID: CPS-2383 Change-Id: I5dd3132b70b401bf2f50f77c2c131d5d34aa0c0a Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-10-25Fix failing CSIT and add unit test proving the bugdanielhanrahan2-3/+24
It was determined that one CSIT is intermittently failing due to a CM-handle being deleted while module sync is in progress, which causes the whole batch operation to fail. Even CM-handles that did sync will not go into READY state, despite the logs saying otherwise. This commit reproduces the issue in a unit test, and prevents the issue in the CSIT by changing test order. Also, errors during module sync tasks are reported at ERROR level. (The actual bug fix will be addressed in another patch.) Issue-ID: CPS-2474 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7e0d617cbd48d8fd1fad036079fbd876ee21d8a8
2024-10-24Add multi-threaded Integration Test for Module SyncToineSiebelink7-48/+126
- Add tests for multi threaded scenarios around module sync - Disabled ModuleSyncWatchdog timer using long delay and interval - Call Module Sync method as needed for more control (sometimes it needs to be triggered twice like retry use cases as designed) - Improve NCMP performance test setup (consistent naming etc.) - Rename some production code method names to better reflect functionality - Disabled intermittent failing test for create cm handle as it is not asserting the correct message - Improved Code Coverage ModuleSyncWatchdog Issue-ID: CPS-2462 Change-Id: Ia907af77d2037309f1bbb73ea671679b788bab9e Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-10-24Refactor: Improve code quality and compliance with SonarQube standardssourabh_sourabh1-9/+7
- Consolidated multiple `if` statements to enhance readability and maintainability. - Replaced traditional `instanceof` checks followed by casting with the new pattern matching syntax for improved type safety and clarity. - Removed unnecessary casts and streamlined code in `addYangLeafList` and `addDataNodeFromNormalizedNode` methods. Issue-ID: CPS-1957 Change-Id: I46696dc184b6b3c3d0fe3a6bd12267a4e0d76193 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-10-18Update SpotBugs dependencydanielhanrahan2-6/+0
- update spotbugs to 4.8.6 - remove old findbugs dependency (spotbugs replaces findbugs) - remove an unused SupressFBWarnings Issue-ID: CPS-2458 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If9d5571ae4293a2653a117a988414af2452647c0
2024-10-17Release Stage 7 for 3.5.4seanbeirne1-1/+1
Issue-ID: CPS-2457 Change-Id: Id9a267c587f16f3fb5edb558b33cd0003864ed93 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-10-17Refactor and Optimize ModuleSyncWatchdog for Improved Lock Handling and ↵sourabh_sourabh5-37/+81
Queue Management - Enhanced logging for populateWorkQueueIfNeeded and resetPreviouslyLockedCmHandles methods, improving clarity and error handling. - Improved readability and maintainability of the locking mechanism with Hazelcast's FencedLock. - Optimized error handling in catch blocks, logging detailed exception messages and stack traces for better troubleshooting. - Refined lock acquisition and release flow, with clear log messages for both successful and failed lock operations, ensuring safe handling of Hazelcast distributed locks. Issue-ID: CPS-2403 Change-Id: Ie089f36a817d4965782235b51ee987ef054516b1 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-10-16Update documentation related to hazelcastmpriyank2-4/+4
- removed old entries of data structures which are removed now. - updated the documentation to correctly reflect our infrastructure startegy related to hazelcast. - fixed few NB comments on the merged patch. Issue-ID: CPS-2408 Change-Id: Id7ce4ac695ad94742490ac5d2be89cd23ffda3e5 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-10-10use one hazelcast instance per jvmmpriyank9-66/+73
- updated all the cache(distributed datastructures) to use the same instance config now. - there will be just one instance per JVM now - Better cleanup of hz instance in the testware - Refactored the testware to verify the configs - Expected Impact on lowering the memory usage, less number of TCP communications between members - NOTE: we need to do a full regression as the changes impacts all the use cases which involves cache Issue-ID: CPS-2408 Change-Id: I7564992a9990f44ef3defb4f50cb7d094cad7b92 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-10-08Merge "Policy Executor: handle errors, part 2 (fighting between IntelliJ and ↵Sourabh Sourabh5-57/+119
Checkstyle best practices)"
2024-10-04Bump CPS to 3.5.4-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.5.4-SNAPSHOT - updated release notes Issue-ID: CPS-2434 Change-Id: I3d5e6f37711bb29b61b598cc5af57ecfdc35cbba Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-10-03Policy Executor: handle errors, part 2ToineSiebelink5-57/+119
(fighting between IntelliJ and Checkstyle best practices) - non-2xx responses are processed using web client exceptions - handle unknown host exception - upgraded spotbugs (checkstyle and related mvn plugin) - fixed some small spotbugs due to upgrade - added commented instructions in docker compose to enable debugging - added some environment variables for policy executor configuration - extract out Sleeper in stub service to achieve 100% coverage - added cause to Policy Executor exceptions where applicable - ignored (new) spotbug rule about catch NPE because of issue in 3pp - ignored (new) spotbug rule about \n in string due to multiline string block Issue-ID: CPS-2412 Change-Id: I6835a73320c436cbeea12cc7a06f15899eec7bf1 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-09-25BugFix: 500 Server error when upgrade and service restart with data in DBhalil.cakal2-1/+6
- return NONE for get effective trust level api if the trustlevel caches empty (restart case) Issue-ID: CPS-2409 Change-Id: I72a755ca6ba5d4a78f5458a235c0d1f43aaa8d53 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-09-25Policy Executor: handle errorsToineSiebelink6-37/+121
- configurable default answer - apply default answer upon non 2xx response - delayed default webclient read timeout - add custom timeout method with original read timeout in seconds - apply default answer upon timeout - add integration test with short timeout error scenario Issue-ID: CPS-2412 Change-Id: I62527a27e426c2f01fda2182ebd2513242c29ac1 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-09-24Remove Hazelcast cache for prefix resolver (CPS-2417 #2)danielhanrahan5-3/+183
This patch removes the AnchorDataCache from CPS, which is used for prefix resolution in get/query operations. As such, Hazelcast is no longer a dependency of CPS, only NCMP. - Changed PrefixResolver to be more efficient. - Removed AnchorDataCache and associated classes. - Moved HazelcastCacheConfig to NCMP. - Removed Hazelcast dependency from cps-service/pom.xml This shows good performance improvements in some APIs such as v2 GET which is nearly 2x faster (also 5x faster including base patch). Issue-ID: CPS-2417 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I24768469f24e90b70f7a6187faa4f5b3d75777d2
2024-09-24Revert "Correctly report trust level if DMI is down"danielhanrahan7-36/+64
This reverts commit https://gerrit.onap.org/r/c/cps/+/138853 Reason for revert: Commit caused performance issues in CM handle search Manual rebase was required to integrate changes for alternate-id support made since original commit was merged. Issue-ID: CPS-2375 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I5ef743ea053589fa17c10587317a3534c2714c4b
2024-09-19Retry mechanism (with back off algorithm) is removed with more frequent ↵sourabh_sourabh5-185/+104
watchdog poll - Increased watchdog frequency for locked cm handle. - Removed retry backoff algorithm for locked cm handle. Issue-ID: CPS-2395 Change-Id: I54d0ec8f9de53a7d181639c14aaaa93736f03e19 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-09-18Merge "Refactored cps-ri package structure"Sourabh Sourabh5-5/+5
2024-09-17Refactored cps-ri package structureleventecsanyi5-5/+5
- fixed import order and moved package structure Issue-ID: CPS-2293 Change-Id: Ie2f9f057f261577054530feee7480850ba4b41e1 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-09-17Merge "Policy Executor API: Add Prefix in Yaml"Sourabh Sourabh1-4/+4
2024-09-17Policy Executor API: Add Prefix in YamlToineSiebelink1-4/+4
- Remove servers from yaml. - Add prefix to path in yaml. - Remove basepath prefix from Controller Impl. - Added policy server port to 8093. - Exposed docker env. vars for policy services. Issue-ID: CPS-2291 Change-Id: Idcc9e23f9d63bad2480537dc8d39523fe82b4b83 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>