aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
AgeCommit message (Collapse)AuthorFilesLines
2024-03-19Merge "Fix SonarQube warnings"Priyank Maheshwari8-74/+82
2024-03-19Fix SonarQube warningsToineSiebelink8-74/+82
targetted: - Introduced CmResourceAddress (name agreed with Daniel and Priyank) - Extracted out private method in AltenateIdChecker to reduce complexity side effects: - use 'record' java feature as suggested by ItelliJ - had to uprade spotbugs version to avoid incorrect warning on 'record' equeals method - convention: added missing 'asserts' in affected testware - my preference: removed a lot of unnecessary linebreaks in affected testware - removed redunfant (variation) of a 'delegation' test Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ie0c9d5ebc33196ae14ed6c226843095a2a040d1d
2024-03-19Configure Hazelcast to have 1 backup to reduce memorydanielhanrahan2-8/+8
Currently Hazelcast is configured to have 3 synchronous backups and 3 asynchronous backups. These are separate, meaning there will be 7 copies in the cluster (1 original + 3 sync + 3 async backups). Even if only 1 instance of CPS/NCMP is running, it will have 7 copies in memory. Given that CPS/NCMP is typically only deployed using 1 or 2 instances, the settings are changed to 1 synchronous backup (same as Hazelcast's default configuration). This change has been tested and shown to reduce heap usage by around 100MB during 20K CM-handle registration. Issue-ID: CPS-2146 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I4a5f6d83bc35e2c13cfb32002e38dc365da34c8e
2024-03-15Merge "[Bug] Removing inner TaskExecutor to call DMI"Sourabh Sourabh5-82/+21
2024-03-14[Bug] Removing inner TaskExecutor to call DMImpriyank5-82/+21
- Removing TaskExecutor from cps-ncmp-service package as anyways the call coming over from the cps-ncmp-rest layer is managed by a different thread executor(CpsNcmpTaskExecutor) - Provided 60secs timeout value. - Spawning new thread from a different executor might not be needed - Removing @Async from a non spring managed method as its of no use Issue-ID: CPS-2150 Change-Id: Ic99632983aff2c40df81421d782cf98ec600fc41 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-03-14Modify lcm events to include dataProducerIdentifier and moduleSetTag ↵JvD_Ericsson2-11/+15
(CPS-1964 3) Issue-ID: CPS-2114 Change-Id: I52ae18fe849801706491742818b316df9f8cb554 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2024-03-13Modify the get cmHandle api to return dataProducerIdentifier, moduleSetTag, ↵JvD_Ericsson1-0/+1
and alternateId (CPS-1964 2) Issue-ID: CPS-2113 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I672e5c8408e77a5fa15d6fc2f41438aca705484c
2024-03-13Provide support for data producer identifier during registration (CPS-1964 1)JvD_Ericsson12-31/+129
- Added support for the dataProducerIdentifier to be added, and updated from blank to something once - The dataProducerIdentifier is persisted in the DB Issue-ID: CPS-2105 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I1c230be8f9402154a761e8c2ba4d8a6331965b3c
2024-03-07Mapper to form CmNotificationSubscriptionNcmpOutEventmpriyank2-0/+151
- mapper to be used in the subsequent patches - test case to support the mapping of CmNotificationSubscriptionNcmpOutEvent Issue-ID: CPS-2147 Change-Id: I7f0be81941b774a27ddc343ed304a68c23796a60 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-03-06Merge "Error reporting when registering cm handle with alternate id 2 - ↵Toine Siebelink7-126/+147
update scenario"
2024-03-05Error reporting when registering cm handle with alternate id 2 - update scenariohalil.cakal7-126/+147
- added error collection to cmhandle update Issue-ID: CPS-2109 Change-Id: I751cad7c35ec53e914888760dd66eb52054da36e Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-29Bump CPS to 3.4.7-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.4.7-snapshot - updated the relese notes Issue-ID: CPS-2135 Change-Id: Ib166ebae2e3de9a727b3d0d4d21832c8858f4108 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-29Add bearer token to NCMP async batch data passthrough (CPS-2126 #4)danielhanrahan5-14/+24
Async processing was not passing bearer token. Issue-ID: CPS-2128 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I75da35cce555c49cca638b68f106a9daba79c24a
2024-02-29Add bearer token to NCMP passthrough operations (CPS-2126 #2)danielhanrahan9-43/+74
For NCMP resource data passthrough operations, accept an authorization header and propagate it to outgoing DMI request if it has a bearer token, otherwise use same behaviour as before Issue-ID: CPS-2128 Change-Id: Ib3bf401abce4221a8b706989fb6f07618aa33fe2 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
2024-02-28Revert Spring Boot Upliftmpriyank6-28/+3
- reverting back to spring 3.1.2 - manual changes to revert as other apps not fully ready for the delivery Issue-ID: CPS-2133 Change-Id: I670b67916fa4a5d4e5bced6548b7fcd5ee12e855 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-27Bump CPS to 3.4.6-SNAPSHOTmpriyank1-1/+1
- bumping CPS to 3.4.6-SNAPSHOT - updated the release notes Issue-ID: CPS-2124 Change-Id: Id28af9340da9c1ce118b2122e97b8717860c7932 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-26Populate cmSubscription cacheemaclee8-27/+293
- Create subscription cache handler - Add unit tests Issue-ID: CPS-2025 Change-Id: I54d505369a8429d6f6a87a2af0b169f9530622c3 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-02-26Merge "Get Subscription Delta"Priyank Maheshwari6-8/+134
2024-02-26Merge "Remove subscriptionModelLoader flag"Lee Anjella Macabuhay5-50/+17
2024-02-26Merge "Uplift Spring Boot to 3.2.2"Priyank Maheshwari6-2/+25
2024-02-23Remove subscriptionModelLoader flagmpriyank5-50/+17
- removed the flag as the functionality around model loader is stable now - removed the config parameter from the application yaml file as well Issue-ID: CPS-2112 Change-Id: Ie4e3317c0689615b900dcd9bbf1896bc3a5f37b3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-23Bump CPS to 3.4.5-SNAPSHOTdanielhanrahan1-1/+1
- bump CPS to 3.4.5-SNAPSHOT and update the docs Issue-ID: CPS-2120 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia2ea81b40ec19b87d3b25359fbb25ffdcc3285dd
2024-02-23Get Subscription Deltaseanbeirne6-8/+134
-Added @AllArgsConstructor to improve readability Issue-ID: CPS-1953 Change-Id: Id457561edb8ce8c00c9c93a1453ec37da5174b38 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-02-23Merge "CmNotificationSubscription event from Dmi Plugin"Lee Anjella Macabuhay3-0/+153
2024-02-23Error reporting when registering cm handle with alternate idhalil.cakal10-204/+218
- refactored registration code all use cases; 1 method for each action - introduce new cps error code; 111 - TODO: error reporting registration, UPDATE Issue-ID: CPS-2100 Change-Id: I5049777ee4e08fdc94aa1db09e668e952ed8e1c3 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-23Merge "NCMP to DMI CmSubscription Event"Lee Anjella Macabuhay2-0/+138
2024-02-22Uplift Spring Boot to 3.2.2waqas.ikram6-2/+25
- Upgraded hypersistence-utils-hibernate-60 to hypersistence-utils-hibernate-63 - Introduced @Qualifier annotations where needed Issue-ID: CPS-2101 Change-Id: I8303592ed91584deb6ca5cd4e49800210b6ea989 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2024-02-22Merge "NCMP to Client Cm Subscription Event"Lee Anjella Macabuhay2-0/+119
2024-02-22Introduce class for Module Delta during module syncdanielhanrahan4-81/+57
Removed ImmutableTriple<String, Map<String, String>, Collection<ModuleReference>> and replaced it with a ModuleDelta class to hold results. Split syncAndCreateOrUpgradeSchemaSetAndAnchor into methods syncAndCreateSchemaSetAndAnchor and syncAndUpgradeSchemaSet Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I95462ab55dcae7d98b9e2671fc278c4ded45f3fc
2024-02-22Improve performance of moduleSetTag lookupdanielhanrahan2-25/+26
- Using absolute cps-path /dmi-registry/cm-handles is faster than descendant cps-path //cm-handles due to CPS-2087. - Converting DataNodes to YangModelCmHandle allows checking if the handles are READY without needing to send additional DB queries via cmHandleQueries::cmHandleHasState. Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ied7e884b0f779f394854603a7f8b186d09eb5be8
2024-02-22Merge "Refactor YangDataConverter.convertCmHandleToYangModel"Sourabh Sourabh9-32/+24
2024-02-22Refactor check for no new modules in Module Syncdanielhanrahan4-48/+40
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-22Refactor YangDataConverter.convertCmHandleToYangModeldanielhanrahan9-32/+24
This method redundantly takes cmHandleId as a parameter, even though the DataNode representing a CM-handle is guaranteed to have the ID in a leaf called 'id'. Issue-ID: CPS-245 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib10097b6e13f7188fd933d6f6913110ec664273e
2024-02-21Improve unit test for regsitration, upgradeToineSiebelink1-13/+14
- verify schema set is created - add test case for upgarde to same tag Issue-ID: CPS-2027 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Id853f477d2a90a86d13828a27b9269c62e1d9462
2024-02-21Merge "adding isUniqueSubscriptionId method"Priyank Maheshwari3-2/+37
2024-02-21Upgrade yang modules using module set tagdanielhanrahan9-280/+110
- 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-21NCMP to Client Cm Subscription Eventmpriyank2-0/+119
- CmNotificationSubscriptionNcmpOut event to inform the client about the subscription he requested - Testware for the same - Code to provide the data to this producer will be part of other patches Issue-ID: CPS-2108 Change-Id: Ic302e798a20da54dd3c56d2cb792b800446cc2d3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-21Fix handling of blank moduleSetTagdanielhanrahan3-8/+10
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 handledanielhanrahan3-12/+15
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 cachesleventecsanyi2-118/+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-20CmNotificationSubscription event from Dmi Pluginmpriyank3-0/+153
- Added infrastructure related code to read event from the dmi plugin - Just consuming and reading the message. - Core logic to introduced to be part of subsequent patches Issue-ID: CPS-2106 Change-Id: Ic58f4f80b3dded32df95daecac42315fa9212f58 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-19adding isUniqueSubscriptionId methodemaclee3-2/+37
Issue-ID: CPS-2044 Change-Id: I26b209ead80add7e60b4de9257a9f5c326ddea6f Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-02-19NCMP to DMI CmSubscription Eventmpriyank2-0/+138
- Ncmp to have a producer which converts CmNotificationSubscriptionDmiInEvent to Cloud event and then publishes it - For now , using the old topic prefix as topic name. Once topic names are finalized then they can be configured - Testware for the publishing code Issue-ID: CPS-2103 Change-Id: I83b6ce5b6647e92313839b25492cb076e528ce3e Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-16Use DB for checking Alternate IDshalil.cakal12-341/+424
- 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 Pluginmpriyank2-0/+169
- 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 refactoringmpriyank2-16/+15
- 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 modelmpriyank6-12/+13
- 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 refactoringmpriyank13-248/+125
- 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 "Correct use of Spock setup and cleanup methods (no need for @Before ↵Toine Siebelink3-39/+12
@After)"
2024-02-08Merge "Revert "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - ↵Toine Siebelink7-134/+43
error collection""