summaryrefslogtreecommitdiffstats
path: root/cps-service
AgeCommit message (Collapse)AuthorFilesLines
2023-03-01Add DataNodeNotFoundException to deleteDataNodesdanielhanrahan1-0/+38
Current implementation of NCMP handle de-registration relies on DataNodeNotFoundException being thrown to report errors. - Make deleteDataNodes throw DataNodeFoundExceptionBatch - Update performance test timings Issue-ID: CPS-1481 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib833bdb4a23d24e1784bdaf4e5e5e8a9acb41c54
2023-02-27Expand CPS Service Integration Test (framework)ToineSiebelink3-15/+41
- Created package structure - Created several test bases - Created complete test set for Admin service - Created first test for Data service - Added human-readable toString() to FetchDescendantsOption for test reporting and debuging purposes - Renamed fetch descendants (enum) direct children option for consistency with others options - TODO: Add sample performance test (and base) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I75317686161be41662b6bf81314a9cd425ddd6eb
2023-02-20Merge "CPS-1401 Implement V2 of GET Data Node API"Luke Gleeson6-54/+77
2023-02-17CPS-1401 Implement V2 of GET Data Node APIarpitsingh6-54/+77
- Modified the GET Data Node API so it returns all the data nodes when xpath set to root "/" - Fragment Repository now returns a collection of Fragment Entities - Instead of returning only the first Fragment Entity now all fragment entities are returned when xpath is set to root - The Fragemnt Entities are further processed to a Collection of Data Nodes. As opposed to singular Data Node in current implementation. - Finally the DataRestController also returns a Collection of Data Nodes when xpath is set to root and valid data is present - Response body changed from JSON object to JSON Array. - Exception handling for invalid xpath and non-existing xpath is now done separately at persistence layer. - Refactored code against CPS-1422 - Deprecated getDataNode method from Service and Persistence layer - Modified V1 of Get Data Node API to use the getDataNodes method and get the first data node from the collection returned. - Modified NCMP to use getDataNodes method - NCMP still does not support multiple data nodes. It retrieves the first data node from the collection returned by getDataNodes Signed-off-by: arpitsingh <as00745003@techmahindra.com> Change-Id: I494a5740a53f65376d135fcb9f1e2e8900a2803e
2023-02-16Improve batch delete schemasets performancedanielhanrahan10-17/+131
- Bulk delete anchors and datanodes associated with schemasets. Improves de-registration performance by approx 10% Issue-ID: CPS-1423 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie38e8b4c64356bf5935d8c7a5d3f5bfa73fb1714
2023-02-15Bulk delete schemasets in CM handle deregistrationdanielhanrahan5-6/+69
- 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-08Release Process Step 7mpriyank1-1/+1
- updated pom to 3.2.3-SNAPSHOT - updated version.properties and updated the release notes to properly depict the correct version Issue-ID: CPS-1476 Change-Id: Ied60194c6dd4153b58a43715cb729ad75b8e12bf Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-02-01Create plural version of deleteDataNodedanielhanrahan4-8/+52
- Add method to CpsDataService to batch delete data nodes and lists - Use native queries to batch delete fragment entities by xpaths, for data nodes and lists - Add performance tests for batch delete - Refactor FragmentNativeRepository - Add single-column version of createTemporaryTable - Renamed metric cps.data.service.datanode.batch.delete to cps.data.service.datanode.all.delete Issue-ID: CPS-1438 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1851f9c7ef0b1be4bd421b3352d9697a2dd23f79
2023-01-31Introduce InstrumentationToineSiebelink11-63/+239
- Add instrumentation related dependency - Added Timed Instrumentation - CPS-Service Crud methods - CPS Yang parsing - NCMP Registration methods - NCMP Events handling - Remove manual Gauge for YanResources Cache as (better!) instrumentation is already built into the 3PP - Sorted dependecies alphabetically (as we used to enforce, to prevent duplicates) - Added ## P E R F O R M A N C E T E S T R E S U L T S ### mini report - (unrelated) test improvement (because of bug that turned out to be invalid) Reviewers: Sourabh,Priyank, Luke Issue-ID: CPS-1457 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I34b20bece2f59488b022b8effa9470704c57be4d
2023-01-27Update version files for release processseanbeirne1-1/+1
- Updated version.properties - Updated release-notes - Updated pom files Issue-ID: CPS-1835 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I0f837ac41d24b41d7c2b9e3dfe2dacc550c0aafa
2023-01-23Merge "Added depth parameter in query nodes API."Toine Siebelink3-2/+57
2023-01-23Added depth parameter in query nodes API.rajesh.kumar3-2/+57
Issue-ID: CPS-1381 Change-ID: I73f97f986a817d423f93a8d922dcd9647b1206bb Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-01-16Merge "Fetch CM handles by collection of xpaths"Sourabh Sourabh3-0/+34
2023-01-11Fetch CM handles by collection of xpathsseanbeirne3-0/+34
- Added FragmentRepositoryMultiPathQuery - Removed Hibernate method for same - Added perf. test - Handle escaping of single qoutes in sql-data - Increased timing for path paser performance test Issue-ID: CPS-1422 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: Ibea12a44bffd29ed43cc1560b507d1fa7e968b8b
2023-01-09DocBuilderFactory one instancempriyank1-3/+7
- setting the property for DocumentBuilderFactory only once. Issue-ID: CPS-1435 Change-Id: Ib1509e86c2f5572d184945dc55f1818a7147c259 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-06Local DocBuilderFactory fix XEEmpriyank1-7/+11
- local DocumentBuilderFactory fix for prevention of XML External Entity Issue-ID: CPS-1435 Change-Id: Ib88268edc5975bf0fe4e3e56bc704f266280af4b Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-05Test XEE in SonarQubempriyank1-10/+7
- test by removing the attributes for transformerfactory to check if sonarqube gives the vulnerability or not Issue-ID: CPS-1435 Change-Id: I087796b1bbc465655fd741f678a9b2b417d174dd Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-05Local DocumentBuilderFactorympriyank1-15/+5
- trying to use local DocumentBuilderFactory without any condition Issue-ID: CPS-1435 Change-Id: I209a31633427cbf6fdac3e465154a1b89b9ca89f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-05XEE prevention with all propsmpriyank1-1/+8
- include all properties to prevent XEE for DocumentBuilderFactory Issue-ID: CPS-1435 Change-Id: I5a740f34072af348fe2df282fba7babeff4299d8 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-05Document and Transformer Factory refactormpriyank1-4/+13
- Extracted out document and transformer factory code Issue-ID: CPS-1435 Change-Id: I7c296a797871b0724f6de51833396a5d822c7d76 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-04XEE remove few propertympriyank1-3/+1
- remove and test if it fixes the issue Issue-ID: CPS-1435 Change-Id: Id70509494c105c3e73e8217d0bfb6334aa0cc609 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-04XEE add more propertympriyank1-0/+2
- adding few more properties to fix the problem Issue-ID: CPS-1435 Change-Id: I2e952b38bae5dab396911ea1ce4a1125d0402369 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-04XXE preventionmpriyank1-4/+15
- xml external entity prevention in the XmlFileUtils - setting the features only once for the document builder factory Issue-ID: CPS-1435 Change-Id: I06f9ac4bcdb0a90262f237489c6c50d8fde33c0d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-03Minor documentation fixmpriyank1-1/+1
- minor tag fix for param in documentation Issue-ID: CPS-1435 Change-Id: I23ff1ebce54ee30cd84a58be0340ab41ad32b69a Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-12-23Fix SonarQube warningsToineSiebelink3-121/+137
- fixed most new warnings (required some rerfactoring and renaming) - had to change method order (becasue private/public) which loosk liek a big change because gerrit cannot match thee old/new correctly :-( - some reformatting to improve readability - used autoclosable fro streams - use of deprecated ODL methods will be addressed by separate commit (Lee-Anjella) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I4b2f74492ac9e2c644659edab1e7ff05dddcbd20
2022-12-22Merge "Temp Table Creation improvements"Toine Siebelink1-0/+1
2022-12-22Merge "XML content on create anchors node support"Toine Siebelink12-65/+597
2022-12-22Temp Table Creation improvementsToineSiebelink1-0/+1
- extracted methods for more generic temp table creation - optimized - added perf test on use case that depends on temp table creation - had some doubts about stopwatch use in recent tests, but was all OK, just renamed some Issue-ID: CPS-1422 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I22cabb9b0ba1b0aa8576a2d756d77af46eebc1b0
2022-12-22XML content on create anchors node supportMichal Jagiello12-65/+597
Add XML content type support on anchor node creation. Issue-ID: CPS-1257 Change-Id: I7e7a9a1961b6e81de93a4e32e842b47f8a163a09 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Signed-off-by: Lee Anjella Macabuhay <lee.anjella.macabuhay@est.tech>
2022-12-22Add fix for posting nodes with xPath with '/'emaclee4-17/+16
- YangUtils method changed from using REGEX to cps path parser - unit test added for cps path util Issue-ID: CPS-1433 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Ibb9efdd09423f9bade4a4a557d7d9ed49aa44ef4
2022-12-15CPS-341 Support for multiple data tree instances under 1 anchorarpitsingh10-111/+191
- Updated the parseJsonData method so it can parse JSON with multiple data trees, now it returns a ContainerNode - ContainerNode holds a collection of NormalizedNodes - Updated DataNodeBuilder and FragmentRepository as well to support collection of NormalizedNodes - Added new methods in CpsDataPersistenceService to store multiple Data Nodes - Added new test cases - Updated existing test cases and fixed code coverage - Addressed comments from previous patch Issue-ID: CPS-341 Change-Id: Ie893e91c0fbfb139a1a406e962721b0f52412ced Signed-off-by: arpitsingh <as00745003@techmahindra.com>
2022-12-13Merge "Fixing SonarQube violations"Toine Siebelink4-9/+12
2022-12-12Fix DataNodeBuilder for ChoiceNodesLena Peuker4-1/+67
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-12Fixing SonarQube violationsleventecsanyi4-9/+12
- Code smell fixes Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Issue-ID: CPS-475 Change-Id: I4b47ece82aed7e4b31aaa28e601e419fb6f06718
2022-12-09Merge "Added API to get all schema sets for a given dataspace."Toine Siebelink5-0/+58
2022-12-09Added API to get all schema sets for a given dataspace.rajesh.kumar5-0/+58
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 Siebelink6-55/+82
2022-12-06Upgrade Open daylight yang tool to version 8.0.6emaclee6-55/+82
- 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 Handlesleventecsanyi5-324/+1
- 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.kumar5-0/+108
Issue-ID: CPS-1186 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0829aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
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-11-08Node API - GET Method performance issuesourabh_sourabh1-2/+2
- Modified toDataNode call based on fetch descendants option. - Used fragment extract to build fragment entity. - Modified data set to have correct parent id for descendants. Reviewers : Toine, Priyank and Joe Issue-ID: CPS-1171 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I27a537fe72dd396722e6cfde7d8c454ed2579ec0 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-11-02Ensure prefix is correct module prefixToineSiebelink15-23/+489
- 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 Changeslukegleeson14-595/+203
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 coverageleventecsanyi3-14/+33
- 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-17Bump the minor CPS versionmpriyank1-1/+1
- Bumped the CPS version from 3.1.5-SNAPSHOT to 3.2.0-SNAPSHOT - Step 11 of the release process. Issue-ID: CPS-1318 Change-Id: I0dce0070afcc019d2562c2f3ab9fe02207dcd86b Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-10-13Merge "Fix Id-searches endpoint performance degradation"Toine Siebelink4-6/+123
2022-10-12Fix Id-searches endpoint performance degradationkissand4-6/+123
- 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>