aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test
AgeCommit message (Collapse)AuthorFilesLines
11 daysChange order of CM Handle Reference lookup depending on special characterseanbeirne4-16/+65
- 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>
2025-02-17Fix CpsSessionFactory for it to be used in prod codempriyank1-16/+0
- Injecting SessionFactory bean from the spring container instead of manually creating it. - Removing explicit addition of Annotated class as anyways the classes are Entity classes and added to the metadata. So no need to add it explicitly - also removing the unused hibernate config file Issue-ID: CPS-2629 Change-Id: Ife2ae3828d009893de70d9c755d6a07cef2f8d07 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2025-02-14Merge "Fix WriteSubJobSpec test to support Windows"Priyank Maheshwari1-1/+1
2025-02-13Fix WriteSubJobSpec test to support Windowsegernug1-1/+1
- Added to test to support Windows/Kubernetes network resolution by MockWebServer Issue-ID: CPS-2641 Change-Id: I1bfe1db66438bbbf7df9e94c8d42cfe84d68b220 Signed-off-by: egernug <gerard.nugent@est.tech>
2025-02-12Store yang resources with recommended RFC-6020 file-nameToineSiebelink2-8/+54
- Ignore input filename and create filename from module name and revision - added integration test to verify names and edge cases (before and after change) - Some code cleanup (vars etc) - Implemented NB comments from last merge(https://gerrit.onap.org/r/c/cps/+/140180) - fixed SQ warning Out of scope: - BLANK revision, test it but failed in ODL Yang Parser and many other places: not supported! Issue-ID: CPS-138 Change-Id: I6fe6d0f8f3683196b183c6e6582ad8eefdfbb7d7 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2025-02-12Merge "Change Datajob Status return value"Priyank Maheshwari1-1/+1
2025-02-12Change Datajob Status return valueegernug1-1/+1
- Change to return entire JSON object instead of status string Issue-ID: CPS-2613 Change-Id: I63d8a9d078f003fc06e301bf9921f7942b3603ab Signed-off-by: egernug <gerard.nugent@est.tech>
2025-02-11Merge "Query data nodes with limit"Toine Siebelink2-1/+13
2025-02-11Query data nodes with limitleventecsanyi2-1/+13
- added new methods to java interfaces - added integration test - removed unused methods Issue-ID: CPS-2394 Change-Id: Iac4094a5daedbf593d17f55928136a80391c6d23 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2025-02-07Fix for intermittent failures of module sync testsdanielhanrahan5-56/+27
- Removed PollingConditions as ModuleSyncWatchdog is now synchronous - Use Hazelcast IMap::delete instead of IMap::removeAsync to fix root cause of test failures: removeAsync may not be finished when module sync is re-run during tests. Issue-ID: CPS-2615 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1786a1303606132218dc8e4e91fb58e6f6cc0bcb
2025-02-06Merge "Fix duplicated yang resource references V2"Daniel Hanrahan4-53/+73
2025-02-06Fix duplicated yang resource references V2ToineSiebelink4-53/+73
- Store Yang module references using SchemaSetEntity instead of SQL - Added integration test to check number of references - Update dispatcher for integration test to only return yang resources requested modules - refactor schema set create & upgrade methods for better re-uses and readability - consistent naming in related methods like(new)yangResourceContentPerName (the name can be filename, module name or schema set name) depending on the context - replaced 'var' with actual class names in affected classes Issue-ID: CPS-2605 Change-Id: I8870c70832ac533bd17ce8af409a071f659e4acf Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2025-02-05Merge "Remove multithreading from module sync watchdog"Toine Siebelink1-4/+0
2025-02-05Merge "Change event topic name for trust level"Daniel Hanrahan1-0/+1
2025-02-04Merge "Fix deprecation issue related to KafkaContainer"Daniel Hanrahan1-6/+5
2025-02-04Simple implementation of attribute-axisdanielhanrahan1-5/+1
This minimally implements attribute-axis using existing queryDataNodes API. Acceptance tests are un-ignored now. Issue-ID: CPS-2416 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia06be3dd85dfce261d9d78529784d54d84b71bcd
2025-02-04Remove multithreading from module sync watchdogdanielhanrahan1-4/+0
After introduction of module set tag improvements, there is no need to multithreading in module sync. Performance impact is minimal. Issue-ID: CPS-2165 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1557fc8348d39da3654a1b92944c6ad49fa8670d
2025-01-30Fix deprecation issue related to KafkaContainermpriyank1-6/+5
- Replaced KafkaContainer with ConfluentKafkaContainer to fix the deprecation issue - Bumped the version of cp-kafka and cp-zookeeper to 7.8.0 - Removing reference of registry.nordix as the NCMP internal pipeline is no longer used Issue-ID: CPS-2608 Change-Id: Ic1f3edbc06d63c5f00c1ecb901e07a6bc17ae6eb Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2025-01-29Bump CPS-NCMP to 3.6.1-SNAPSHOTmpriyank1-1/+1
Issue-ID: CPS-2610 Change-Id: I289fcbdc2df1de6d369cc6e01bdad26ec174b08f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2025-01-29Merge "Add "dataProducerId" and "dmiServiceName" values to ↵Lee Anjella Macabuhay3-7/+7
SubJobWriteResponse in sendRequestsToDmi method"
2025-01-29Add "dataProducerId" and "dmiServiceName" values to SubJobWriteResponse in ↵egernug3-7/+7
sendRequestsToDmi method - DMI call only returns subJobId - SubJobWriteResponse created using DMI response and request values Issue-ID: CPS-2497 Change-Id: Ib38132f2337de6a12b0b05bc6eebeed99f8d435d Signed-off-by: egernug <gerard.nugent@est.tech>
2025-01-27Change event topic name for trust levelemaclee1-0/+1
- Seperate inventory related topics to cm data event topic Issue-ID: CPS-2500 Change-Id: I41a2cda78568f9979fc9f030f076c295c8d6908b Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2025-01-24Merge "Fix for cm handles stuck in LOCKED during registration"Priyank Maheshwari1-16/+17
2025-01-24Merge "Incorrect Internal Error Code for duplicated registration"Daniel Hanrahan2-6/+6
2025-01-23Fix for cm handles stuck in LOCKED during registrationToineSiebelink1-16/+17
- Additional Error logging when cm handles fail module sync - Swallow already defined exception upon schema and/or anchor creation - Updated integration test to try to reproduce the problem (but couldn't) - Ignored integration tests that depend/affected by race conditions (they are useful for troubleshooting but not for pipeline checks) - Removed last remnants of springboot retry annotation option (incl dependencies) Issue-ID: CPS-2576 Change-Id: I910e802268332f955134c043bd1b46a7ec57233b Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2025-01-23Incorrect Internal Error Code for duplicated registrationseanbeirne2-6/+6
-Deprectated 111 Alternate-Id already exists error code -All dupication scenarios now return 109 Issue-ID: CPS-2563 Change-Id: Ic9b9df936eaf3795441f4dd1ec1cc73e39c9eae1 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2025-01-23Add DB Clean-up to CPS Rest InterfaceToineSiebelink7-17/+10
- add dataspace filter to module cleanup impl - updated integration test to only delete orphaned modules in relevant dataspaces (this also fixes CPS-2571) - improved labels on admin controller test - add dataspaces/../clean rest endpoint for cps core - added 'Regular Maintenance' section to RTD Admin Guide - consistent spelling of 'CM Handle' in RTD Docs Issue-ID: CPS-2554 Change-Id: Ica70c3495758f073eaac9eeeadcc0e1be2c8cc1c Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2025-01-21Remove retry mechanism for duplicate module(resource) errorsToineSiebelink2-7/+55
- CM Handle with problems will go into 'LOCKED' state and retried using existing business logic Issue-ID: CPS-2555 Change-Id: I563f6bc536d8fd8c6675891c62318ff2fb43fea6 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2025-01-16One SchemaSet per moduleSetTagToineSiebelink8-82/+81
- Registration: create and upgrade cases. - Handle moduleSetTag deletion (all orphans) for testware - Unit tests updated - additional logging of details for upgrade scenarios - Integration Tests updated - Remove cache for module sets being processed - Removed DbCleaner (startup) - Removed redundant methods in NCMP Inventory for deleting schema set(s) - Removed validation check for all schema set interactions - Updated some schema set tests to use special characters previously not allowed - Checked integration test scenarios for upgrades with and without tags: all scenarios covered! TODO - REST endpoint to remove orphaned schema set data, separate story: CPS-2554 - Investigate exception handling regarding DuplicateYangResourceException: CPS-2555 Issue-ID: CPS-2540 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Iaa59cbdb86b7a4a8044624829bc002506ff40cc7
2025-01-15Merge "Move LockReasonCategory under api package"Lee Anjella Macabuhay3-5/+5
2025-01-13Move LockReasonCategory under api packageleventecsanyi3-5/+5
- reafctored package structure Issue-ID: CPS-2514 Change-Id: Id54cd652e147b585730caacbe550287ae2c329e1 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2025-01-10Implement Integration Testcases for XML Supported API'sRudrangi Anupriya7-18/+127
Issue-ID: CPS-2548 Change-Id: Icc7ffb66aabb03702355123c6d5c2eade0e7cb4a Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-12-19Cps and Ncmp distributed lock for various use casesmpriyank2-0/+13
- introduced cpsAndNcmpLock to be used for any use case needing coordination. Since it can be used for any use case hence placing the class accordingly. - currently lock is being used for populating workQueue. - Removed FencedLock as it was part of CPSubsystem which is moved to hazelcast-enterprise in 5.5.* version onwards. - added info level logging statement to verify just one thread at a time in the critical section - Note : integration test to be part of a separate patch. Issue-ID: CPS-2479 Change-Id: I0f33c7232786c517383e5093fda91fd9a1839021 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-12-11Merge "Policy Executor API Review Board Comments"Lee Anjella Macabuhay1-5/+5
2024-12-10Policy Executor API Review Board CommentsToineSiebelink1-5/+5
- Implemented Guild review comments in API - Updated Stub to reflect new API and 'support' all operations - Updated production code to use new API - Updated Semi-Integration Tests Issue-ID: CPS-2479 Change-Id: Ibe307b0d859312b534009a384e9f71e1ea2affe0 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-12-10Separated inventoryFacade to Interface and Implleventecsanyi4-8/+8
- created NetworkCmProxyInventoryFacade IF Issue-ID: CPS-2513 Change-Id: Ibda2d7899514ee22d4b04cad971e107bfccce2df Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-12-06[Module Sync] Store CM-handle IDs in work queuedanielhanrahan1-1/+1
This fixes bug CPS-2474, handling various edge cases, such as CM handles being deleted during module sync. - Change moduleSyncWorkQueue to store CmHandleId instead of DataNode. - Freshly fetch Cm Handles in module sync task, so latest CM-handle state is used, and only process ADVISED CM handles in module sync. Issue-ID: CPS-2474 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I53d5796c56014a2bfbe5b1c3f17d3991e4feef53
2024-12-05Moved common classes under the api package under apileventecsanyi19-57/+57
- moved common classes under the api package - moved Spec files Issue-ID: CPS-2512 Change-Id: I88046280ce359ce8cc488ad37d4e6f85406b0dbf Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-12-04Inventory Persistance returns YangModelCmHandles for alternate Idsseanbeirne1-1/+1
-Remove getCmHandleDataNodeByAlternateId(s) methods and replace with Yang Model methods Issue-ID: CPS-2486 Change-Id: I2c9c96f033b3b1eefadb7eff14c91f9a936630e6 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-12-03Add tests of attribute-axis featuredanielhanrahan1-0/+39
Following TDD, functional acceptance tests are added for attribute-axis feature. This covers xpaths such as '//books/@title' - Add stub to CpsQueryService throwing UnsupportedOperationException - Add tests showing expected behaviour (tests currently ignored) - Implementation will be provided in following commmit for CPS-2416 Issue-ID: CPS-2416 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I71817e66b28dfc21e7b75243fd0135f3cceddb8e
2024-12-02Update the minor version of CPSmpriyank1-1/+1
- Update the minor version of cps. - New version being 3.6.0-SNAPSHOT now. Issue-ID: CPS-2488 Change-Id: I87fb29fe45dc942b258bc1d45e09a3351739539b Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
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-29Merge "XML content support on Replace list content"Priyank Maheshwari2-6/+6
2024-11-28Merge "De-Registration without Orphaned Module Check"Toine Siebelink4-6/+16
2024-11-28De-Registration without Orphaned Module CheckToineSiebelink4-6/+16
- Testware updates to measure time spent for de-registration - Removed orphan check from module delete methods - Using @scheduled to run Db Cleaner method once (see https://lf-onap.atlassian.net/wiki/spaces/DW/pages/52494359/CPS-2478+Module+Sync+Inefficiencies#De-Registration:-Test-Measurements-With-and-Without-Orphanage-removal for reasoning) - Updated integration tests to call orphan check where need (after schema set deletion) Issue-ID: CPS-2478 Change-Id: I513af9d8bb88486a242284b58e0363a527346dd4 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-11-28XML content support on Replace list contentRudrangi Anupriya2-6/+6
Here to bring Support for XML Response Entity in Replace List content - Add ContentTypeInheadr in cpsData.yml to support application/xml - Add contentTypeInHeader parameter to accept xml in DataRestController.java - Modify the code return xml Data - written testcase for above changes made Issue-ID: CPS-2411 Change-Id: Ibb7ffb66ccdd03703266123c6d5c2eade0e7cb4a Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-11-26Implement ancestor axis in SQLdanielhanrahan1-0/+1
Currenty ancestor axis is implemented in Java using regex, which then sends a second SQL query to fetch ancestors. Implementing ancestor axis in SQL is more efficient, and is needed for limiting/paginating Cps Path Query results. Issue-ID: CPS-2416 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I0d8933f86c5a422f366ad7c417a17e263a13960f
2024-11-25Registration Optimization remaining Code CommentsToineSiebelink2-3/+3
Issue-ID: CPS-2478 Change-Id: I0aa3804225f053ff99176056fe71322a23cff31c Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-11-21Add Rest tests for yang module APIsdanielhanrahan1-0/+101
Add tests of following rest endpoints, including error scenarios: - /ncmp/v1/ch/${cmHandleReference}/modules - /ncmp/v1/ch/${cmHandleReference}/modules/definitions Change-Id: Ia4b5a638345840970794c7ae93dfd44e5ea62252 Issue-ID: CPS-2509 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
2024-11-18Test to highlight ModuleSetTag InefficienciesToineSiebelink6-61/+165
- 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>