summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy/org/onap
AgeCommit message (Collapse)AuthorFilesLines
2023-03-03JAVA onboarding of YANG modelemaclee1-0/+145
- removed docker compose init container - removed init container script files - created new model loader class to onboard YANG model which runs after the application has set up - new model loader class is created in new package in cps-service (org.onap.cps.ncmp.init) Issue-ID: CPS-1467 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I35fe82817aff7783520acf8db66ad504271026bd
2023-02-15Bulk delete schemasets in CM handle deregistrationdanielhanrahan2-4/+15
- Batch delete schema sets in single query - Call deleteUnusedYangResourceModules once per batch, not per CM handle - Results for deregistering 10k: 14 mins before; 6 mins after Issue-ID: CPS-1423 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia3a86a0dc88677323e2f386253a99022a7f02603
2023-02-15Merge "Use getDataNodes (plural version) into NCMP to get CM handles ↵Toine Siebelink2-22/+15
Performance improvement"
2023-02-14Use getDataNodes (plural version) into NCMP to get CM handles Performance ↵seanbeirne2-22/+15
improvement - Code clean-up on existing classes - Removed duplicate code Issue-ID: CPS-1426 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I3e2ce5b804d7a6e87838490d970cde3cd563f06b
2023-02-09Use getDataNodes (plural) in CmHandle deregistrationdanielhanrahan1-9/+7
Issue-ID: CPS-1426 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I0ad79bf36840cdecc13898e185dc618cedafd529
2023-02-09Merge "Produce subscription create event for subscription-topic: ↵Toine Siebelink1-0/+57
cm-avc-subscription"
2023-02-09Merge "Update CmHandleState on deregistration response"Priyank Maheshwari1-39/+60
2023-02-09Produce subscription create event for subscription-topic: cm-avc-subscriptionsourabh_sourabh1-0/+57
- Groovy Kafka (component level) : Produce subscription create event. Issue-ID: CPS-1394 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ib020c0a4458406925792fc074afd998aa09af158 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-02-08Use getDataNodes (plural version) into NCMP to get CM handlessourabh_sourabh2-1/+40
- Use plural getYangModelCmHandles get YangModelCmHandles by CmHandles in batches. Issue-ID: CPS-1426 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ie175b471bd98b02b572ca4a3ff699d721b5b782a Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-02-07Update CmHandleState on deregistration responsedanielhanrahan1-39/+60
Current implementation incorrectly sets CmHandleState to DELETED for CM handles that were not deleted. - Update CmHandleState to DELETED only for deleted CM handles - Minor test refactoring Issue-ID: CPS-1471 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ibf8b6d2b87d46a7633f0497b065e3d4099851fd6
2023-02-02CmHandle batch deletiondanielhanrahan2-5/+16
- Use plural deleteDataNodes to remove CmHandles in batches, falling back to individual delete on error - Use single deleteDataNode instead of deleteListOrListElement for individual delete Issue-ID: CPS-1464 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If09f22478df8703290c8fc24aa6fe2a11c90788a
2023-01-23Merge "[NCMP] Consume & Forward to client topic"Toine Siebelink2-5/+88
2023-01-23[NCMP] Consume & Forward to client topicseanbeirne2-5/+88
-Consumes event from dmi-cm-events -Immediately forwards to static topic (topic selection for events comes later from subscription information) -Added Kafka test -SHOULD BE MERGED BEFORE DMI PART Issue-ID: CPS-138 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: I0a426381e2c3f9173b8d3916960c05722ad4f77d Signed-off-by: seanbeirne <sean.beirne@est.tech>
2023-01-12Merge "Updating CmHandleStates using batch operation"Toine Siebelink1-2/+2
2023-01-12Updating CmHandleStates using batch operationJosephKeenan1-2/+2
Issue-ID: CPS-1424 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: Ia67db468ece4a7ab694d95cb63a954f24dd8cb55
2022-12-22Consume Subscription Creation Eventseanbeirne1-0/+52
Issue-ID: CPS-1392 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I0a5a8c256319a1a2944ee6606db1c14b50e8f8e4
2022-12-16Use public exposed interface of CPS service instead of spisourabh_sourabh2-38/+25
- Used public interface of cps service to get data node or anchor names. Issue-ID: CPS-1427 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I2a891dd5f8955977295f32005e49543886eac88c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-12-01Filter on private properties of CM Handlesleventecsanyi11-28/+328
- Moved cm handle query validation to cps-ncmp-service (where it belongs!) - Added new enum type for private/public field types - Created new methods for private and public queries - Added new REST endpoint - Created service methods for filtering on different types of properties - Refactored getPublicPropertyPairs and queryCmHandleAnyProperties - Added unit test for the controller layer - Fixed refactoring suggestions - Imporved code coverage with unit tests - Refactoring - Added new functionality to NcmpRestInputMapper - Updated version number to 3.2.1-SNAPSHOT and updated release-notes.rst Issue-ID: CPS-1236 Change-Id: I0ddf6866473f7c3c6b8507d222d441bf97ca6bdc Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2022-11-16Merge "Query data NCMP-Operational with CPSpath"Sourabh Sourabh1-0/+46
2022-11-15Query data NCMP-Operational with CPSpathlukegleeson1-0/+46
New GET Endpoint: /v1/ch/{cm-handle}/data/ds/{ncmp-datastore-name}/query?cps-path={CPSPath} Implemented error for {ncmp-datastore-name} other than operational - (Toine) Refactored and renamed (abstract) handler for better re-use Mainly by introducing a separate handler for OperationalQuery Reviewers Toine, Sourabh, Priyank Issue-ID: CPS-1002 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Iaca018869d95d4ce800072431baa190050a6dad0
2022-11-11Temporary registry updatempriyank1-1/+1
- temporarily updating the registry to test the failing tests. Issue-ID: CPS-1360 Change-Id: I7e303bb72b3f87565e27bcca7b1d9f5afc2b1417 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-10-27Read Performance Improvement - Using Native QueryToineSiebelink1-10/+23
- Native query for FragmentExtracts - Convert FragmentExtracts to tree of FragmentEntity - Native Query now used for all Gets with descendants (orignal hibernate option only used when descendanst ommited) - Added error handling for not-found on native query - Ommit descendants by default on many udpate use-cases (this might have a signifcant perf. improvemnt impact too) - Improved legacy tests for delete use-cases - Corrected performace test expectation - Fix TTL test realizing TTL resolution is whole seconds! Issue-ID: CPS-1301 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I658ac1b7b7036f01050f30bdf9e5bd175725ef1d
2022-10-20CPS Validator Changeslukegleeson5-76/+34
Changed CPS Validator from static to non-static Moved CPSValidator implementation to rest interface layer to prevent duplicated usage Created CPSValidator interface in persistence layer Removed unnecessary tests Refactored misplaced tests Copyright fixes Copyright Check Script output formatting fix Issue-ID: CPS-1228 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I4c99a51870e7d3b8e416bc1f909aeed5dc3baa42
2022-10-13TTL for module and data syncmpriyank2-5/+37
- Added configurable ttl parameters for module sync and data sync in the application yaml - Changing strategy to set the TTLs now. Its been set for each key at the inserting time only for both the maps. - Added test scenarios to verify the configs and the TTLs. Issue-ID: CPS-1288 Change-Id: I0a95cbd1a3e540ff15e23027e79e07e9a26f4c19 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-10-13Merge "Fix Id-searches endpoint performance degradation"Toine Siebelink1-1/+3
2022-10-12Fix Id-searches endpoint performance degradationkissand1-1/+3
- create more flexible control over fetch descendants - add a new FETCH_DIRECT_CHILDREN_ONLY option to fetch descendants options - enabel create custom fetch descendants option Reviewer: Toine, Joe, Priyank Issue-ID: CPS-1216 Change-Id: I900b32e813367aa9566c1dec986b20f009d27203 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-10-03Swallow kafkaExceptionmpriyank1-0/+14
- swallow the kafka exception if we are unable to send the kafka message due to any reason. - updated release notes as well Issue-ID: CPS-1294 Change-Id: Iaa8ae5b0bc289d819a46b4a95a1382f4ecee66aa Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-21Robustness cleaning of in progress cachesourabh_sourabh5-22/+69
- Removed cm handle entry from in progress map while moving from locked to advised and de-registration - Fixed groovy tests Issue-ID: CPS-1239 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ic527c7b5d209e0c7788888942e95ce0c2c59f7c6
2022-09-13CmHandle registration/module sync watchdog performance improvmentsourabh_sourabh1-9/+8
- Tuned CPS DB parameters - Removed deprecated CPS DB parameter - Modified module sync watch logic - Added aditional logs - Removed logic to get FragmentEntities as stream - Removed detaching of fragment entity as it was causing NCMP to break with an exception "SQLSTATE(08006)" Issue-ID: CPS-1126 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I0bde11895f754602dece132efde701d82b377f12
2022-09-13Handle partial failure (improvements)ToineSiebelink2-5/+29
- catching of failures on retry of individual nodes - extract cm handle id from xpaths (can only report xpaths in cps core) - add test for same Issue-ID: CPS-1232 Issue-ID: CPS-1126 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ice2032c8b15fea97ae0aaa4d1ed642b3499228fa
2022-09-12Handle partial failurempriyank1-14/+10
- Removing the transaction boundaries as it was getting rollbacked on partial failures - Handled adding the elements in batch and if it fails try them individually - Refactored code a bit and when there is partial failure we try one more time in sequence and even if there are failures we collect the failures Issue-ID: CPS-1232 Issue-ID: CPS-1126 Change-Id: I7824c9f37f80cbaeedd5dc06d598ca0e3a69c59b Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-05Code to Interface : InventoryPersistencempriyank1-2/+2
- Extracted interface for InventoryPersistence using automatic extraction of IDE. - We call the InventoryPersistence to InventoryPersistenceImpl - Used the correct type in the test Issue-ID: CPS-1241 Change-Id: Ieceaec69c1063d7762abc7d8e389d36011a93860 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-05Performance Improvement: Fix Insert Yang Resource IDs (Schemset)ToineSiebelink1-7/+6
- Add robustness to handle insertion/get of empty collection - Fix business logic to pass down ALL module references during module Sync - Update Java doc etc to clarify ALL module references are needed (not just new) Issue-ID: CPS-1246 Issue-ID: CPS-1126 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ic8ff4bdfef646e98ef61a6732c6d5ecb4b762e29
2022-09-02Performance Improvement: Use save batches of cmhandlessourabh_sourabh3-34/+50
-Used cm handle batch to persist from state handler. Issue-ID: CPS-1230 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I68b7fde7dc85818b818f1af588344c26b549d87b
2022-09-02Code to Interface: CmHandleQueriesmpriyank3-5/+3
- Extracting the interface CmHandleQueries using IDE intelligence - Used intreface when mocking in the tests Issue-ID: CPS-1240 Change-Id: I5f537eaac992c68b65468e344830a04f1dda7e45 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-01Merge "Get all cm handles by DMI plugin Identifier"Sourabh Sourabh3-2/+34
2022-09-01Merge "Performance Improvement: Enhance state handler"Sourabh Sourabh3-3/+100
2022-09-01Performance Improvement: Enhance state handlermpriyank3-3/+100
- Introduced batch handling capability to state handler - Refactored methods in CompositeStateUtils - Renamed saveCmHandleStates to saveCmHandleStateBatch - Decoupled processing of events in bulk - Test scenarios for the new functionality Issue-ID: CPS-1231 Issue-ID: CPS-1126 Change-Id: Ifacdeb7bbed14712ecf4f5e2a4d9b324bae278d8 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-01Get all cm handles by DMI plugin Identifieremaclee3-2/+34
- api added to get cm handles by dmi plugin identifier - response object refactored from RestOutputCmHandle to collection of Strings (cm handle ids) - added public and private methods in CmHandleQueries to get cm handle ID by dmi plugin - added unit tests including test to show that there are no duplicates on response Issue-ID: CPS-1136 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Ia3bdc16172a90ad3a3f9ae11cddcad1352188726
2022-09-01Performance Improvement: Watchdog Parallel execution with configurationsourabh_sourabh3-22/+100
- Introduced AsyncSyncExecutor to get task and execute it with configured number of parallel threads. - Number of parallel thread can be configured from application.yml. - AsyncTaskExecutorSpec is added - Fixed existing grovvy test now async task would be submitted. Issue-ID: CPS-1200 Change-Id: I58c0368b945c90e619c2acfc7458ba58de047484 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-08-29Performance Improvement:save cmhandles capabilitympriyank1-0/+16
- add saveCmHandleBatch in InventoryPersistence - add saveListElementsBatch in CpsDataService - have addListElementsBatch in CpsDataPersistenceService - Test scenarios for the same Issue-ID: CPS-1229 Issue-ID: CPS-1126 Change-Id: I0a1401818da5a4e523d7d0751cac6a526d1611b2 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-08-29Performance Improvement: Use hazelcast blocking queueToineSiebelink6-131/+216
- Introducing hazelcast for queue and progress map - process batch of 100 at the time - decreased module sync watchdog sleeptime to 5 seconds - separate module sync tasks in new class and some other async preparations and easier testing - tests for batching in module sync watchdog - remove qualifiers annotation (support) where no longer needed Issue-ID: CPS-1210 Issue-ID: CPS-1126 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I0a7d3755bf774e27c5688741bddb01f427d4a8a7
2022-08-25Performance Improvement: Batch Update DataNodeslukegleeson1-2/+17
Implemented methods to perform a batch operation on updating datanodes Refactored replace data node(s) tree methods to update data node(s) and descendants Issue-ID: CPS-1203 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I365d657422b19c9ce384110c9a23d041eaed06f4
2022-08-22Merge "Distributed datastore solution for Data Sync Watchdog"Toine Siebelink5-52/+48
2022-08-22Distributed datastore solution for Data Sync Watchdogkissand5-52/+48
- update lombok config to handle Qualifier annotation - update Semaphore config to use ConcurrentMap - update SyncUtils to return a list of cm handles - update DataSyncWatchdog and ModuleSyncWatchdog with Qualifier - update DataSyncWatchdog to handle a list of cm handles - Use get with xpath to check cm handle state Issue-ID: CPS-1015 Change-Id: Icb39bd29f89e0020d49a1f8960476ffe81b12362 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-08-22Merge "Fix: CM Handles for only hasAllModules Query"Sourabh Sourabh1-1/+1
2022-08-22Fix: CM Handles for only hasAllModules Querylukegleeson1-1/+1
hasAllModules was returning no CMHandles when queried by itself, only when paired with another query condition e.g. hasAllProperties This fix means endpoint works as expected. Reverted null check Issue-ID: CPS-977 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Idafad4c9877941d121f5cbb98617c56a35a1cc94
2022-08-18Ensure Additional Properties for CM Handles are includedToineSiebelink2-2/+13
- seems like bug is not present on master - modified test to ensure the behavior is tested now - (intelliJ) cleaned up so unused stuff Issue-ID: CPS-1212 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I6882df4277e50ef869c6a1e9b093ee83dbcdf78e
2022-08-10CmHandleState transition using state handlermpriyank4-32/+71
- Raise LCM Event when state transition happens. - Raised events for ADVISED to READY, ADVISED to LOCKED, LOCKED to ADVISED. - Refactor existing code to raise the events correctly. - Refactored existing test scenarios to comply with the code change. Issue-ID: CPS-1034 Change-Id: Ie548e644f6133304d7fa36c892ca2bec7393c074 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-08-04LcmEvent state handler refactoringmpriyank3-11/+124
- State handler will now handle new structure of LcmEvent. - We have 3 types of events i.e create, update and delete. - Introduced the LcmEventCreatorHelper to delegate some of the responsibility of event creation based on event type and the state. - New tests and existing refactoring - Code rebased - Refactored name as per group code review - Code rebase with other commits - Used copy constructor for deep copy operation of NcmpServiceCmhandle and CompositeState - UPCOMING : Related user stories to trigger the event publishing using state handler. Issue-ID: CPS-1128 Change-Id: I94b5a87d37d6a174c017ee0aa37cd0f0f74ba084 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>