summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
AgeCommit message (Collapse)AuthorFilesLines
2023-09-22Reinstate Spring Boot 3.0 after revertegernug12-36/+46
Issue-ID: CPS-1789 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Iee5c514ccdba36a387f83948d8a3ba26e6b1de5b
2023-09-21Merge "Set lock state and reason upon request"Toine Siebelink11-47/+103
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 Siebelink12-46/+35
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-18Set lock state and reason upon requestleventecsanyi11-47/+103
- added new LockReasonCategories and improved SyncUtils.isReadyForRetry - refactored logic aroudn retry times - refactored unit tests Issue-ID: CPS-1860 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I4382d6ad1fa0a7d9dacb8c8281b0458a5afc0375
2023-09-18Merge "Migrate CPS to Spring-boot 3.0"Toine Siebelink12-35/+46
2023-09-14Migrate CPS to Spring-boot 3.0egernug12-35/+46
Issue-ID: CPS-1789 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I932fca8a50cedf2ae0604401c5e2b27896e4d449
2023-09-04Dmi plugin watchdog cheking alivenesshalil.cakal8-11/+242
- Add capability of GET request into DmiRestClient - Add watchdog job to check aliveness of dmi plugins - DmiPluginStatus enum as UP or DOWN - Add unit tests for the new function in dmi rest client - Add unit tests for dmi watchdog Issue-ID: CPS-1856 Change-Id: Ic38a96f0485a0bfe1b6af5bb2f57f6119d8fa563 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-31Merge "Hazelcast cache config stroring trust level per dmi plugin"Priyank Maheshwari2-0/+103
2023-08-31Hazelcast cache config stroring trust level per dmi pluginhalil.cakal2-0/+103
- Add Hazelcast cache config to store trust level per dmi plugin Issue-ID: CPS-1855 Change-Id: Ibe7f8393008ca7352aacddba99ecd19d6e1eb326 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-29Extend model loader to support model-upgrade (part 2)ToineSiebelink7-22/+349
- add upgrade related methods to common abstract class - add new (agreed) inventory model - add InventoryModelLoader - add more logging for success cases - simplified constant names considering the context (class name) Issue-ID: CPS-1804 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I61a5c6d320d340a5c469ce20140f984439ba71a2
2023-08-25Merge "Extend model loader to support model-upgrade (part 1)"Priyank Maheshwari7-308/+363
2023-08-25Merge "Subscription Forwarding Fix"Priyank Maheshwari1-22/+2
2023-08-24Extend model loader to support model-upgrade (part 1)ToineSiebelink7-308/+363
- refactor existign code for easier extension (no code changes yet, just want to review refactor in this first patch...) - changed log level of some (error) logging Issue-ID: CPS-1804 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I234ad6c4057e9447cd39a83b8f48799918ca6b7f
2023-08-24Subscription Forwarding Fixlukegleeson1-22/+2
Issue-ID: CPS-1853 Change-Id: Ic3f2bf28e18d3cadafb57e9dd4bfce8ab06cdb49 Signed-off-by: lukegleeson <luke.gleeson@est.tech>
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-21Replace event-id with correlation-id for data read operation cloud eventsourabh_sourabh2-4/+5
- Modified data operation event consumer to send correlation-id instead if event-id while publishing cloud event to client topic. Issue-ID: CPS-1842 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I30738b90d2ff0d14b5ee0bac680eff834aa968bf
2023-08-21Merge "Cm Subscription: PENDING logic handling in NCMP"Luke Gleeson15-195/+319
2023-08-18Merge "Device heartbeat listener"Luke Gleeson5-0/+281
2023-08-18Device heartbeat listenermpriyank5-0/+281
- 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-18Modify data operation schema to accommodate additional informationsourabh_sourabh6-50/+54
- Code is modify to add resourceIdentifier and option to data operation kafka response for status code 100, 101, 102 and 103. Issue-ID: CPS-1837 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I1f7870d9d373f69de03240700b9d74be46fbfb6c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-08-17Cm Subscription: PENDING logic handling in NCMPmpriyank15-195/+319
- Remove PENDING state from dmi schema - Modify ncmp out event mapper to categorize response per details - Rename class and method names as well as in unit tests - resolved the merge conflicts Issue-ID: CPS-1830 Change-Id: I5b7f523f546ec9940c246bd286586fdeba2f892e Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-08-11Generic Cloud Event Mappermpriyank15-249/+156
- Introduced a generic event cloud mapper to be used all over the codebase - Added as a utility so we dont have to inject it as spring bean - Refactored code and added tests - Incorporated review comments Issue-ID: CPS-1827 Change-Id: I8dab914791e01bbf6492ce96e7ba6eaa8f75a6cb Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-08-09Refactoring Subscription Create LCM use casempriyank28-325/+327
- Client to NCMP: CmSubscriptionNcmpInEvent - NCMP to DMI: CmSubscriptionDmiInEvent - DMI to NCMP: CmSubscriptionDmiOutEvent - NCMP to Client: CmSubscriptionNcmpOutEvent - code package changed from avcsubscription to cmsubscription - Other classes name as per the events naming above - Test classes refactored - NO LOGIC changes incorporated in this patch Issue-ID: CPS-1831 Change-Id: Id5ad5f799007deaaf6d6fc0f402c130339263d09 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-08-09Modify DmiDataOperationRequest to make it identical as DataOperationRequestsourabh_sourabh4-8/+43
- Modified DmiDataOperationRequest attribute from operationType to operation. - Wrapped operation details to parent attribute operationd array. Issue-ID: CPS-1833 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I79aa943e10e1c32c3252a6eb4375c14496476f8b Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-08-04Subscription Creation: Fixes for code review after demohalil.cakal22-137/+259
- Change missleading subscription details in testware - Change datastore check to comply with CPS enum - Remove redundant CloudConstructionException - Change exception handling in cloud event mappers to avoid loss of information - Remove exception handling from scheduler service as discussed in the meeting Issue-ID: CPS-1732 Change-Id: I9fee2eafd4db97a0eed80e39219463c904f5a980 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-04Ability to disable sending auth headermpriyank4-1/+26
- introduced configurable parameter to disable sending auth header in the request to dmi-plugin - default is to include the auth header - DMI_AUTH_ENABLED flag can be set to true/false to control the behaviour - Also added the env variables to the CSITs - updated release-notes Issue-ID: CPS-1819 Change-Id: If97c06e33f06e391d2190b7300d73210ed2f4e27 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-07-31Add 'direct' keyword to descendants option to query direct children (ep1)Rudrangi Anupriya2-5/+3
-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 moduleToineSiebelink8-16/+49
- 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 Anupriya2-3/+3
-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 Gleeson31-471/+793
2023-07-26Subscription Creation: NCMP to Client CloudEvent transformationhalil.cakal31-471/+793
- 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-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-13Improved code coverage for NetworkCmProxyDataServiceImplToineSiebelink3-41/+37
- Production code had catch block that is no longer needed - Cleaned up some test somewhat (close to the new tests) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Iaa409e752a496bf088a58ccd422fe3d850442b59
2023-07-13Introduced a dmi rest demo csit stubsourabh_sourabh1-0/+1
- Introduced a new response code 0 for data operational success response. - Created a new dmi plugin rest stub for demo and performance testing. - Removed dmi plugin stub of wiremocked. - Updated parent pom to add newely created demo stub. - updated docker compose to add neww demo stub with profile for CSIT, demo and performance testing. - Removed target id list from unsupported operation/datastore from REST response. Issue-ID: CPS-1560 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ie8198366df820e7d4b8b6e8a85ff9cdb0fce7435 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-07-13Merge "Improved code coverage for record filter strategies"Sourabh Sourabh1-0/+41
2023-07-12Improved code coverage for record filter strategiesToineSiebelink1-0/+41
(the semi-integration test dont cover all scenarios) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I717946cddec315a1e69ca8d104b07f91691c1b63
2023-07-12Improved code coverage for Data Sync WatchdogToineSiebelink1-22/+32
- also cleaned up existing test (c&p errors in descriptions) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I20ed98faf0e05e2eb3b2aeaa92bed7dc73cbb358
2023-07-12Improved code coverage (branches) for sync watchdogToineSiebelink2-13/+50
- had to refactor prod. code slightly to make it testable - added a batch size check although the task is a simple iteration there is overhead in creating a paralel task Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I0db7ba3a15f4edc469a5af1ddc6fd76922b16809
2023-07-11Combine alreadyDefinedException classesdanielhanrahan4-12/+10
Issue-ID: CPS-1774 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I52ff9074a9f8188e8635a811b0d2713a97cb4b10
2023-07-10NCMP fails to start if /subscription-registry already existsdanielhanrahan2-2/+4
cpsDataService only throws AlreadyDefinedException, not AlreadyDefinedExceptionBatch. This causes NcmpStartupException to be thrown during startup, if /subscription-registry exists. Issue-ID: CPS-1783 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I5667d891f855ef47ca2475891f9216be102932ed
2023-07-07Subscription Creation: NCMP to DMI CloudEvent transformationhalil.cakal14-144/+473
- Add mapper to convert client event into ncmp event - Add sample json object of ncmp version - Change subscription event consumer to consume CloudEvents - Change subscription event forwarder to publish CloudEvents - Change test producer config to support CloudEvents - Change sample subscription event json to comply with new schema - Add more test for missing branches - Change packages of the mappers into relevant directory Issue-ID: CPS-1737 Change-Id: I8c9e6e7bf713a8fb530a0586dfb2bce796a462f5 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-07-03Kafka (De)serializtion test case for legacy consumerraviteja.karumuri1-4/+23
# Added test case to verify the legacy consumer able to forward the event to client topic Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I9c88023028eaa2453e5578b5afb4951a41bf4999
2023-06-30Merge "Kafka (De-)Serialization Test"Sourabh Sourabh3-17/+127
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-29Kafka (De-)Serialization TestToineSiebelink3-17/+127
- added test that proof (de-)serialization of DataOperation CloudEvent - extracted new baseclass for kafka consumer tests Issue-ID: CPS-1746 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I3b04dc0ed8cd1f1f48206cbcf0fd739532ba423c
2023-06-29Merge "Clearing code smells"Toine Siebelink1-3/+6
2023-06-29Clearing code smellsToineSiebelink1-3/+6
- added/updated @deprecated javadoc in EventPublisher Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ic0fa3efbc7dc580368bed6782db683b3c7a4d918