summaryrefslogtreecommitdiffstats
path: root/cps-service/src/main/java/org/onap
AgeCommit message (Collapse)AuthorFilesLines
2022-09-01Implement merging all ncmp datastore endpoints into onebmiklos1-12/+6
- Merging all endpoints under /v1/ch/{cm-handle}/data/ds/ncmp-datastore:* to /v1/ch/{cm-handle}/data/ds/{ncmp-datastore-name} - Implementing missing tests from parent - Introducing abstract class to keep the common code and just pass in the supplier to be executed in sync or async manner - Removed the existing get endpoints for passthrough-running, passthrough-operational and operational and merged them into a common get endpoint Issue-ID: CPS-1178 Issue-ID: CPS-1001 Change-Id: I6956c81d5acfa8fb11217bcc16cb795b62070fa3 Signed-off-by: bmiklos <miklos.baranyak@est.tech>
2022-08-29Performance Improvement:save cmhandles capabilitympriyank3-0/+42
- 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 queueToineSiebelink1-1/+4
- 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 DataNodeslukegleeson3-8/+52
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-19Performance Improvement: Temporal eventmpriyank2-32/+26
- Call the admin service in the async pool thread to fetch the anchor details in case of raising event on save, update and delete a node or delete list elements - Admin service is still called in the main thread in case of DeleteNodes method as we require to have anchor as we are deleting all the anchors. - Fixed the test scenarios related to processing async event - Rearranged method formal params Issue-ID: CPS-1126 Issue-ID: CPS-1209 Change-Id: Ibd8f001c4d7c7de63914f6de24042aaf01a063b2 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-08-11Get Node API fixputhuparambil.aditya1-4/+7
Issue-ID: CPS-1179 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I1450ed5d05afd6dd30484eaf19b1e40fd586df8e
2022-07-29Query CmHandles using CPS pathlukegleeson2-4/+68
Added withCpsPath condition parameter Validated to prevent misuse and blocking of querying using private properties Updated OpenAPI with examples and links to documentation Moved methods related to cmHandle querying using cps path from InventoryPersistence to CmHandleQueries Renamed private method deleteSchemaSetAndListElementByCmHandleId to deleteCmHandleByCmHandleId Issue-ID: CPS-977 Change-Id: I83827215b7e58de74f8f62cd0140516d217d93f1 Signed-off-by: lukegleeson <luke.gleeson@est.tech>
2022-07-25CmHandle creation performance degradationsourabh_sourabh1-0/+4
- Created a dedicated threadpool for scheduler. - Tuned async threadpool of notification executor from setting RejectedExecutionHandler and application.yml. Issue-ID: CPS-1126 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I2afe3c76c1aec78751777df0d2f08ddb8dcee102
2022-06-30Add method to get YANG module sources for CM handleemaclee4-1/+66
- part of this commit includes renaming the enum SyncState to DataStoreSyncState Issue-ID: CPS-1064 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I6bf419141a1b33f09871946445cdfff422c8c354
2022-06-30Merge "Fix performance degradation bug"Joseph Keenan1-37/+0
2022-06-30Kafka consumer can not be turned offJosephKeenan2-3/+6
-NOTE: Build will fail until docker-compose version issues on build server are fixed --Ticket raised https://jira.linuxfoundation.org/plugins/servlet/theme/portal/2/IT-24219 -added flag for async -added response if async is triggered without being enabled & associated test -modified to use one global flag for notifications Issue-ID: CPS-1088 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: If9d988b4dcb71bf37c1b1bf9464090782708ffc2
2022-06-30Fix performance degradation bugkissand1-37/+0
- do NOT use cpsPath query for gettign individual CM Handles - change order of queries for more efficency (property query first) Issue-ID: CPS-1085 Change-Id: Ia3bdf4f0d245a2b128557352685d2aa17c1f939c Signed-off-by: kissand <andras.zoltan.kiss@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2022-06-22Data Sync Watchdog Processsourabh_sourabh1-0/+17
- Get all the Cm Handles state in READY and Operational datastores sync state in UNSYNCHRONIZED - Get a random Cm Handle - Get the first resource data from the node - Save the data in Cps Db - Update the Operational datastores sync state to SYNCHRONIZED Issue-ID: CPS-1052 Issue-ID: CPS-1053 Issue-ID: CPS-1054 Change-Id: I9a20391ef30e6d56c4d789a92b8bf42cd3756c62 Signed-off-by: Lathish <lathishbabu.ganesan@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-06-13Fix sonar code smellskissand2-21/+24
- https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYFC3OguDZ5Vb3SQMOU1 Issue-ID: CPS-1016 Change-Id: Ic8fdae78337da1ff2c239ae2dfae67e23e88a4bb Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-09Handle errors during cm handle searchkissand1-1/+1
Issue-ID: CPS-1067 Change-Id: Iadc3413a29f9a455e658ec5bcaffc4881b7f7684 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-08Merge 2 'query' end points in NCMPkissand9-37/+182
- merge two endpoint for a same backend - use xPath query instead of sql query - modify searches endpoint to return a cmHandle object with all public properties - handle old (deprecated) queries - handle public property queries - create useful examples - use more verbose error messages - simplify openapi yamls - create new query service - change second endpoint name to a better matched name - modify legacy tests with new requirements - create new tests for the new scenarios Issue-ID: CPS-1016 Change-Id: I7476e9dbd510ec93b5b48ce85d477ecb2dadffff Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-02Merge "Add module name to cps core output"Toine Siebelink3-2/+24
2022-06-02Add module name to cps core outputemaclee3-2/+24
- add withModuleName method - add getNodeIdentifierWithPrefix method - add unit test in DataMapUtilsSpec - add unit test in DataNodeBuilderSpec - fix all existing unit tests Issue-ID: CPS-870 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I51b70fa2dd3381eef9500b4339d4922c017e3000
2022-05-25Async request response NCMP -> ClientJosephKeenan1-12/+19
-Added consumer for DMI events and producer for forwarding to client -Added schemas for events -Updated tests -Added new module for ncmp events -Used mapstruct for event mapping Issue-ID: CPS-830 Change-Id: I096d08af9d69092cf8651e11eaa00ce441fc3605 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2022-05-03Merge "Watchdog-process that changes CM Handles state"Joseph Keenan1-2/+3
2022-04-29Watchdog-process that changes CM Handles stateDylanB95EST1-2/+3
Add a fixed delay scheduler to switch cm-handles found in an ADVISED state to a READY state Scheduler currently runs every 30 seconds Will only update a single cm-handle at a time Queries CM-Handle with Advised States Only using CPS Path. Will choose cm handle at random Issue-ID: CPS-875 Change-Id: Ie1b49c89a0350d20e14748a65f9c1d260d8502d2 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-04-27Add methods to Lock Anchor entityemaclee5-1/+126
Added separate integration and mock-based unit tests Issue-ID: CPS-898 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I14d1d1c41759ce028e2417fdd2df001280e19ab2
2022-04-11Fix Sonar Qube ViolationsDylanB95EST1-12/+11
Immediately return expression Issue-ID: CPS-475 Change-Id: I2c33c94bef1ff097786299d3a037feea2b4ebbff Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-04-08Refactoring/ Adding Tests for ValidationDylanB95EST2-6/+6
Refactored classes affected by validation Have added tests for anywhere where validation is used Have refactored the parse and sync modules validation to be validated at the public api method Issue-ID: CPS-322 Change-Id: I4989cfd03300fbdca41571d0aa2d0b96978858ba Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-04-06Query based on Public CM PropertiesJosephKeenan5-2/+72
-Updated OpenAPI for new Endpoint -Will replace SQL with CPSPathQuery once investigation is complete -Functionality in place to determine if public properties match - -Added Unit and CSIT tests - small modifications may need to be made -CSIT tests enhanced to add additional nodes and tests Issue-ID: CPS-731 Change-Id: I403e603ce79c4a4a6994d51b459b5703510d5a83 Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2022-04-05Async: NCMP Rest impl. including Request ID generationsourabh_sourabh1-0/+11
- Restructured code and moved some of them at controller and service layer. - Unit is fixed and organized to it's belonging classes. Issue-ID: CPS-828 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I0919218e35b1d11cb579d707f376b76de80409da
2022-03-30Additional validation for names/identifiersDylanB95EST9-14/+98
Implementing additional regex validation for names/identifiers in CPS - Introduces a CpsValidator - Applies to relevent java public API's - Tests have been updated where necessary Issue-ID: CPS-322 Change-Id: I29ab8820bb1fe0eee247e425d6bb018bcd38f28e Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-03-25Add Start and Stop sessions on JAVA APIemaclee3-0/+39
Issue-ID: CPS-899 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Idbeb922790824b1ca601d6d4798df45efa57d685
2022-03-11Merge "Removed ExtendedModuleReference Object"Toine Siebelink9-59/+37
2022-03-10Removed ExtendedModuleReference Objectsourabh_sourabh9-59/+37
-Introduced ModuleReference with 2 prop name and revision -Removed default constructor of ModuleReference Issue-ID: CPS-592 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I27a8a521f133c0773ef0aa0b9700ac42f6bc613b
2022-03-07Dependency Injection using Lombokmpriyank1-21/+10
- NotificationService dependency injection using Lombok and populate dataspace patterns post injection. Issue-ID: CPS-906 Change-Id: Ia7d32903b18861d22cdd4e6809d9fe746181d389 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-03-03Bug fix for delete data node not working for root nodeputhuparambil.aditya1-3/+9
Fixing event for deletion of container node Fixing event for deletion of root node when '' is passed as xpath Issue-ID: CPS-895 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I0676aec29e7b7e12bef2300219207ddc22414daa
2022-02-28CPS-887 Decreasing performance of cmHandle registrationJosephKeenan3-19/+41
- Creating temporary table module references from the node - Query returning new moduleReferences for node to be added to CPS - Modified registration for node to use new implementation (incl. tests) - Refactored some interface to use collection instead of list - Modified SQL statements to use String.format() - Fixed tests Issue-ID: CPS-887 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: I58b17d29e8b9d6f7a644d33bf6cf8bf46f892580
2022-02-17Align JSON DataNode for Get and Post/Put API in CPSputhuparambil.aditya2-2/+13
Issue-ID: CPS-865 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I60b1f9c94e79bdd66d60fe6a68f5fc4adc718d35
2022-02-16Core logic to update,add or remove cmHandle propertiesmpriyank2-5/+25
Issue-ID: CPS-837 Change-Id: Ia078b6a0291ae916931259a309dd592b0554da28 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-02-15Fix to keep yang resource cache in syncRenu Kumari2-20/+25
- Removed schemaset from cache when schemaset is deleted - Added separate test cases for yang resource cache Issue-ID: CPS-864 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Ie1f9978406de1c92b513549216873cba4a98cdd7
2022-02-14Improve logging in NCMPsourabh_sourabh1-19/+23
- Code to change to apply logs at runtime - Fix for minor code smell Issue-ID: CPS-855 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I93a556fe0fb7ca05a42e84eb5ec4f84afaa8fd92
2022-02-07Add support for delete data-node eventRenu Kumari3-24/+29
- Changed process event input to address delete - Send null data in the event if the operation is DELETE Issue-ID: CPS-791 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: If851f7132e94bcbcaf4324d07a2a00c90d1882b7
2022-02-02Refactor Delete Anchor functionalityRenu Kumari4-56/+71
- Added a delete DataNode functionality in the CpsDataService - CpsAdminService uses CpsDataService to delete DataNodes Issue-ID: CPS-791 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: I090500dbc4a2ccf061dc105f979472137d43b06d
2022-01-28Refactored Delete SchemaSet functionalityRenu Kumari5-55/+93
- Added get anchors by schemaset in cpsAdminService - Changed DeleteSchemaSet functionality - Use CPSAdminService to getAnchors associated with schemaset - Use CPSAdminService to delete Anchors - Moved Cascade allowed validation into Service from Persistence Issue-ID: CPS-791 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Ife7644551183cb8c3eb686a654b0a43a427ac1e5
2022-01-27Merge "Improve logging in NCMP"Toine Siebelink1-0/+69
2022-01-25Improve logging in NCMPsourabh_sourabh1-0/+69
Issue-ID: CPS-855 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I5d8a6a711d1c6b13d5d8eeba52a1dcd689dbdae2
2022-01-25Replace gson mapper with jackson mappersourabh_sourabh1-0/+90
We introduced JsonObjectMapper (wapper) as Spring component. Issue-ID: CPS-751 Change-Id: I536b0771a3a263325e6907717baf6941d70c0d6c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-01-11Send operation information in existing notification eventsRenu Kumari4-27/+65
Issue-ID: CPS-791 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Ic68dd476942291cf03afed99e95a245dafde5be9
2021-12-20Fix Sonar Qube Violations - Recurring tasksourabh_sourabh1-1/+1
Issue-ID: CPS-475 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I5c10360ec42bc9737ed86140398ef954109275dd
2021-11-23CPS-314: Delete Dataspaceniamhcore4-0/+59
Issue-ID: CPS-314 Change-Id: I778e2b784c7b1ff3fecc1036425708dc4ec73227 Signed-off-by: niamhcore <niamh.core@est.tech>
2021-11-08CPS-475: Fix Sonar Qube Violationsemaclee2-5/+6
Issue-ID: CPS-475 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I85ff6dc91c63bd7869712509a7a6f284a0631603
2021-11-03Merge "Delete DataNode (xpath) for a given Anchor"Niamh Core2-0/+18
2021-11-02Delete DataNode (xpath) for a given AnchorDylanB95EST2-0/+18
Delete Datanode within CPS. Deprecates delete functionality of /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes. New api is backwards compatible with this API Issue-ID: CPS-313 Change-Id: I110c4ab1446e8a1399a0d9bf89c0be614a9104df Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-11-02Add get cm handles by modules names - service layerniamhcore3-3/+23
Issue-ID: CPS-644 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ic2a57df02d533a0066382c12c35be8d524b6cdad