aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api
AgeCommit message (Collapse)AuthorFilesLines
2024-09-04Merge "Support alternate id for CPS-E05 GetCmHandleDetailsById"Daniel Hanrahan1-3/+4
2024-09-04Support Alternate-id for CPS-E05 module searchseanbeirne1-3/+4
Issue-ID: CPS-2370 Change-Id: I0ca3a1df232ad9fd9f76695cd6ea21d36919130d Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-09-03Support alternate id for CPS-E05 GetCmHandleDetailsByIdmpriyank1-3/+4
- added support for alternate id when retreiving cmhandle details by id - Note : The performance for alternate id fetching will be taken care as part of a separate story. Issue-ID: CPS-2385 Change-Id: I019b85d128e4b0a1f1d61623c92e1a2381c406c0 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-09-02Support Alternate-id for CPS-E05 module definitionseanbeirne1-6/+8
Issue-ID: CPS-2379 Change-Id: Idd180c5792575522ceaaa094b94c8f5b36790186 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-08-30Support alternate id interface for CPS-E-05 - publicPropertiesmpriyank1-3/+4
- added alternate id support for the existing endpoint - Incorporated previous comments on the indendation - Added new component cmHandleReferenceInPath in openapi docs to depict the correct example Issue-ID: CPS-2378 Change-Id: I63e752fbb6cb0bde49d1ced53f063743d904d74e Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-08-29Correctly report trust level if DMI is downdanielhanrahan1-10/+16
Current trust level should factor in both CM-handle and DMI trust levels (effective trust level). Issue-ID: CPS-2375 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib531633a0e79af2bf9cf73d2b0b02d7a58777458
2024-08-29Merge "Invoke Policy Executor and handle not-allowed response"Sourabh Sourabh1-0/+42
2024-08-29Invoke Policy Executor and handle not-allowed responseToineSiebelink1-0/+42
- Execute Policy Executor REST request - Act (and log) on response from Policy Executor - Add dispatcher(mock) in integration test FWK - Add integration test for allow/non allowed and no authorization use cases - disabled PolicyExecution feature by default (only enabled for testware) Issue-ID: CPS-2247 Change-Id: I111ba9ba89cc91649b63b20f88414aa33721dbeb Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-08-27Support for alternate-id CPS-E05 composite statempriyank1-2/+5
- Added support for alternate id for the composite state API for CPS-E05#15 Issue-ID: CPS-2377 Change-Id: I1af41efb8cec762be68250cae7c1e98fbc61a4f5 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-08-26Remove trust level from cache when cm handles deletedhalil.cakal1-8/+4
- handle removal of device trust levels from the cache when cm handles deleted - handle initial dmi registration inside trust level manager Issue-ID: CPS-2315 Change-Id: I605ed78f164d7534069de8352dc3b0a81a4ce22c Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-08-21Revert "Remove trust level entries from cache when cm handles deleted"Lee Anjella Macabuhay1-4/+8
This reverts commit 77b8e25e14e698c853334ef57459c21d7813911a. Reason for revert: Performance degredation Change-Id: Ibd88e626189d821680568c63952b95e7d1e05dc4 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-08-21Remove trust level entries from cache when cm handles deletedhalil.cakal1-8/+4
- handle removal of device trust levels from the cache when cm handles deleted - handle initial dmi registration inside trust level manager - add get effective trust level function to trust level manager for get and query cm handle APIs (to set trust level on the return object) Issue-ID: CPS-2315 Change-Id: I8daa4a2ad8310de10e35fdc50351deb85fd3ffd0 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-08-16Get data job result from DMIleventecsanyi1-0/+45
- added DataJobResult interface - extended the DmiRestClient to retrieve status - added mock response to DmiDispatcher Issue-ID: CPS-2296 Change-Id: I551afd827cccd91c5f9837bd4923b30320865d55 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-08-16Merge "Refactored Data Job interfaces"Priyank Maheshwari2-6/+7
2024-08-13Refactored Data Job interfacesleventecsanyi2-6/+7
-modified writejob & status endpoints Issue-ID: CPS-2360 Change-Id: I87647f59493886593825f5175c6ed708e55b3e30 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-08-12Support alternate Id interface for CPS-E-05 #2seanbeirne1-1/+17
- Supports Alternate Ids for getResourceDataForCmHandle Issue-Id: CPS-2279 Change-Id: I1f145308cec5b545fab2d5c96efbc00fc3a110f4 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-07-26Merge "Added missing authorization header to DataJobService"Sourabh Sourabh1-4/+11
2024-07-26Added missing authorization header to DataJobServiceleventecsanyi1-4/+11
- added auth header to the interface & updated testware Issue-ID: CPS-2330 Change-Id: I091fc5c3c3fa323024f55055129cc7240732479a Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-07-25Get data job status from DMI Pluginleventecsanyi1-0/+45
- added java interface - extended DmiRestClient to get data job status - added testware Issue-ID: CPS-2296 Change-Id: If9006bba06397724c15bdc3bdf1bd52a0188f002 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-07-25Integration test for the writeDataJobleventecsanyi1-1/+1
- added Stub controller - created integration test for writeDataJob Issue-ID: CPS-2236 Change-Id: I067a11dc5bfe629d50128cf303b2a81abc75a348 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-07-09Refactor remaining classes package structureToineSiebelink18-1167/+27
-Introduced org.onap.cps.ncmp.config for all config type classes like http, kafka etc. -Introduced org.onap.cps.ncmp.impl.dmi for dmi specif classes like DmiRestClient etc. -Moved most exception classes to org.onap.cps.ncmp.api.exceptions (only two were 'internal' i.e. NOT used in REST so left in org.onap.cps.ncmp.exceptions) -Deleted unused DateNodeHelper class (and related testware) -Moved some classes to org.onap.cps.ncmp.impl.utils -Moved messaging test base classes to org.onap.cps.ncmp.impl.utils.events -All imports were reorganised automatically by IntelliJ -did NOT update any copyright dates (seems incorrect to me anyway) Issue-ID: CPS-2257 Change-Id: Ie28b1777ea278064b46c6a1c3a28f4d0696565e2 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-07-04refactor cmsubscription codempriyank20-1827/+0
- Moved cmsubscription to the impl package instead of api. - Below packages are renamed or newly created for code and tests - moved ..api.cmsubsription to ..impl.cmsubscription - renamed ..api.cmsubscription.mappers to ..impl.cmsubscription.ncmp or dmi as per the functionality - renamed ..api.cmsubscription.model to ..impl.cmsubscription.models - removed ..api.cmsubscription.producer/consumer and classes moved to ..impl.cmsubscription.ncmp/dmi - new package ..impl.cmsubscription.cache to hold cache config and cache operations - new package ..impl.cmsubscription.avc to hold the CmAvcEventConsumer for the notifications emitted as a result of the subscriptions - Removed the prefix CmNotificationSubscription for majority of the classes , not removed for Config and model classes - Renamed the schemas and package structure as per the code refactoring Note: *EventsFacade and *MappersFacade to be removed in the next patchset Issue-ID: CPS-2298 Change-Id: I1d788ab745d65965570e28beaefa511cbe4a8547 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-07-03 CPS NCMP: Resolved high cardinality of prometheus metrics for dmi service urlsourabh_sourabh6-237/+226
- Used autoconfigured web client builder for http_client_requests_* prometheus metrics. - Refactored dmi service url builder to create url template and its variables. - Web client is modified to use uri(urlTemplate, urlvars) version. - Deleted InvalidDmiResourceUrlException that no longer needed. - Used DmiServiceUrlBuilder to build dmi health check service url. - Created a new pkg url.builder into utils to have all related classes and record. Issue-ID: CPS-2121 Change-Id: Id67e0f0d4e640bb8f9eea0b6c2db1dba3468e1d7 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-07-01Improve handling of Invalid Operation exceptionToineSiebelink2-1/+33
- MOve to API package - Handle in REST Controller to return BAD REQUEST Issue-ID: CPS-2256 Change-Id: I4f96519aaf2e7f781729c8b8671ea02630a2e0a8 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-27repackage 'data' featureToineSiebelink35-2041/+20
- moved relevant classes into these (new) packages: api.data.exceptions api.data.models impl.data impl.data.async impl.data.exceptions impl.data.models impl.data.utils utils.events - removed old unused event class - moves some missed inventory related class to the right place Issue-ID: CPS-2256 Change-Id: I75563e063acc0054769d8f2b13146e6c1d1c6054 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-27move lcm/common events classesToineSiebelink16-1064/+7
-moved api.impl.events.lcm to impl.inventory.sync.lcm -moved most api.impl.events class to utils.events (remaining classes in api.impl.events belong to cmsubscrption and Priyank wil take care of those) Issue-ID: CPS-2258 Change-Id: I1818194e708aa0d9c713b470e878997c2f26fb13 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-26Move TrustLevel FeatureToineSiebelink9-351/+24
-Moved TrustLevel impl from Controller to Inventory Facade -Applied new package name convention using impl\inventory\trustlevel for this (sub)feature -Renamed some trustlevel related classes to better describe their role -Disabled failing architecture test (agreed this is tech. debt and created CPS-2293) -Refactored YangDataConverter method names and signatures (moved Spec to correct place) -Cleaned up names and javadoc of class now called DeviceTrustLevelMessageConsumer -Applied conventions to modified test methods Issue-ID: CPS-2255 Change-Id: Iccd20541488e6b61444bb2c7406c90e61a34124d Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-24Repackage Inventory FeatureToineSiebelink57-3758/+78
- decided that cm handle queries is part of 'inventory' feature - a lot of files (~100 total) have changes because of some files have been moved. - The reviewers should probably just focus on the MOVED/renamed (~30) files - New packages (top level only): -- org.onap.cps.ncmp.api.inventory -- org.onap.cps.ncmp.impl.inventory -- org.onap.cps.ncmp.impl.models (common models NOT used in API, this was unforeseen) -- org.onap.cps.ncmp.impl.utils - I am NOT updating copyright years as part of this commit since there are no real code changes and it is simply NOT worth the effort TODO: - extend scope to 'TrustLevel' as an 'internal feature' (TBD) Issue-ID: CPS-2255 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I40b4efc8326068ab9ae1f31b77f46b2fe8579431
2024-06-21Merge "Introducing NCMP Facades"Sourabh Sourabh19-579/+545
2024-06-21Merge "Spliting a data-job into sub-jobs for DMI Plugin"Sourabh Sourabh5-1/+155
2024-06-20Introducing NCMP FacadesToineSiebelink19-579/+545
- NetworkCmProxyDataService was polluted with many non-data operations - it is now split into: 1) NetworkCmProxyFacade, a single thin facade for the (main) controler to redirect calls to the correct services 2) CmHandleRegistrationService(Impl), methods related to registration only - introduced NetworkCmProxyInventoryFacade for the invenoty controller - renamed some services for consitency and clarification - Use facade to acces ncmp data request handlers (instead of direct from controller) - remove unnecesarry wrappings between request handlers and facade - split facades according to names: data & inventory (the REST controllers are not split properly so I think one rest controller will end up needing both facades) Issue-ID: CPS-2263 Change-Id: I250732aa16ec28b43ff642d2adf10ba36f67290e Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-20Spliting a data-job into sub-jobs for DMI Pluginleventecsanyi5-1/+155
- algorithm for create sub-job requests - added new method to DmiServiceUrlBuilder to get the write job url - created WriteOperationExaminer, DmiSubJobClient & testware Issue-ID: CPS-2142 Change-Id: I258d334ef346cd388341a1deb4078d24d8bdb7cc Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-06-19Handle high frequency (faster then DMI) of passthrough request in NCMPsourabh_sourabh2-71/+97
- Added pendingAcquireMaxCount property into appliaction.yml. - Added findbugs google annotations dependency. - Supressed "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" spotbugs low error for reactor.netty.resources.ConnectionProvider. Issue-ID: CPS-2262 Change-Id: Ie755e40282473933f2052fbe7654e7090bb9b337 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-06-17Refactor and Move NCMP Data Request HandlersToineSiebelink3-0/+274
- Simplified NCMP Rest Request Handlers - Moved responsEntity wrapping to Controller so most handler methods can have clear return types - Moved NCMP Rest Request Handlers to Service Layer - Moved related exceptions and utils to Service Layer - Used Lombok for constructors - Improved related testware Issue-ID: CPS-2266 Change-Id: I0025fab1c92e0d613825093b6e4b43dae044c01a Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-13 #2: Used async version of web client for single cm handle read operationsourabh_sourabh5-44/+62
- Code change is done to use async web client for single cm handle read data operation. - CpsNcmpTaskExecutor class and groovy test code is removed. - Use of supplier code is removed from cm handle Query service. Issue-ID:CPS-2259 Change-Id: I2b7a36e8a151a9224937afd876fceb30be6a24ce Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-06-13 #1: Used async version of web client for batch read operationsourabh_sourabh5-87/+74
- Exposed async version of post method into dmi rest client. - Code change is done to use async web client for batch data operation. - Use of CpsNcmpTaskExecutor code is removed. Issue-ID: CPS-2174 Change-Id: I7840fd8c6d9debe42e50c860f9cf39d64274df72 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-06-06#1: Dedicated web client instance is assigned for data, model and health ↵sourabh_sourabh5-60/+168
services - Switched web client instance based on dmi service type (like data or model) - 3 diff. beans are configured for data, model and health dmi service. - Added configurable properties for data and model. - Hard coded properties are assigned for health service. Issue-ID: CPS-2231 Change-Id: I39fb739c07c41430dae43509fe29ece5306b7d71 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-06-05XML content support on update node leavesRudrangi Anupriya3-4/+9
Issue-ID: CPS-2071 Change-Id: Ibe7f59fbfcbb03703626132c6d5c2afde0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-06-05Merge "CM SUBSCRIPTION: Add delete use case #2 (DMI-NCMP)"Priyank Maheshwari3-28/+79
2024-06-05Merge "Added OpenTelemetry to CPS"Toine Siebelink2-0/+146
2024-06-04Merge "CM SUBSCRIPTION: Add delete use case #1 (Client-NCMP)"Priyank Maheshwari3-23/+57
2024-05-31Added OpenTelemetry to CPSdavid.mcweeney2-0/+146
Change-Id: I192fa53e293ea43cdff92ebd44d0382eb290bb76 Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: CPS-2172
2024-05-31CM SUBSCRIPTION: Add delete use case #2 (DMI-NCMP)emaclee3-28/+79
Issue-ID: CPS-2241 Change-Id: I218c46e9c16cc78025450494f5019bde1f351a40 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-05-31CM SUBSCRIPTION: Add delete use case #1 (Client-NCMP)emaclee3-23/+57
Issue-ID: CPS-2241 Change-Id: Idd074ff4d29cf11f45f1c69200788b2f39b49e74 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-05-31CM SUBSCRIPTION: Update schemasmpriyank1-5/+5
- updated the cm subscription schemas with proper case as agreed before for the events - fixed the tests to reflect the camelCase change Issue-ID: CPS-2245 Change-Id: I64fb8b27a5f64280dfa19d86ae310e6b5309de39 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-29Simplify Code around building DMI URLsToineSiebelink5-281/+127
- Bug analysis showed some unclear and complicated code for building URLs - This patch is to clean up the related code and show more clearly what is encoded and what is not - Use SPringBoot provided builder to apply correct encoding of all URI parts - DmiOperations base class no longer need as no common code model and data operations anymore - Converted builder to POJO (client needs to provide the only dmi properties upon build) - Added some missing test (in affected code) to increase coverage percntage (as the production code has significantly reduced in size the overal coverage was inadvertently reduced below the treshold) - Added more unit test. Now impl.operations' package has 100% - removed the test fro Dmi Exception that was incorrectly callign the handleException methdod directly instead of mocking an exception it was really a dupclicate of a test I added but I was able to re-use the event checkign in my test Issue-ID: CPS-2246 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I1ff196cd03bbb95f5877ee590c321febeb672800
2024-05-29Merge "CPS-2187 - Move Module Set Tag into request body for dmi data access ↵Sourabh Sourabh2-15/+7
passthrough calls"
2024-05-29CPS-2187 - Move Module Set Tag into request body for dmi data access ↵david.mcweeney2-15/+7
passthrough calls Change-Id: I9c807d2ef5b3712bf3f8ee5db7663d9628eef3bb Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: CPS-2187
2024-05-28Restructure(package) DataJobs feature in NCMP Serviceleventecsanyi10-121/+9
- restructured already existing classes - added testware for AlternateIdMatcher Issue-ID: CPS 2240 Change-Id: I5691ed99627353903689cd2929163f77ed8c4eca Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-05-27CmDataSubscription status code updatempriyank2-8/+19
- Removing the unused NcmpRespnseStatus internal codes and messages - Introducing statusCode 1 for ACCEPTED and 104 for REJECTED of CmSubscription - Added check for status code and message both in the flow Issue-ID: CPS-2238 Change-Id: Id99f099a398392dbef1504f9d7c658665d163902 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>