summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main
AgeCommit message (Collapse)AuthorFilesLines
2021-10-18CPS-475 - fix sonar smellsJosephKeenan1-1/+1
Issue-ID: CPS-475 Change-Id: Ifbf14eaa93a8befa262a24499ab72b6c4cc2441c Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2021-09-29CPS-594: Exception when updating list node PATCHDylanB95EST1-37/+90
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-20Updating fetch all yang modules queries and testsniamhcore1-16/+18
Issue-ID: CPS-670 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I11e6da303320aea096a135eb93e270a5fd014740
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 layerniamhcore2-13/+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-06Fix Sonar Qube Violationslukegleeson1-3/+3
Issue-ID: CPS-475 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Iffd7b24cf42db73a8b93c4d1f2860e41a82e565d
2021-09-03Ensure Leaf value retains Integer typelukegleeson1-3/+20
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
2021-08-18Merge "CPS-508: Create anchor/schemaset from new modules and existing modules"Niamh Core4-1/+97
2021-08-17CPS-508: Create anchor/schemaset from new modules and existing modulesshivasubedi4-1/+97
Issue-ID: CPS-508 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: I8023a093334b77d0220f7c7d94de66863f5ba6dd
2021-08-17Delete list-node p1 service and persistence layerslukegleeson1-1/+29
Persistence Layer of delete List-Node Content Service Layer of delete List-Node Content Updating of deprecated FragementRepository.getOne() method to FragmentRepository.getByID() in CpsDataPersistenceServiceIntegration.groovy Remove Runtime Exceptions thrown from CpsDataService.java javadoc Issue-ID: CPS-361 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ib5762e73a6e8620c50c2e07b00086b9287770bc3
2021-08-17Merge "CPS-566: Can't access grandparent node through ancestor axis"Niamh Core1-3/+3
2021-08-16Merge "Issue with CPSData API to add an item to an existing list node"Niamh Core1-0/+14
2021-08-16Issue with CPSData API to add an item to an existing list nodeDylanB95EST1-0/+14
Issueing Fix for Bug around 2 Api's /cps/api/v1/dataspaces/{dataspacename}/anchors/{anchor-name}/list-node and cps-ncmp/api/ncmp-dmi/v1/ch where child data nodes do not get persisted to the DB. Issue-ID: CPS-524 Change-Id: I4e433a2fddd56b8714b798a2d5b0e5fb683e3205 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-08-16CPS-566: Can't access grandparent node through ancestor axisshivasubedi1-3/+3
Reason for this change is listed in the jira. Issue-ID: CPS-566 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: I25315791cd0b8f5c1124578ab486afbdb3ba4c47
2021-08-05CPS-506: List all known modules and revisionshivasubedi6-46/+205
Issue-ID: CPS-506 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: Id76fecc7dd10625cc3ecb940b1181b1e8bf829a1
2021-08-05Merge "Implement DMI Registration (NCMP-Side)"Niamh Core4-2/+58
2021-08-03Implement DMI Registration (NCMP-Side)DylanB95EST4-2/+58
Implementing registration of CM-Handles to NCMP from DMI CM Handles are Written to fragment tables Moved NetworkCmProxyDataServiceImplSpec.groovy as it was not in the same package as the class it was testing. Meaning it didn't cover this when it came to code coverage Have included Json structure validation also within open api Deprecating old API's along with old API Methods Issue-ID: CPS-442 Change-Id: I819b9bf65280b1d968d3b75ca5ef2f9eb5617579 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-07-22Merge "Fixed inconsistent data issue with replaceNode"Bruno Sakoto1-18/+50
2021-07-21Fixed inconsistent data issue with replaceNodeRenu Kumari1-18/+50
Issue-ID: CPS-501 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Ic4785d97013729b80f81aca3de4430bdaa8155fa
2021-07-20Support text() conditionToineSiebelink4-46/+161
- Added Antlr parsing of text() condition (as an optional additional to any query) - Implemented text-condition combined with descendants - Refactor descendants queries into using one more flexible Custom (native) Query builder - Refactor ALL cpsPath queries to now use FragmentRepositoryCpsPathQuery (custom query builder) - Refactor Antrl code to simply parsing of cpsPath and allow all combinations (no more query types, addresses CPS-436) - Minor clean up of some minor convention issues in CpsAdminServiceImplSpec.groovy (found during groovy demo) - Update .rst documentation of xPaths - Fixed incorrect matching of additional list indexes using more precise SIMILAR-TO regex in postgreSQL - Documented special chararter limitation (CPS-500) - Checked for consistent use of term 'CPS path' in documentation and error message - Included (updated) copyright in all .SQL test files Issue-ID: CPS-452 Issue-ID: CPS-436 Issue-ID: CPS-500 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: If422d25cafd2850d25c9a28dea16ba7a5f93dddb
2021-07-13Fix sonar qube violationsniamhcore1-2/+1
Issue-ID: CPS-475 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: If55140bbf3e5b28e8e9334838d1a81b74619c99d
2021-07-13Editing of Nordix Licenses to ONAP guidelineslukegleeson10-19/+29
Issue-ID: CPS-489 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I415534515b3d8325f41d5dc1d02c6e0ae70c6cf1
2021-07-09Support concurrent requests to create schema setsBruno Sakoto1-2/+93
Issue-ID: CPS-466 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I2ecf98b9aa5a6097518e616c08f8bb2a2182a613
2021-07-06Merge "Added parent is null condition when searching for root fragments"Bruno Sakoto2-5/+8
2021-07-05Added parent is null condition when searching for root fragmentsRenu Kumari2-5/+8
Issue-ID: CPS-479 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: I25fd91936e1b08cfc3bff69c7169392e724ed156
2021-06-30Fixing typo in anchor nameniamhcore2-2/+2
Issue-ID: CPS-353 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I1d9977030176cb2c591f46e2a6a45f398a949b0a
2021-06-24create yang model for dmi-registrytragait7-0/+174
Signed-off-by: tragait <rahul.tyagi@est.tech> Issue-ID: CPS-352 Issue-ID: CPS-353 Change-Id: I57637aa58f8b3b5f8faaca30dc9006e7547b0144
2021-06-18Missing licence info added in pom fileshivasubedi7-0/+115
- Added licence info to files that were missing it - Fixed licence info to match with the creator of the file Issue-ID: CPS-467 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: I1c0eaedb2c87743a61a1cd58f33b0d0d04b3a977
2021-06-01Introducing Antlr4 for cpsPath parsingToineSiebelink3-204/+10
-created new module for cpPathParser -added antlr rule for cpsPathWithSingleLeafCondition -added antlr rule for cpsPathWithDescendant (and with leaf conditions) -added antlr rule for ancestor axis -added unit test (copied from existing CpsPathQuerySpec) -udpated cps-ri to use new cpPathQuery from parser module -'imported' lexer rules from publix xPath grammar -Re-used existing CpsPathException but conversion happens in cps-ri to prevent additional dependency in cps-path-parser module Issue-ID: CPS-376 Change-Id: I2c5df98969402cbf69f6573c52705879450ce606 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2021-05-24Replace list-node content (part 1): CPS Service and persistence layersRuslan Kashapov1-0/+25
Issue-ID: CPS-362 Change-Id: I669c9fc6ef67c1992fe95e17a765f0c616b00f7e Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-05-24Adding Atomic Grouping to Discard backtracking once matched as part of Sonar ↵DylanB95EST1-2/+2
Security Hotspot Fix Issue-ID: CPS-89 Commit-ID: b23ee774ae2a2305f1feea747931879588f9cada Change-Id: I1f9d54246370b0c0bc8ec3d167eaed27ad58471b Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-05-21Adding Possessive Quantifier to Regex to prevent backtrackingDylanB95EST1-2/+2
Issie-ID: CPS-89 Commit-ID: 22dbd115593cd429b1b75af2000310ce79cfbf10 Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Change-Id: I12f8aec77e9a4faa62234b7108617d47e4ed63fd
2021-05-21Update SonarQube Code SmellJosephKeenan1-1/+1
Issue-ID: CPS-89 Change-Id: I3a3e34b41ed98a0ab2c1accd438e2ec1d4a8d1cf Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2021-05-11Create list-node elements (part1): CPS service and persistence layersRuslan Kashapov1-1/+25
+ fix integrity violation exception exposed out of persistence layer + refactor CpsDataServiceImplSpec to eliminate repeated code Issue-ID: CPS-360 Change-Id: Id70341fe54bf3c31af661f6aae04a7a80f4a1e9d Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-05-08Merge "Add CpsPathQueries.sql and create data inspired by the bookstore model"Bruno Sakoto1-1/+1
2021-05-07Add CpsPathQueries.sql and create data inspired by the bookstore modelniamhcore1-1/+1
Issue-ID: CPS-363 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I1eaee97d6ced7b0c0676de19d74b4d8262a5e811
2021-05-07Fix cps ran yang data modelBruno Sakoto8-1/+4539
* Add a liquibase change set to update cps ran model data * Rename model "cps-ran-schema-model@2021-01-28.yang" to be compliant with yang specifications related to file layout https://tools.ietf.org/html/rfc7950#section-5.2 * Improve yang validation error handling to provide more information about the validation failure in the request response * Add csit test to verify cps ran model retrieval Issue-ID: CPS-377 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I4f0e337b50d79e81f895eb32f09ae9cb5d9d8a70
2021-05-04Fix ancestor cps path to recognize ancestor list valueniamhcore1-2/+2
Issue-ID: CPS-305 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I28f7f0c120a39190068a3192dccf0a1a6fbfeaf2
2021-04-30Implement cps path query to get ancestor by schema node identifierToineSiebelink3-25/+73
Cleaned up some legcy issues in related testware Issue-ID: CPS-305 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ic4b21308478f399e3a454dbcd73943e077b0f3f2 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2021-04-30Fix Get descendent to support xpaths that end in list valuesputhuparambil.aditya1-2/+3
Issue-ID: CPS-367 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I3234afd8b8b69c5a3c87db1669d9b304f9fcaa49
2021-04-28Fix Code smellsshivasubedi4-42/+39
Issue-ID: CPS-89 Change-Id: Ib1b6fbc6b6d712f169100825683e6db3e7c85cb9 Signed-off-by: shivasubedi <shiva.subedi@est.tech>
2021-04-26Merge "Leaf String value comparison matches mix of single and double quotes"Rishi Chail1-4/+11
2021-04-26Get Data under anchor using single rootRishi.Chail2-1/+19
Issue-ID: CPS-325 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: Id8da3d767199c5767c625b55d175ac6791dcca48
2021-04-26Leaf String value comparison matches mix of single and double quotesshivasubedi1-4/+11
Issue-ID: CPS-345 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: Id6db86817878ed5ed8ccaed4a9a71c5a06d6f97c
2021-04-22Implement ends with cps path query to support multiple attributes with 'and' ↵puthuparambil.aditya4-7/+65
condition Issue-ID: CPS-309 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I80bf2650e2cd979b806fc29302fc5cb295f65241 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
2021-04-15Fix "ends-with" query syntax to conform with xPath definitionToineSiebelink4-13/+15
"ends-with" is HOW we resolve it in sql query. 'descendant anywhere' is the correct Path name for the '//' operator - Updated method names, variable names, test description to reflect the correct terminolgy - Udpated query to always perfix the target (descendant name) with an '\' so it alwasy only matches whole node names - Updated regex for cpsPath to NOT accept triple /// (as per xPath this is invalid since a ndoeName cannot start with or contain a node separator Issue-ID: CPS-336 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I9f181d6986d038311b839e3f9c5afc4237c7d347
2021-04-09Fix liquibase changeset so we can upgrade from H to IToineSiebelink3-3/+33
- Undo (accidental) changes in orginal liquiubase cahnge set (03) (see commit : https://gerrit.onap.org/r/c/cps/+/119061) - Add new changeset for required changed related to checksum calcualtion - There is a incorrect field name (checkstyle instead of checksum) in 03-loadData-schema-set.yaml but it seems to be ignored/overruled by the .csv import. If we change it liquibase report an checksum error during upgrade i.e were are not allowed to touch the file! Issue-ID: CPS-310 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I00c94e3f1ddab7c9c54aac1294019ec7cd51634f
2021-04-07Merge "Fix security hotspots n Regex"Bruno Sakoto1-1/+2
2021-04-07Delete anchor part 1: service and persistence layersRuslan Kashapov1-3/+20
Issue-ID: CPS-312 Change-Id: I10ab5a2d115ffdf8179a99b6ec712f3eccfb5f13 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-04-06Fix security hotspots n RegexToineSiebelink1-1/+2
Attemting to fix security risks indentified by SQ by reducing unlimited spaces to 0-9 spaces See https://sonarcloud.io/project/security_hotspots?id=onap_cps# I think the proposed regex changes are acceptable and better then adding @SupressWarning annotation (have to test by merging this commit as issues are not spotted when using SonarLinit locally?!) Issue-ID: CPS-89 Change-Id: I00bbacb3145650ab7d21d13152c08d5ccf0c04fa Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>