aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main
AgeCommit message (Collapse)AuthorFilesLines
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>
2021-03-31Fix to store data for 2 anchors using same modelBruno Sakoto2-1/+54
This change deletes the database index on fragment table for dataspace and xpath. Issue-ID: CPS-300 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I586cc38f7ed00a16f751ed4dbe3b514226c62657
2021-03-24Internal Server Error when creating the same data node twiceniamhcore3-8/+13
This change adds a generic exception handler class for a already defined object and handles a JsonSyntaxException. Issue-ID: CPS-290 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ie645237b5dd5b8e2b1d074c5613e7da560f57484
2021-03-18Fix code smellsRishi.Chail1-2/+1
1. removed typedefs annotation 2. chnaged final string constant name Issue-ID: CPS-89 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I524aa8c13e8bb4c6a00d810c6e89b30a48f37d10
2021-03-11Fix for security hotspot related to wek cyptographyputhuparambil.aditya2-5/+6
https://sonarcloud.io/project/security_hotspots?id=onap_cps&hotspots=AXfObcurA2pnU4Plp4-j Issue-ID: CPS-286 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I31012f81797396682dbccae0e4992a33bac806c7
2021-03-10Fix SOnarQube bug on RegexToineSiebelink1-5/+9
- Regex included unlimitted repetition is now limited to 99 99 nested yang container should sufice, in my experience in 5G 20-30 levels is the max I have seen we can always record it as a 'known limitation' -tried to improve the redability of the Regex using constant names - Added edge-case senarios testing related to query regex Issue-ID: CPS-89 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ic3442bc8ca22fe66976948f9913e033245a0e41c
2021-03-09Improve error reporting for invalid cps path queryniamhcore1-4/+4
Issue-ID: CPS-276 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I0e0abbaff32c936c67fc1092dc8385a0bc5ae49e
2021-03-04CPS-265 - Update cps path query to support 'ends with'niamhcore4-12/+68
Issue-ID: CPS-265 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I604191feaad820983d86e6fd844f543f51096a4e
2021-03-03CSIT: Integration tests for CPS CoreRuslan Kashapov1-0/+10
+ also fixes issue with fragment_id sequence not reflecting data loaded Issue-ID: CPS-261 Change-Id: If590d6a0859a1acc9005dd2da952b7dd93a23059 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-03-02CPS-265 - updating cps path to support include-descendants option.niamhcore1-3/+3
Issue-ID: CPS-265 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I9e9b84760dbc8b5eb4b31ab972fdb2d186c6bb48
2021-02-24Schema creation and Data pre-load to on cps-xnf-proxy start-up using liquibaseputhuparambil.aditya13-85/+3082
1. Common change-log master used only to specify the different change sets. 2. Specific change set created for cpsTables creation and for loading data to each cps component like dataspace, schema-set, anchor and dataNode 3. The data load cabability is configurable in the sense, it will be trigered only if the label is specified in the application.yaml Issue-ID: CPS-173, CPS-242 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I44c640ce50b7203f5799d722149397478a98bc05
2021-02-19Persistence layer - Query Datanodes using cpsPath that contains contains a ↵niamhcore3-0/+100
leaf name and a leaf value Issue-ID: CPS-231 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I9bd483a4b76e233ab6c64b3ef8aacb593e4e9da0
2021-02-16Data fragment update by xpath #2 - persistence layerRuslan Kashapov2-10/+42
Issue-ID: CPS-58 Change-Id: Ifc4580936d06c6907d6b5ab20657063b6707ccbe Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-02-04Fetching data node by xpath - persistence layerRuslan Kashapov1-2/+40
IssueID: CPS-71 Change-Id: I88f76cf36ef8a1e4ccbd4f1eac8867e93ed5be82 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-25Add DataNodeDoesNotExist Exceptionniamhcore1-2/+2
Issue-ID: CPS-182 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I05fdd0fbc207e4806c187b96d35d7b6c54b795ea
2021-01-21Remove Module TableRishi.Chail1-13/+1
Issue-ID: CPS-185 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: Id93b3ec4dec27184bc46767146d9801063f54916
2021-01-22Add another Child to a Fragment that has already at least one Childniamhcore2-10/+40
Issue-ID: CPS-164 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ib6a4f8ce4fc9247726e016ecaa0b1e45ff11bdbb
2021-01-22Merge "Introduce caffeine cache"Toine Siebelink1-2/+1
2021-01-21Introduce caffeine cacheClaudio David Gasparini1-2/+1
Issue-ID: CPS-163 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: Iff9b831c2d895d82aff419f60a8dd86a38b545d0
2021-01-21Fix sonarqube violationsToineSiebelink1-1/+1
Issue-ID: CPS-89 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I8ce5f6fedb5d7c4d6c17d419b759b9d836f94ae9
2021-01-18Delete schema set - persistence layerRuslan Kashapov4-0/+50
Issue-ID: CPS-121 Change-Id: I6fc8343969971b76d7f78ad202dd8ec1058c03fb Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-18Persisting data nodes (fragments tree structure)niamhcore2-2/+97
Issue-ID: CPS-136 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I559afad41bf0eab1cc98c777a418b348c9c1b81c
2021-01-15Retrieve the SchemaSet resources for an AnchorRishi.Chail3-2/+29
Issue-ID: CPS-135 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: Ib7c17c5180212c7dd3b96cf27797c84166041cf9
2021-01-13Rename entity artifacts, remove obsolete entitiesRuslan Kashapov15-349/+158
Issue-ID: CPS-162 Change-Id: I10604e12a01f22930278118830eed53f5a2b159c Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-13Decouple anchor from fragment in persistence moduleRuslan Kashapov6-41/+134
Issue-ID: CPS-161 Change-Id: Ia446b26ee4eca9281e86bd2be3dd6836aa201597 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-12Enable spotbugs and fix spotbugs warnsClaudio David Gasparini1-1/+2
Issue-ID: CPS-159 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: Iee572fd740689a172ca599123b0751b5e909223a
2021-01-11Rework CpsModulePersistenceServiceClaudio David Gasparini1-5/+2
- remove getModuleReferences - provide service returning YangTextSchemaSourceSet Issue-ID: CPS-21 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I61cf6450c8ed8a5154990ea19467e016dc1155b4
2021-01-08Merge "Remove depredcated classes"Bruno Sakoto2-97/+0
2021-01-07Remove deprecated methodClaudio David Gasparini1-7/+0
Issue-ID: CPS-130 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: Id774f8b080eeb5dcfd78278ed6ef3831d44db711
2021-01-07Remove depredcated classesniamhcore2-97/+0
Issue-ID: CPS-130 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I00974cc565b7eaa07fdf6a03b074c0317d62e077
2021-01-06Create dataspaceRuslan Kashapov1-0/+10
Issue-ID: CPS-134 Change-Id: Ie7f00f9c322a12a6c2a71c1407f6970a7dd24d2d Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-06Merge "Create schema set REST API and service level"Toine Siebelink1-16/+4
2020-12-24Create schema set REST API and service levelRuslan Kashapov1-16/+4
Issue-ID: CPS-123 Change-Id: Ie6d5fd4755454331415af7b80eaf85925efab395 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-12-17Merge "Redirecting logs to console"Toine Siebelink1-48/+0
2020-12-17Redirecting logs to consoleniamhcore1-48/+0
Issue-ID: CPS-10 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ib10a813cf33ad634fc9992b3b3a54a20e2323be1
2020-12-17Associate anchor to schema setRuslan Kashapov5-30/+38
- db schema updated - db layer tests provided for ancor create and reading by dataspace - anchor model is removed from rest api as extra - api/spi updated to use string references instead of object Issue-ID: CPS-99 Change-Id: Ideeb83fa9e91ec1816308d8327a6589b999c64c5 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>