summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
AgeCommit message (Collapse)AuthorFilesLines
2024-02-08Revert "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error ↵Levente Csanyi7-134/+43
collection" This reverts commit 67681820f2a7fea88cbc6cbe5b3d483dae506d55. Reason for revert: does not work Change-Id: I92c063b59261d25774ee34664d834399c269f0c2 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-08Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error collectionleventecsanyi7-43/+134
- added business logic to check duplicated ids (create and update scenarios) - added new unit test for CmHandleIdMapperSpec - added test for the new registration scenario Issue-ID: CPS-1988 Change-Id: I4bf2e25c87c57938d336f2fe70378b400bab07b0 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-06Merge "[BUG] Retry interval for kafka consumer"Toine Siebelink1-0/+3
2024-02-06Merge "CmSubscription service layer method #1"Lee Anjella Macabuhay3-0/+146
2024-02-06Merge "CmSubscription validate datastore"Lee Anjella Macabuhay3-0/+116
2024-02-06[BUG] Retry interval for kafka consumermpriyank1-0/+3
- added retry interval of 10 seconds in case of any auth exception when consuming kafka messages. - This fix prevents us from restarting the whole app inorder to restart the consumer. Issue-ID: CPS-2070 Change-Id: Ie02d3cb686741cd92dd006dab1d49c3480d58720 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-06moduleSetTag and cmhandle upgrade functionalities fixsourabh_sourabh6-23/+29
- 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 #1mpriyank3-0/+146
- 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 Sourabh6-7/+66
2024-02-01Extend API: Get Module Definitionshalil.cakal6-9/+68
- 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 datastorempriyank3-0/+116
- 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 relationleventecsanyi11-69/+424
- 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 Maheshwari2-5/+5
2024-01-26Correct datastore names via DatastoreType Enumemaclee2-5/+5
- 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-corempriyank19-301/+37
- 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 commentsmpriyank9-154/+1
- 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 Kafkaseanbeirne3-0/+182
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 Maheshwari6-19/+74
2024-01-17Create datastores for NCMP w/subscription modelemaclee6-19/+74
Issue-ID: CPS-2035 Change-Id: I80234c7ca93c5774ee50082803cdc102f693a5a7 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-01-17Remove deprecated cmSubscription codempriyank32-2845/+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-15Merge "Create tests for EventPublisher error scenarios"Toine Siebelink2-4/+124
2024-01-11Bump CPS to 3.4.3-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.4.3-SNAPSHOT and update the docs Issue-ID: CPS-2026 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If0036c6245ddbae2a401b712cc13e3208491ed2f
2024-01-11Create tests for EventPublisher error scenariosJvD_Ericsson2-4/+124
- 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 Macabuhay3-20/+23
2024-01-10Introduce cmSubscriptionEventCachempriyank6-0/+246
- 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 APIdanielhanrahan3-20/+23
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 alternateIdleventecsanyi2-4/+104
- 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-21Deprecate use of basic subscription modelseanbeirne16-22/+24
- Deprecate json files in resources Issue-ID: CPS-1973 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I3bf59807f740e3e6f19af0cf0d418edb4f961328
2023-12-20Bump CPS to 3.4.2-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.4.2-SNAPSHOT and update the docs Issue-ID: CPS-2017 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iea58c1134bc9d25c76ef7ccc2c1d2de1c7aa0bfd
2023-12-20Updating config variable names for HttpClientwaqas.ikram3-13/+13
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 modelemaclee2-3/+79
- 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 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