summaryrefslogtreecommitdiffstats
path: root/cps-service/src/main/java/org/onap
AgeCommit message (Collapse)AuthorFilesLines
2022-12-12Fix DataNodeBuilder for ChoiceNodesLena Peuker1-1/+13
Fix implemented to handle YangChoiceNode in right format Issue-ID: CPS-1352 Signed-off-by: Lena Peuker <PeukerL@telekom.de> Change-Id: I48d433bac96cfc647bc31c82817870995bace860
2022-12-09Merge "Added API to get all schema sets for a given dataspace."Toine Siebelink4-0/+36
2022-12-09Added API to get all schema sets for a given dataspace.rajesh.kumar4-0/+36
Issue-ID: CPS-1187 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0914aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-12-06Merge "Upgrade Open daylight yang tool to version 8.0.6"Toine Siebelink4-48/+75
2022-12-06Upgrade Open daylight yang tool to version 8.0.6emaclee4-48/+75
- changed classes according to upgrade of yang tool - changed methods in YangUtils class to accomodate change for jSonParserStream method - updated unit tests for the upgrade Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Ib62fe424150ed0695eed168e1ae21f4d9a61cdf4
2022-12-01Filter on private properties of CM Handlesleventecsanyi3-202/+0
- 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-18Added get APIs for dataspace.rajesh.kumar4-0/+90
Issue-ID: CPS-1186 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0829aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-11-02Ensure prefix is correct module prefixToineSiebelink7-12/+263
- Moved Prefix logic from RI to Service layer - Prefix is no PREFIX propety, not the moduel name! == RI (DB Layer) Changes - Removed prefix logic incl hazelcast - Added new basic ri-test for getDataNode and assert prefix is null - Updated exsiting ri-test to us getDataNode - Updated existing ri-test to only use " where really needed == CPS Service Layer Changes - Introduced PrefixResolver with clear and limited responsibility - Use PrefixResolver where needed - Cache prefix map per anchor, use cached entry when available - Disabled SONAR on new Regex == REST Layer - Use PrefixResolver where needed Issue-ID: CPS-1353 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ie16f0e1ee1c280f3eb69c9e64fab69a780fb692a
2022-10-27Read Performance Improvement - Using Native QueryToineSiebelink1-1/+0
- 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-26Creation of DataNodeBuilder with module name prefix is very slowToineSiebelink1-0/+1
- Created a new hazelcast distributed cache for anchor data config use cases. - Module name prefix is added for root data node only. - Cached module name prefix by anchor name on demand from database at first call. - Introduced a new cache holder to have module name prefix of diff. levels. Issue-ID: CPS-1326 Change-Id: I9072f5efdeea59843cd827ac556d3c0547a3a0cf Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-10-20CPS Validator Changeslukegleeson7-107/+88
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-19Improve code coverageleventecsanyi1-12/+13
- Fixed and refactored unit test to get over the 97% coverage baseline. - Removed unused exception. Issue-ID: CPS-475 Change-Id: I6dbcba58b880a584f6d9346e2aca6c763e5d2081 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2022-10-12Fix Id-searches endpoint performance degradationkissand1-3/+45
- 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-09-27Fix security bug in logslukegleeson1-8/+22
When a method with signature containing "AuthPassword" is passed, the value returned is changed to *********** in logs e.g... Execution time of : DmiProperties.getAuthPassword() with argument[s] = *********** ... Legacy code cleaning also included Issue-ID: CPS-1226 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ic4914eae7e5ed6d361287413d17abfe50a3788ae
2022-09-20Merge "Xpath to NodeId invalid"aditya puthuparambil1-5/+7
2022-09-13handle partial failure on batch state updatempriyank1-2/+2
- catching of failures on retry of individual nodes on batch update - test scenarios for the same Issue-ID: CPS-1232 Issue-ID: CPS-1126 Change-Id: I9dc13e7bbe44673f8ac14fbde08a85d6a5142487 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-13Handle partial failure (improvements)ToineSiebelink1-3/+3
- 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 failurempriyank3-5/+39
- 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-06Xpath to NodeId invalidGandhapu, Yashwanth1-5/+7
Issue-ID: CPS-1244 Signed-off-by: Gandhapu, Yashwanth <gandhapu.yashwanth@wipro.com> Change-Id: Ib091de1247cb0bb48d3157bf2c5becfc9189b773
2022-09-05Performance Improvement: Fix Insert Yang Resource IDs (Schemset)ToineSiebelink3-8/+8
- 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-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