aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test
AgeCommit message (Collapse)AuthorFilesLines
2022-09-19Merge "Get Node API fix for attribute values with '/'"Sourabh Sourabh2-12/+17
2022-09-14Get Node API fix for attribute values with '/'puthuparambil.aditya2-12/+17
Issue-ID: CPS-1179 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Iae53dbd2c6b421633355958aee3f2bbe321501a2
2022-09-13handle partial failure on batch state updatempriyank1-9/+27
- 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-17/+23
- 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-1/+22
- 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-05Performance Improvement: Fix Insert Yang Resource IDs (Schemset)ToineSiebelink1-0/+19
- 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-08-29Performance Improvement:save cmhandles capabilitympriyank1-2/+2
- 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-25Performance Improvement: Batch Update DataNodeslukegleeson2-46/+79
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-22Performance Improvement: Insert Yang ResourcesToineSiebelink3-61/+80
Insert batches of yang resources for a schema set into one operation add batch-sized tests to ensure batch-size logic is covered for all branches fixed legacy issues in changed test classes Issue-ID: CPS-1208 Issue-ID: CPS-1126 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I5b2a54ed0895999079975d777ba89d589ed4688b
2022-08-08Merge "Rename name column in yang resource table"Joseph Keenan6-13/+8
2022-08-05Rename name column in yang resource tableDylanB95EST6-13/+8
- Rename name column in yang_resource table to file_name - Refactor instances where it occures in code and tests - Add new changelog file to rename occurance Issue-ID: CPS-529 Change-Id: I2aff97410bdb041b90d8ceaeff75e562ef8d9238 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-08-05Upgrade Postgres Cps-CoreDylanB95EST1-1/+2
Upgrade postgres version to 14 in accordance with Seccom Issue-ID: CPS-897 Change-Id: I332c88f3c3e1ec3dd55afe31af5714b690b6bd07 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-07-27Distributed datastore solution for Module Sync Watchdogkissand1-1/+1
- use semaphore map in ModuleSyncWatchdog - increase test timeout, because it needs more time for hazelcast initialization Issue-ID: CPS-1015 Change-Id: I71feed8fbbd047af9fabba29a5f762a1f17a1c78 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-07-04Move persistence related methodsemaclee1-1/+0
-created new method in inventory persistence service for getting module references Issue-ID: CPS-1117 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Ic1f3c180a62a7211e19982d8f3570829db58370e
2022-06-30Add method to get YANG module sources for CM handleemaclee1-0/+10
- 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-09Handle errors during cm handle searchkissand1-18/+7
Issue-ID: CPS-1067 Change-Id: Iadc3413a29f9a455e658ec5bcaffc4881b7f7684 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-08Merge 2 'query' end points in NCMPkissand1-19/+0
- 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-02Add module name to cps core outputemaclee3-39/+110
- 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-12Add graceful shutdown for Session Manageremaclee3-22/+75
Introduce singleton session manager Add unit test for session manager Issue-Id: CPS-898 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Iaf91f1aa6c1ebfe0ab907e7f7d80a01e940a0fdd
2022-04-27Add methods to Lock Anchor entityemaclee3-22/+141
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-25Fix Absolute Path to list with Integer/String keyLathish5-89/+101
- Introduced normalizedXpath to normalize the xpath and cpspath - Introduced normalizedAncestorpath to normalize the ancestor path in xpath and cpspath - Added new condition in the ANTLR Grammar to capture the invalid path in the xpath - Introduced PathParsingException to replace the IllegalStateException Issue-ID: CPS-961 Change-Id: Ie10f5c6cfc466387e79eec184b933297d1d79587 Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
2022-04-08Refactoring/ Adding Tests for ValidationDylanB95EST1-3/+3
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 PropertiesJosephKeenan2-5/+41
-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-03-25Add Start and Stop sessions on JAVA APIemaclee3-44/+132
Issue-ID: CPS-899 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Idbeb922790824b1ca601d6d4798df45efa57d685
2022-03-10Removed ExtendedModuleReference Objectsourabh_sourabh2-12/+1
-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-02-28Merge "Bug fix for delete data node not working for root node"Bruno Sakoto2-2/+10
2022-02-28CPS-887 Decreasing performance of cmHandle registrationJosephKeenan2-13/+32
- 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-28Bug fix for delete data node not working for root nodeputhuparambil.aditya2-2/+10
Issue-ID: CPS-895 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Ia82b0df8e2cfdb9b396315a9d0e6c8f2b4deadcf
2022-02-15Fragment handling decreasing performance for large number of cmHandlesDylanB95EST1-10/+10
- allow fragmentEntity to set parent id (needed for optimization) - updated addListAlement and addChildDataNode to use new common optimized metghod to add to exsiting children - ensure methods are transactional - Refactored test around adding list elements to clearly define test checking the presence of grandchild element Issue-ID: CPS-886 Change-Id: Ic4381f0f7170ebd666d5bc8aa6ef2c4548d81766 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-02-09Merge "Fix for retry mechanism on concurrent CmHandle registration"Bruno Sakoto2-0/+126
2022-02-09Fix for retry mechanism on concurrent CmHandle registrationputhuparambil.aditya2-0/+126
Issue-ID: CPS-856 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Ie7c0033f2987166315611f8a286ae3978466c75f
2022-02-07Merge "Refactor Delete Anchor functionality"Renu Kumari3-7/+22
2022-02-03Merge "Test Scenario for replaceListContent"aditya puthuparambil2-139/+155
2022-02-02Refactor Delete Anchor functionalityRenu Kumari3-7/+22
- 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-02-02Test Scenario for replaceListContentToineSiebelink2-139/+155
-Improved a test scenarios for replaceListContent in CpsDataPersistenceServiceSpec -Removed redundant SQL Data -Used groovy shortcuts where posisble (no need for get...() methods when using Groovy :-) Issue-ID: CPS-868 Change-Id: I3d29bbb0c5d035c6f266cf31bf2886f1bcf5d48a Signed-off-by: mpriyank <priyank.maheshwari@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2022-01-28Refactored Delete SchemaSet functionalityRenu Kumari3-43/+55
- 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-25Replace gson mapper with jackson mappersourabh_sourabh3-7/+16
We introduced JsonObjectMapper (wapper) as Spring component. Issue-ID: CPS-751 Change-Id: I536b0771a3a263325e6907717baf6941d70c0d6c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2021-11-23CPS-314: Delete Dataspaceniamhcore2-5/+32
Issue-ID: CPS-314 Change-Id: I778e2b784c7b1ff3fecc1036425708dc4ec73227 Signed-off-by: niamhcore <niamh.core@est.tech>
2021-11-09Fix for get anchor identifiers by module namesniamhcore2-26/+28
Issue-ID: CPS-762 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Idf93f89f8427c5906c9f6b018633c8852b111821
2021-11-02Add get cm handles by modules names - service layerniamhcore1-5/+5
Issue-ID: CPS-644 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ic2a57df02d533a0066382c12c35be8d524b6cdad
2021-11-02Merge "Clean Up Code around List Nodes"Toine Siebelink2-93/+123
2021-11-02Clean Up Code around List NodesDylanB95EST2-93/+123
Make sure code refers clearly to List (whole) nodes or List elements incl. method names, parameter names, test descriptions etc. Issue-ID: CPS-756 Change-Id: Ic9dae6565c0e84c1ba4c2d6e891d3ea307f589da Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-10-29Add get cm handles by modules names - persistence layerniamhcore2-0/+80
- Add sql query to anchor repository - Add sql query to yang resource repository Issue-ID: CPS-644 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I85ab1fcb343e6be77628695153d8d9f303dc3112
2021-09-29CPS-594: Exception when updating list node PATCHDylanB95EST2-6/+77
SQL ConstraintViolationException updating the list node element using PATCH List node API - Took advantage of replaceDataNodeTree to replace list node children recursively - Added functionality to exclude the updated dataNodes when removing the list node descendants Issue-ID: CPS-594 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Change-Id: Idbf580fab05581513b52327d6895b9e39b4cf470 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-09-21Merge "Updating fetch all yang modules queries and tests"Toine Siebelink2-5/+6
2021-09-20Updating fetch all yang modules queries and testsniamhcore2-5/+6
Issue-ID: CPS-670 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I11e6da303320aea096a135eb93e270a5fd014740
2021-09-14Add test for missing code covereageToineSiebelink2-8/+28
- Add test for error scenarios and otehr mising tests - set up for SpringBean testing - some small typo fixes - fixed some SQ violations Issue-ID: CPS-656 Change-Id: If33f215c8ecaf090f27145005cc1aa7f0331d0f4 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2021-09-07P2 - Get module names and revisions rest layerniamhcore1-2/+2
Issue-ID: CPS-485 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I1bcf45902207d0dba6b5dfe8277cb06571694db3
2021-09-06P1 - Get module name and revision persistence layerniamhcore3-26/+48
Rename ModuleReference to ExtendedModuleReference Create new ModuleReference class (moduleName and revision) Update existing sync model flow to use new module reference class Create native query to get module name and revision Issue-ID: CPS-485 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I0d0da7742ceef3a68e83a5dd4852091e6adf138b
2021-09-03Ensure Leaf value retains Integer typelukegleeson1-1/+27
BUG GSON.fromJson() is unable to parse numerical values and defaults values to Doubles Added a datatype conversion which forces Double values which can be Integers to being Integers Issue-ID: CPS-591 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I72d54ad06823a8755ee407f39104f3edf9a8cc75