aboutsummaryrefslogtreecommitdiffstats
path: root/cps-service
AgeCommit message (Collapse)AuthorFilesLines
2023-11-07Bump cps to 3.4.0-SNAPSHOTsourabh_sourabh1-1/+1
- bump cps to 3.4.0-SNAPSHOT and update the docs Issue-ID: CPS-1936 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I6a99662c72b236e49abcd79201156bf0a9572de7
2023-11-06Bump cps to 3.3.10-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.3.10-SNAPSHOT and update the docs Issue-ID: CPS-1954 Change-Id: Id62f59d4b3c42ea6f791fad85f0700089e3125b9 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-11-03[BUG] Set Hazelcast class loaderdanielhanrahan1-0/+1
ClassNotFoundException is being thrown during CM-handle registration when running the cps-application JAR. This fixes the issue by using the class loader for the CPS classes. Issue-ID: CPS-1933 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I02e2d19d9f668f0c4af36e9061e68f9b9ddb9434
2023-10-23Introduce and use new Hazelcast map pt. 2sourabh_sourabh1-1/+0
- modified ModuleSyncService - created ModuleSetTagCacheConfig and tests - ensure both Create and Upgrade cm Handle use cases work - Moved inventory pkg to its right patha as production code. Issue-ID: CPS-1859 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I173dcd81fe2e74d86d85365b2ead461302cad974 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-10-16Clean up Dependenciesegernug1-26/+25
Clean up of dependencies into logical orders and compile/test statuses Issue-ID: CPS-1873 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I90ad49b7f1362e8f5b7006b85013c0bdf1b4d4ef
2023-10-11Expose REST endpoint to update YANG schema set using moduleSetTagsourabh_sourabh3-4/+4
- Added new schema to upgrade model into component. - Modified Ncmp rest input mapper to add upgradedCmHandles attributes. - Modified cm handle state mapper to add new lock reason. - Added new method to parse and upgrade Cm handles in DmiRegistration. - YANG data converter is modified to add "module-set-tag" atribute. - Cm handle new query method is added for cps path without appending ancestor. - Modified setCompositeStateForRetry to add lock reason. - New lock reason category is added. - Existing module sync service is modified to upgrade the model "syncAndCreateOrUpgradeSchemaSetAndAnchor". - Sync util method "getModuleSyncFailedCmHandles" to modified to add another lock reason "LOCKED_MISBEHAVING". - Added new attribute "UpgradedCmHandles" into DmiPluginRegistration and DmiPluginRegistrationResponse. - New attribute "moduleSetTag" is added into NcmpServiceCmHandle. - New model "UpgradedCmHandles" is added. - New method "updateSchemaSetWithExistingModules" is added into cps module service to update cm handle with exsting model. - Code coverage is reducced to 96 percentage that would be addressed and pushed into new patch. Issue-ID: CPS-1798 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I540acb404e38fc434de87a0d959bfde710a18b03 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-10-10Merge "JSON list support when updating multiple datanodes"Toine Siebelink2-27/+15
2023-09-29Update release version in release notesegernug1-1/+1
Issue-ID: CPS-1903 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: If28a979513ed48a4382e8069b8b365f4f7f35135
2023-09-28JSON list support when updating multiple datanodesdanielhanrahan2-27/+15
updateDataNodesAndDescendants if supplied with a JSON list such as {"branch": [{"name":"Name1"}, {"name":"Name2"}]} would only replace the first node /test-tree/branch[@name='Name1'], and ignore any remaining list items. This is caused by the use of a legacy buildDataNode, which returns only a single DataNode from JSON, even if the JSON contained a list. Issue-ID: CPS-1889 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I257491b6bc3f047a64eb241eaac70fd457b24347
2023-09-22Reinstate Spring Boot 3.0 after revertegernug5-4/+14
Issue-ID: CPS-1789 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Iee5c514ccdba36a387f83948d8a3ba26e6b1de5b
2023-09-20Bump pom file versionsdanielhanrahan1-1/+1
Issue-ID: CPS-1882 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iec6b6e8fed17ad8250a39436c7b4fd5572e5c916
2023-09-20Revert "Migrate CPS to Spring-boot 3.0"Toine Siebelink5-15/+4
This reverts commit 9693ec51cf6526082f0ad0c3ad208d144cbbb163. Reason for revert: Bug fix delivery Change-Id: I73bdc1528192c662983b0bbef73b10b6d612a719 Signed-off-by: egernug <gerard.nugent@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2023-09-20Merge "Use YangParserFactory to generate schema context"Toine Siebelink1-9/+13
2023-09-20Use YangParserFactory to generate schema contextdanielhanrahan1-9/+13
This is presented as a fix for ClassDefNotFoundErrors from opendaylight yang parser Issue-ID: CPS-1866 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If2d1a8f0319cad0a9517ea3652446e2e43f51fd4
2023-09-14Migrate CPS to Spring-boot 3.0egernug5-4/+15
Issue-ID: CPS-1789 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I932fca8a50cedf2ae0604401c5e2b27896e4d449
2023-08-23Bump pom file versionsleventecsanyi1-1/+1
Issue-ID: CPS-1851 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I15c1a9577ac940abfaae60689e3082f55455c28c
2023-08-18Merge "Device heartbeat listener"Luke Gleeson2-3/+22
2023-08-18Device heartbeat listenermpriyank2-3/+22
- Infrastructure code to have the kafka listener and distributed set in place - performance tested locally - testware added Issue-ID: CPS-1642 Change-Id: I775dbe6e6b520b8777faa08610db439877757572 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-08-18CPS-Core : Expose a java interface to update schema setsourabh_sourabh4-0/+32
- Exposed an interface to update anchor by schema set name. - New interface is implemented into RI model. - New native query is exposed to update id with given schema set name. - A new integration test is written to test new interface into cps core. Issue-ID: CPS-1800 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ibf44712e11b53cb6673b04b9e3fd864321c90839 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-08-03Merge "Support pagination in query across all anchors(ep4)"Luke Gleeson9-23/+166
2023-08-02Support pagination in query across all anchors(ep4)rajesh.kumar9-23/+166
Add pagination query parameters in query across all anchors API pagination parameters (pageIndex and pageSize) are optional default is to query all fragments each pageSize represents number of records(number of anchors) TotalRecords is returned in response header to find number of pages. - If pagination option is provided in request then query number of anchors equal to pageSize. pageIndex is used for setting offset. - return number of records(one anchor per record) as per pagesize and pageSize Issue-ID: CPS-1605 Change-ID: I73f97f986a817d423f93a8d922dcd9647b2504bc Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-08-01Merge "Fix: Make bookstore data consistent"Toine Siebelink3-26/+16
2023-07-31Add 'direct' keyword to descendants option to query direct children (ep1)Rudrangi Anupriya3-5/+5
-added 'direct' keyword also to Fetch Descendants Option along with 'all' and 'none' to Query direct child. -added unit tests to test direct keyword Issue-ID: CPS-1784 Change-Id: Icb7f59fbeebb03703626132d6d5d2cfde0e5ab4d Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-07-31Increase code coverage in cps-service moduleToineSiebelink22-285/+421
- After last rebase I had to remove 3 unused recent cloud eventd specific exceptions/constructors - Moved the only used new exception from SPI to the relevant util package (please NOTE not all exceptions belong in SPI and always question need for new exception when there is no specific handling, try to use standard or existign CPS exception instead!) - Increased cps-service module (line) coverage from 95 to 100% - Added tests for missing exceptions (handling i.e. thrown up) - Removed incorrect SPI defined OperationNotYetSupportedException (replaced with standard java exception instead) - Fixed some legacy issues with existign test classes I modified (unnecessary setup, conventions etc) - Increased coverage for DataNodeBuilder - Added or modified test to include more spi models - Added tests for Hazelcast Configs - Added more tests for json object mapper - Added test and fixed error handling in YangUtils/XmlFileUtils (it was incorrectly converting a config exception to a data validation exception) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I5852ba01bc5b33ae361b8f29daae9868f05baa35
2023-07-28Add 'direct' keyword to descendants option to query direct children (ep1)Rudrangi Anupriya3-5/+9
-added 'direct' keyword also to Fetch Descendants Option along with 'all' and 'none' to Query direct child. -added unit tests to test direct keyword Issue-ID:CPS-1784 Change-Id: Iab7f59fbeebb03703626132c6d5c2afde0e5ab4d Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-07-27Merge "Subscription Creation: NCMP to Client CloudEvent transformation"Luke Gleeson2-0/+98
2023-07-27Fix: Make bookstore data consistentArpit Singh3-26/+16
- Removed list named invoice from all bookstore files - Added a new parent list as bookstore-address - Refactored tests Issue-ID: CPS-1813 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: I5c7e83e1ee0ad9ac1d94d1906c2361c7a00d49af
2023-07-26Subscription Creation: NCMP to Client CloudEvent transformationhalil.cakal2-0/+98
- Delete legacy avc subscription event and event outcome schemas - Change subscription response and outcome sample json file contents - Change ncmp event response code to support avc subscriptions - Add mapper that maps cloud event to subscription event response - Add mapper that maps subscription event outcome to cloud event - Change subscription event response consumer to consume CloudEvents - Change time out task to support response event instead client id and name - Change subscription event response mapper to support Cloud Event - Change subscription outcome mapper to group subscription responses as per details and status - Change subscription status to have fromString functionality - Change all unit tests to support new functionalities - Add cps exceptions for cloud event and outcome type - Add details field in yang model - Change data node helper to supoort details field - Consolidate final subscription response codes - Fix code smells reported by SonarLint Issue-ID: CPS-1739 Change-Id: I5eadeb8ef40d3d7befb762b5a8d2139fe3c85d7e Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-07-24Fix code coverage reportingToineSiebelink1-1/+1
- Fixed (partly duplicated) exclusion list: all exlusings now in PARENT pom only (this means module reports and aggregate report use same exclusion - Set common minimum to 100% (3 modules now achieve this :-) ) - Added./clean cm-parsre test to get too 10% in that module too - Increased module specif minima to actual coverge today Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ic155f963bfd472e11481fcab6ee8ca227903d9ae
2023-07-21Prepare for next CPS-NCMP releaseegernug1-1/+1
Issue-ID: CPS-1797 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Ib2b840b6b37131f16afd879720658d2e45387d6a
2023-07-20Merge "Apostrophe handling in CpsPathParser"Toine Siebelink1-1/+1
2023-07-20Merge "Persisting a list element to a parent list (ep2)"Luke Gleeson4-2/+68
2023-07-20Apostrophe handling in CpsPathParserdanielhanrahan1-1/+1
Apostrophe is not currently handled correctly, and having apostrophe in the xpath will lead to various errors. For example, normalizing this xpath works: /path[@name="I'm quoted"] -> /path[@name='I\'m quoted'] However the resulting xpath will throw a PathParsingException if parsed! (Thus path normalization is not idempotent.) - Use '' for escaping apostrophe in single quoted leaf value, to comply with XPath standard (and use "" for escaping in "). - Use Liquibase to make existing data comply with new rules. - Leaf values in data leaves are now unescaped, e.g. "I'm quoted" - Quoting is now consistent for leaf/text/contains conditions. Issue-ID: CPS-1769 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iafc287f738254d7f99706c6bc548091c0ecd5aa0
2023-07-19Prepare for next CPS-NCMP releaseegernug1-1/+1
Issue-ID: CPS-1791 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Ide0fcdfa41656e25395ac8478da1bb489fd8663e
2023-07-18Persisting a list element to a parent list (ep2)Rudrangi Anupriya4-2/+68
Post List Element does not allow for create List Element, only appends onto existing node as children -Add a check in saveListElements to see if the parent xpath is a root path ("/").If root node store list element as top node. Else add passed list element to parent xpath node. -Add test for scenario for above -Add test scenario Saving list element data fragment under Root node -Add Integration Tests Add and Delete top-level list (element) data nodes with root node -Update bookstore model with TopLevelList datanode Issue-ID: CPS-1586 Change-Id: Iaa7f59fbeebb03703626132c6d5c2afde0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-07-17Improved code coverage for CpsDataServiceImplToineSiebelink3-46/+38
- Added (extended) test to cover missed scenarios - Removed unnecesarry null check from Production code - Improved error messages in production code - Removed duplicate test - Cleaned up existign test somewhat (labels and aligment) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I9761ad6d4777a6bcfee4cbe1b876dd39fa218fc8
2023-07-13Fix handling of special characters in prefix namesdanielhanrahan4-18/+20
This fixes issues with special characters like square brackets - Make PrefixResolver use CpsPathParser instead of regex - Make DataMapUtils use CpsPathParser instead of String parsing Issue-ID: CPS-1758 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6dd66eee398a46a69c0229059195f5096ab6fdec
2023-07-11Combine alreadyDefinedException classesdanielhanrahan3-64/+25
Issue-ID: CPS-1774 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I52ff9074a9f8188e8635a811b0d2713a97cb4b10
2023-06-30Prepare for next CPS-NCMP releasempriyank1-1/+1
- updated the docs. - Bumped the version to 3.3.4-SNAPSHOT for the next release. Issue-ID: CPS-1773 Change-Id: Ibe9a694baadb33d284913868452b143c14d105cc Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-06-29Merge "Normalize parent xpath when building datanodes in CpsDataService"Toine Siebelink1-2/+4
2023-06-29Improved code coverage (branches) around multipart file utilsToineSiebelink1-37/+37
- added test - moved wrongly placed test (from MultipartFileUtilSpec to DataMapUtilsSpec) - applied curent conventions to DataMapUtilsSpec Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ie8dc7f6802bb6ff0a256dc05df73da6af75409f3
2023-06-27Normalize parent xpath when building datanodes in CpsDataServicedanielhanrahan1-2/+4
Data nodes are being saved with non-normalized xpaths, resuling in data nodes that cannot be operated on. This affects all operations including get, query, update, and delete. Issue-ID: CPS-1765 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I5352182d79daec67805753ca5943b1a86c18159f
2023-06-27NCMP : Handle non-existing and non-ready cm handlessourabh_sourabh2-3/+21
- Modified data operation schema to contains cm handle as steing and response content field name as result. - Added a new common cloud event builder for NCMP to create an event. - Added data operation event creater that uses cloud event builder to create a cloud event. - Introduced a new method onto json object mapper to convert json object to bytes. - Modified EventDateTimeFormatter and added a new method to convert date timestamp into offsetdateTime. - Added a new code into ResourceRequestUtil to identify non-ready cm handle and non-existing cm handle and later publish it as cloud event to tha client given topic. - Introduced CpsApplicationContext to get spring mannaged bean into non spring managed java object. Issue-ID: CPS-1583, CPS-1614 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I24a39d2cb2c54dea25cd2f17e7748e21cd83a088 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-06-15Bump CPS version to 3.3.3-SNAPSHOTdanielhanrahan1-1/+1
- Update version properties as well as we prepare for the next release. Issue-ID: CPS-1750 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I0626eee7834499d2fa96812fb416ce7daebf0529
2023-05-16Fixing minor compilationwaqas.ikram1-1/+1
- Complilation issues while importing project in eclipse - Fixing CSIT Change-Id: Idb85b08066d27a7f2a9b297d1580915df2b67541 Issue-ID: CPS-1672 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2023-05-11Move integration test for moduleServiceToineSiebelink2-10/+1
- all modules service interation test moved - added some aditional scenarios to increase coverage - removed unused method(s) - remove javdoc on private methods - some minor refactoring like replace 'var' with correct type Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I03ff1f3562cfe38318e8b9af81be47a1fe667da2
2023-05-10Move integration test (DataService)ToineSiebelink1-9/+0
- dropped ri module coverage to alow for move - removed performance tests (already better tests in intergration module) - added 'save' iue cases in new integration-test - removed no longer used version for save single data node (todo: remove old tests for similar functionality, will wait until new test cover same) Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I4c2e788e0a313938a923cd1e7e52584d739ec6f4
2023-05-09Support for Patch across multiple data nodes--global4-32/+39
- Added new method updateMultipleDataLeaves to perform Update on multiple data nodes - Deprecated singular method of update data node(updateDataLeaves) - Refactored code where singular version was used - Updated release notes Issue-ID: CPS-1006 Signed-off-by: <as00745003@techmahindra.com> Change-Id: If67280e2dd3ad566de9a8217489f168415e624bc
2023-05-05[CPS] RI: Code Refactoringraviteja.karumuri1-12/+0
# Replace '[\s\S]' to '.' as it is same as '.' while grouping in regex # Updated the groovy files to add 'assert' and to replace deprecated method # Removed deprecated 'storeDataNode' method. Issue-ID: CPS-1594 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: Iaa5f8b0cc8d66473c993060a8fc5a54e37e373b1
2023-05-03Bump CPS version to 3.3.2-SNAPSHOTmpriyank1-1/+1
- Update version properties as well as we prepare for the next release. Issue-ID: CPS-1666 Change-Id: I44e44ac1755c44d7050ce30c9e40f83628fe9338 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>