summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main/java/org
AgeCommit message (Collapse)AuthorFilesLines
2024-02-22Refactor check for no new modules in Module Syncdanielhanrahan2-9/+6
This change moves the check for no new module references into DmiModelOperations::getNewYangResourcesFromDmi (The method is only used by ModuleSyncService) Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I3cc65e7a327148ebe01b98b61dc64b70872e2cf5
2024-02-21Merge "adding isUniqueSubscriptionId method"Priyank Maheshwari2-0/+19
2024-02-21Upgrade yang modules using module set tagdanielhanrahan5-179/+93
- New algorithm is implemented as per the pseudo code -> https://wiki.onap.org/display/DW/CPS-1733%3A+Upgrade+YANG+Schema-Set+for+CM+Handle+Using+a+Module+Set+Tag Issue-ID: CPS-2027 Change-Id: I78fc1c8f927de1a1b814c3c1c62351dda58f2139 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
2024-02-21Fix handling of blank moduleSetTagdanielhanrahan2-7/+9
Handling of blank moduleSetTag is very inconsistent. Sometimes it will be returned as null, '' or 'not-specified'. Specifically in the case of MODULE_UPGRADE_FAILED, on the retry, a blank moduleSetTag will be returned as 'not-specified', leading to incorrect upgrade. Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I3f4290dc5659c386c7b2b924325da2560d00d73b
2024-02-21Add moduleSetTag when getting a CM handledanielhanrahan2-6/+3
Test changes: - Check moduleSetTag (and alternateId) in unit test of get CM handle. - Verify moduleSetTag is updated in tests of CM handle upgrade. Code changes: - Set moduleSetTag when converting a YangModelCmHandle to NcmpServiceCmHandle. - Set moduleSetTag in YangModelCmHandle copy constructor. - Minor refactor using StringUtils::isBlank. Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6a9a92aa58d15c6ecf5a6bb21aa5c9d6ec8dc817
2024-02-21Remove alternate ID cachesleventecsanyi1-59/+0
- removed alternate id cache related classes and updated deployment.rst Issue-ID: CPS-2107 Change-Id: I567af7b2f44107fceffaef370205b00a5cf79522 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-19adding isUniqueSubscriptionId methodemaclee2-0/+19
Issue-ID: CPS-2044 Change-Id: I26b209ead80add7e60b4de9257a9f5c326ddea6f Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-02-16Use DB for checking Alternate IDshalil.cakal6-163/+250
- do NOT use hazelcast cache - introduced AlternateIcChecker - use checks during Inital registration - TODO: remvoe Hazalcast Cache (once perf test are OK) - TODO: use checks during UPDATE registration - TODO: error reporting during registration Issue-Id: CPS-2049 Change-Id: I0adcac52a7a49e26301758eafc4684152ddfcaf5 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-13Mapper to form event for DMI Pluginmpriyank1-0/+112
- cmSubscriptionPredicate to CmNotificationSubscriptionDmiInEvent mapper code and testware. - Based on the delta we find , we will be sending the events to the dmi plugins. Finding delta code will be separate patchset Issue-ID: CPS-2060 Change-Id: If1e15679b72c39352e3cf166651226df7e207ce0 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-13Prefix with CmNotificationSubscription refactoringmpriyank1-10/+9
- event schemas are now suffixed with CmNotificationSubscription - testware updated appropriately Issue-ID: CPS-2091 Change-Id: I9d0c4bdfaf7ea94812d35b071824d0fb083aa845 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-12Update cm-data-subscriptions modelmpriyank2-3/+4
- rename leaf-list subscribers to subscriptionIds - code using the same also updated - not creating a new version of model as nobody is using it at the moment Issue-ID: CPS-2088 Change-Id: I43d679047bdfc665b56f262757acc4bbaba2733f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-12CmSubscription minor code refactoringmpriyank9-136/+52
- As per discusstion , refactoring the naming of the classes and caches - Combining the validation service with CmSubscriptionPersistence service - removed dmiCmNotificationScopeFilter class and the attributes are part of Predicates only Issue-ID: CPS-2078 Change-Id: Ic2b3ee28a150f3ae6e0911e88296f01e22604ef5 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-08Merge "Revert "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - ↵Toine Siebelink4-64/+20
error collection""
2024-02-08Revert "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error ↵Levente Csanyi4-64/+20
collection" This reverts commit 67681820f2a7fea88cbc6cbe5b3d483dae506d55. Reason for revert: does not work Change-Id: I92c063b59261d25774ee34664d834399c269f0c2 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-08Merge "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error ↵Toine Siebelink4-20/+64
collection"
2024-02-08Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error collectionleventecsanyi4-20/+64
- 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-08Add alternateId to legacy lcm-eventJvD_Ericsson3-4/+6
Issue-ID: CPS-2039 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I03863e986ea6b847fd7d25e55a24f948ca9a983d
2024-02-06Merge "[BUG] Retry interval for kafka consumer"Toine Siebelink1-0/+3
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-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_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 modelemaclee1-11/+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 Siebelink1-2/+2
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