aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
AgeCommit message (Collapse)AuthorFilesLines
2023-12-18Remove the dependency-cycle between beansToineSiebelink11-62/+74
- Splitting admin service into AnchorService and DataspaceService (this resolves the cyclic dependency) - Improved Delete dataspace integration error tests (were depending on execution order, now independent) Issue-ID: CPS-871 Change-Id: I47efedb6eb4bd2900f72d689616b7b7b62df2938 Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2023-12-18Enhancing the REST template with HttpClient5waqas.ikram6-14/+163
for better performance and allowing users to configure timeouts as per their requirements Issue-ID: CPS-1994 Change-Id: I9fa94fb3923a50e33b3850ec0f190a51e278698f Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2023-12-18Merge "Update Model to allow Persisting of alternateId"Toine Siebelink3-9/+18
2023-12-14Moving and Renaming eexisting subscription implemaclee24-42/+43
-renamed the existing subscription related packages to have 'deprecated' on its name as this shall be removed with new implementation of the subscription positive cases - replaced the existing schemas with the new ones Issue-ID: CPS-1991 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I8f27861b80756540477e03971c53219ea589975c
2023-12-14Update Model to allow Persisting of alternateIdleventecsanyi3-9/+18
- added new dmi model registry and modified tests Issue-ID: CPS-1989 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I576a5a0704fe28924dcc304c276fec5665b52764
2023-12-14Merge "Modify cmHandle registration for alternateId"Toine Siebelink8-75/+23
2023-12-13Introduce Schema Set upgrade methodsourabh_sourabh5-67/+115
- Incl. integration test - Prod code is changed to use new method that update yand module. - updated module resource to return multiple modules. Issue-ID: CPS-1806 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I751d9393ce78a3be9daeaff6d0252738c02115e0 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-12-13Modify cmHandle registration for alternateIdleventecsanyi8-75/+23
- added alternate id to the interface for persisting the new value - updated unit tests to validate the new field Issue-ID: CPS-1985 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I81e61f2ea2ecc5d8c0938af00fa81a99e27e2e23
2023-12-12Fix typo in DMI liveness Spring variable namedanielhanrahan1-1/+1
Issue-ID: CPS-1993 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I44457b35ae639f8dcbab26989c5d1e6e1144d076
2023-12-11Uplift Guava dependencyhalil.cakal1-3/+3
- upgrade Guava to the latest version to fix critial vulnerability Issue-ID: CPS-1987 Change-Id: I6ea314407133dea229e9626fdf2d9c938f7c7e08 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-12-11Merge "[BUG] Dminame to valid topic suffix"Lee Anjella Macabuhay2-2/+33
2023-12-06[BUG] Dminame to valid topic suffixmpriyank2-2/+33
- dmi name can be in the form of URL , and we are using dmi-name as topic suffix , which results in the invalid topic name. - fix to extract out domain name excluding port from the url - test case for the same - updated the documentation - fix only supports ipv4 addresses at the moment Issue-ID: CPS-1979 Change-Id: I9c6ea113afae816f727b45a30c94070af013a16d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-12-05[Bug] LogLvl to debug DataOperationEventConsumermpriyank1-1/+1
- changed the log level to debug from info Issue-ID: CPS-1990 Change-Id: I5563aaa4f95e7cd5a6df7fd9304cb0dcb0545ca3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-12-04Merge "Fix the algorithm for device trust level"Toine Siebelink6-70/+150
2023-11-30Merge "Add metrics for NCMP passthrough read operation"Toine Siebelink1-0/+4
2023-11-29Add metrics for NCMP passthrough read operationdanielhanrahan1-0/+4
Issue-ID: CPS-1968 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I9ef5af3e6333674cd5af5e9ca055c8748a63be17
2023-11-29Fix the algorithm for device trust levelhalil.cakal6-70/+150
- Add new method to handle device trust level changes in trust level manager - Change algorithm to find effective trust level for each use case - Separate responsibilities of each function - Change device heartbeat consumer accordingly Issue-ID: CPS-1910 Change-Id: I228f82955b224dc4ebfd1b305082e06aac6008d2 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-11-29Merge "Publish trust level notification event"Toine Siebelink18-118/+445
2023-11-28Publish trust level notification eventJvD_Ericsson18-118/+445
- Add mapper that maps attribute value change event to cloud event - Add publisher that publish the cloud event from ncmp to client - Handle notifications for the uses cases below - Initial registration case - Device heart beat consumer case - Dmi status changes within dmi watchdog case - Added tests for mapper, publisher, and trustLevelManager - Added test for dmi watchdog Issue-ID: CPS-1910 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I7c0798346a221e703da58902b9d631115de8d91a Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2023-11-24Fix @Ignore testleventecsanyi1-89/+0
- removed EventPublisherSpec - fixed toDataStores test Issue-ID: CPS-1874 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I857c7bcb0aa52604da6692545456769a4ec151ec
2023-11-23Retry for yang module upgrade operationsourabh_sourabh11-106/+172
- Added retry code for yang module upgrade failed Issue-ID: CPS-1802 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ida68d45f926ed48b92f4b5a3b82e641d778303ce Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-11-23Merge "Onboard merge subscriptions model"Priyank Maheshwari7-31/+95
2023-11-21Onboard merge subscriptions modelemaclee7-31/+95
-Add new model in subscription -Update unit tests for uploading models using modelLoader -Modify abstract model loaders to handle more than one yangResource in creating schema set -Modifying use of the basic subscription model to the new model will be on a seperate commit Issue-ID: CPS-1928 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I5805ab8c721e8a63726fd210379e815b84b387a3
2023-11-14Trust level updates with dmi status changehalil.cakal12-273/+210
- Change dmi watchdog to store Trustlevel for each DMI - Corrected query algorithm for TrustLevel Queries Issue-ID: CPS-1907 Change-Id: I7ca25db8edfd25b72bcda48e4fde1d9be5c56dc0 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-11-14Merge "Add DMI trustlevel at registration"Lee Anjella Macabuhay3-6/+24
2023-11-13Add DMI trustlevel at registrationseanbeirne3-6/+24
-Re-introduce trustLevelPerDmiPlugin to registration process Issue-ID: CPS-1902 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: Ic3f154aca60c3e1244ff4fd9a4c4865964884b31
2023-11-09Bump CPS to 3.4.1-SNAPSHOTmpriyank1-1/+1
- bumped CPS to 3.4.1-SNAPSHOT - updated the release notes Issue-ID: CPS-1962 Change-Id: Iee9fa03a1890ac5d4c1204d0851a255c5b897720 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-11-08Merge "CPS-NCMP: No yang resources stored during cmhandle discovery however ↵Toine Siebelink1-1/+3
cmhandles are in READY state"
2023-11-08CPS-NCMP: No yang resources stored during cmhandle discovery however ↵sourabh_sourabh1-1/+3
cmhandles are in READY state - Applied blank check on modulesettag while pushing module list into cache. Issue-ID: CPS-1956 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ia0d0b531a9750ef2ea011d6fc13e4d1b4c99fb64
2023-11-08Fix Code Smellsseanbeirne1-3/+2
Issue-ID: CPS-1957 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I901fd568752dbb42d95fa330f8d6d7dd0128b95f
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-02Handling Yang module upgrade error scenariossourabh_sourabh7-51/+108
- cm handle not ready, not found , invalid id Issue-ID: CPS-1802 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I2039faa44abbda17237e7c2dc085b4ac775c2039 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-11-02Initial Registration with trustLevel on NCMPseanbeirne3-16/+42
- Updated NcmpServiceCmHandle class to include registration trustLevel Issue-ID: CPS-1902 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I7c97928f5cdd82f3036a57ea5f0c149e2872f4f1
2023-10-26[BUG] CPS NCMP Change extension in health check URLhalil.cakal1-2/+3
- Align URL extension to default actuator URL Issue-ID: CPS-1922 Change-Id: Ifaa1eb32f3c6be5c48a63c4e360c27353d0e5e0f Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-10-23Introduce and use new Hazelcast map pt. 2sourabh_sourabh20-133/+263
- 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-19Code coverage: Update YANG schema set using moduleSetTagsourabh_sourabh6-19/+111
- Code coverage is increased to 98. - New groovy test is added to cover new code. Issue-ID: CPS-1798 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ia979be3f43ec8e4bbf6f8cb66a8a5e748118f19b Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-10-18Fix Sonar code smellsemaclee1-6/+3
- Update deprecated methods in webSecurityCOnfig - Remove 'deprecated' tag on methods that are to be removed in EventsPublisher as they are still being used, methods with deprecated tag (for removal) must not be used Issue-ID: CPS-89 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I104d4b3e362d22bb7fc020580de6cb4f390e54c9
2023-10-16Merge "Add withTrustLevel condition to CmHandle Query API"Toine Siebelink21-146/+287
2023-10-12Add withTrustLevel condition to CmHandle Query APIhalil.cakal21-146/+287
- Change untrustworthyCmHandleSet with trustLevelPerCmHandleMap - Change trust level cache config accordingly - Change device heartbet consumer accordingly - Add json schema for device trust level - Add with_trust_level enum into cm handle query conditions - Add query cm handle by trustlevel function to cm handle queries - Add query cm handle by trustlevel service to network cm proxy cm handle service - Add unit tests and fix code smells Issue-ID: CPS-1864 Change-Id: Ie214f0713cef779307d3379df81e2b95115b6d6d Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-10-11Expose REST endpoint to update YANG schema set using moduleSetTagsourabh_sourabh28-109/+342
- 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-10Conflicting Error codesourabh_sourabh13-171/+163
-Used common error codes for NCMP responses Issue-ID: CPS-1904 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Id2beaa9f3d49dffd0a193b05fbaa7a6dd801e34a Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-09-29Fix Sonar Code Smellsmpriyank2-21/+18
- convert normal java strings to text block - feature from java 15 - handling callback for legacy events. Once the deprecated methods are removed then this would not be needed. Issue-ID: CPS-89 Change-Id: I9b537ebee2c284c8109e6cc6c8961a430ee9599d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
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-26Introduce and use new Hazelcast map for module set tagleventecsanyi4-5/+48
- added new IMap for moduleSetTags, updated SynchronizationCacheConfigSpec - updated deployment.rst Issue-ID: CPS-1859 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I5233c5150fd784974d7c1e5ba387119c1eaba194
2023-09-25Refactoring persistence classessourabh_sourabh71-520/+632
- Created a common ncmppersistence pkg inside ncmp service "api/impl" pkg". - Move "inventery" into "api/impl" pkg. - Created common class named as "NcmpPersistence" inside "ncmppersistence" pkg. - Move all the commin constants and methods into "NcmpPersistence". - SubscriptionPersistence and InventoryPersistence extends "NcmpPersistence". - Find and replace all the constants of NCMP. Issue-ID: CPS-1883 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Id3e678109766d680589fa7aab965ea251a55f075 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-09-25Merge "Reinstate Spring Boot 3.0 after revert"Toine Siebelink12-36/+46
2023-09-25Merge "Add DMI to TrustLevel Cache During Registration"Priyank Maheshwari4-8/+28
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-21Add DMI to TrustLevel Cache During Registrationseanbeirne4-8/+28
Issue-ID: CPS-1861 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I1e71b78eec9e2a9f536f82ef1ba5a9933ca2bf6b