summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main
AgeCommit message (Collapse)AuthorFilesLines
2024-02-06Merge "CmSubscription service layer method #1"Lee Anjella Macabuhay2-0/+96
2024-02-06Merge "CmSubscription validate datastore"Lee Anjella Macabuhay2-0/+77
2024-02-06moduleSetTag and cmhandle upgrade functionalities fixsourabh_sourabh3-5/+15
- Insert only unmapped yang resources - In case of removed module call dmi plugin service to get modules. Issue-ID: CPS-2027 Change-Id: Ic1903c20169a913c835a3eee909357daec45f51e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-02-05CmHandle delete is failing with InternalServerError: Null key is not allowedleventecsanyi1-1/+7
- added null check to alt id removal from cache Issue-ID: CPS-2064 Change-Id: Iee484b96f505106613ce2d646898ca7ee3873f28 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-02CmSubscription service layer method #1mpriyank2-0/+96
- adding a service layer method to check if we have an ongoing cmsubscription or not. - test scenario for the same. - Other service layer method to be introduced in the subsequent patches. Issue-ID: CPS-2042 Change-Id: I33637138457a0c5d49b80dd4967057bd5bfa69d4 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-01Merge "Extend API: Get Module Definitions"Sourabh Sourabh4-1/+41
2024-02-01Extend API: Get Module Definitionshalil.cakal4-2/+42
- add query parameters: module-name and revision to OpenAPI - extend the controller method to hande the new parameters - add the new method stack to the service layer - extend the SQL query to support the new parameters - add unit and integration testwares Issue-ID: CPS-1135 Change-Id: I089ad2ad71effb58ac0ba809e9f441d6cdb59c4f Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-01CmSubscription validate datastorempriyank2-0/+77
- introduced isValidDatastore to check the incoming datastore against the valid datastore for this use case. - Testware added Issue-ID: CPS-2059 Change-Id: I2602396fe2f404789fc4e0f01850eeba2a75bd21 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-01Introduce Hazelcast for alternateId-cmHandle relationleventecsanyi6-18/+190
- added new Hazelcast config - added cache initialization in CmHandleIdMapper - added unit tests - updated deployment.rst - refactored cache updating Issue-ID: CPS-1988 Change-Id: Iea6f884e584bf8cea8612ddbced4329e783c60a5 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-01-29Merge "Correct datastore names via DatastoreType Enum"Priyank Maheshwari1-3/+3
2024-01-26Correct datastore names via DatastoreType Enumemaclee1-3/+3
- Use existing DatastoreType enum in defining datastore name Issue-ID: CPS-2046 Change-Id: I6f2f77c96b239546f7141267c0c01edfc599b445 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-01-25CloudEvents support for cps-corempriyank7-148/+12
- Moving cloud events dependencies to the cps-service module instead of cps-ncmp-service - Testware has moved and new tests also introduced - EventsPublisher also moved Issue-ID: CPS-2040 Change-Id: Ibafb15e7e9efbdbe1e00e2b4f0da820bbcead004 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-22CmSubscription review commentsmpriyank1-2/+0
- Removed the old deprecated cmSubscription json examples - Incorporated minor review comments from myself Issue-ID: CPS-1951 Change-Id: Ifadaa186cc210b81bb1b27f73f537e1c11bf461d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-22Read and validate incoming sub create request from Kafkaseanbeirne1-0/+66
Issue-ID: CPS-1951 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I402dacc47c93e77a4ca63598acebe27c780951de
2024-01-22Merge "Remove Lambda & Restructure File"Lee Anjella Macabuhay2-39/+26
2024-01-19Remove Lambda & Restructure Fileseanbeirne2-39/+26
-Removed Lambda from CompositeStateUtils -Restructured CpsDataPersistenceServiceImpl to more logical layout Issue-ID: CPS-1238 Change-Id: I09096dab474230d04b15c204cbea95a2f1285366 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-01-18Remove onboarding of old solution subscription modelemaclee2-68/+0
-Remove onboarding of old subscription model -Remove initial solution subscription model Change-Id: Id930dcfd078d71e7c275d0a3ef1117f8fed2e9d3 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-01-18Merge "Create datastores for NCMP w/subscription model"Priyank Maheshwari3-10/+34
2024-01-17Create datastores for NCMP w/subscription modelemaclee3-10/+34
Issue-ID: CPS-2035 Change-Id: I80234c7ca93c5774ee50082803cdc102f693a5a7 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-01-17Remove deprecated cmSubscription codempriyank19-1564/+0
- Newer approach for cm subscription is in progress so removing the deprecated code now - Also deleted the old cache config - Changes to trust level csit to fix the kafka unknown partition issue Issue-ID: CPS-2028 Change-Id: Ieb19669e53f3f64cca876fa67d0b6409a97b2a09 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-11Create tests for EventPublisher error scenariosJvD_Ericsson1-4/+4
- Added tests for error scenarios - Added tests for expected scenarios Issue-ID: CPS-1978 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I6ba19ac456098f074e634f7cf70fdc141491c635
2024-01-10Merge "Remove inefficient saveListElementsBatch API"Lee Anjella Macabuhay2-15/+18
2024-01-10Introduce cmSubscriptionEventCachempriyank5-0/+182
- inmemory datastructure to keep track of the ongoing subscriptions - Test cases to cover cache config and sample data test - Use of cache will be in other patchsets after this Issue-ID: CPS-2022 Change-Id: Ic6cd22cceaeacb9c7184f42c1ebfac28303f2c26 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-09Remove inefficient saveListElementsBatch APIdanielhanrahan2-15/+18
CpsDataService::saveListElementsBatch method is not needed as saveListElements supports saving multiple list elements in a single operation. This both simplifies implementation and greatly improves performance when saving list elements, as the Yang parser need only run once for the whole batch. - Change InventoryPersistence to save CM-handles in batches of 100 using existing CpsDataService::saveListElements method. - Remove not needed CpsDataService::saveListElementBatch. Issue-ID: CPS-2019 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8b74dda2917e094d064b42f2c0e4d57029b90395
2024-01-08Allow updating of cmHandles with an alternateIdleventecsanyi1-1/+45
- added methods to update alternate id - fixed unit tests - added new unit test for coverage Issue-ID: CPS-1986 Change-Id: I9ef717c5f2c405482e0a5bb70f94f465ba1ff64f Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2023-12-20Updating config variable names for HttpClientwaqas.ikram2-8/+8
for DMI Issue-ID: CPS-2016 Change-Id: Ief5428e6e4afc8309ceed2a8221365e2fab31686 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2023-12-19Deprecate use of basic subscription modelemaclee1-0/+76
- Checked all subscription related files and Removed use of basic subscription model as much as possible that will not break the entire code, other files still has references on it but will and shall be removed on further implementation of the subscription epic story - Created new YangModel Event (YangModelCmDataSubscriptionEvent.java)for the new model as changing the old one affects many files Issue-ID: CPS-1973 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I7d3866780261110d3bb71c4807f39edc2703d0dc
2023-12-18Remove the dependency-cycle between beansToineSiebelink5-22/+28
- 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.ikram2-8/+97
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 Siebelink2-6/+15
2023-12-14Moving and Renaming eexisting subscription implemaclee15-26/+27
-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 alternateIdleventecsanyi2-6/+15
- 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 Siebelink4-19/+14
2023-12-13Introduce Schema Set upgrade methodsourabh_sourabh3-56/+87
- 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 alternateIdleventecsanyi4-19/+14
- 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-11Merge "[BUG] Dminame to valid topic suffix"Lee Anjella Macabuhay1-2/+17
2023-12-06[BUG] Dminame to valid topic suffixmpriyank1-2/+17
- 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 Siebelink3-36/+71
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.cakal3-36/+71
- 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 Siebelink9-54/+256
2023-11-28Publish trust level notification eventJvD_Ericsson9-54/+256
- 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-23Retry for yang module upgrade operationsourabh_sourabh6-57/+102
- 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 Maheshwari3-17/+81
2023-11-21Onboard merge subscriptions modelemaclee3-17/+81
-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.cakal8-171/+120
- 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-13Add DMI trustlevel at registrationseanbeirne1-1/+13
-Re-introduce trustLevelPerDmiPlugin to registration process Issue-ID: CPS-1902 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: Ic3f154aca60c3e1244ff4fd9a4c4865964884b31