summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src
AgeCommit message (Collapse)AuthorFilesLines
2024-06-05Change ApplicationEvent for ModelLoadingmpriyank5-26/+25
- Application to use ApplicationStartedEvent as the trigger to start the ModelLoading process instead of ApplicationReadyEvent - Modified the testware to reflect the same Issue-ID: CPS-2211 Change-Id: I3176b6373f585ec1915c3d43c553e233660225f5 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-31CM SUBSCRIPTION: Update schemasmpriyank4-11/+11
- 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 URLsToineSiebelink14-392/+417
- 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 Sourabh4-35/+26
passthrough calls"
2024-05-29CPS-2187 - Move Module Set Tag into request body for dmi data access ↵david.mcweeney4-35/+26
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 Serviceleventecsanyi14-89/+154
- 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 updatempriyank3-12/+22
- 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>
2024-05-27CmSubscription overlapping casempriyank4-16/+74
- Directly ACCEPT the CmSubscription request in case of overlapping scenario - The confirmation will be sent out when the DMI timeout has happened - No request sent out to DMI plugin in this scenario Issue-ID: CPS-2237 Change-Id: Ic799801058e9c8e1c2db8780a42ab85ea306f45e Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-23Merge "CM SUBSCRIPTION: add new subscription for non existing xpath"Priyank Maheshwari2-70/+120
2024-05-23CM SUBSCRIPTION: add new subscription for non existing xpathemaclee2-70/+120
- added new method for when adding new subscription for non existing xpath but existing cmhandle Issue-ID: CPS-2207 Change-Id: I149fbaea2f276503cb9d45c8807519bbe0417f3b Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-05-22Remove un-used code of RestTemplatesourabh_sourabh16-110/+111
- Removed unused property belons to resttemplate - Refactored dmi properties class (from static internal class) - Overriden getter method of dmi basepath that removes any leading and trailing slashes from it. Issue-ID: CPS-2202 Change-Id: I16f61388fce2a6b9e258788fa826d485581d6138 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-05-20CPS-2182 - #4 Add module Set tag to NCMPs DMI Batch Data interfacedavid.mcweeney6-12/+53
Change-Id: I46b261e0a0ef2d37a307291931ba67762fb7767d Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: CPS-2182
2024-05-20Merge "CPS-2187 - #6 Add module Set Tag to ncmp (single cm handle) data ↵Toine Siebelink3-29/+56
request to dmi"
2024-05-20Merge "CmSubscription topics param update"Lee Anjella Macabuhay6-19/+12
2024-05-17Replaced RestTemplate with WebClient in synchronous DMI callssourabh_sourabh17-334/+424
- added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - encode query params for DMI request - added configurable buffer size - Re-used ncmp.dmi.httpclient.maximumConnectionsTotal parameter (as documented in RTD) to control webclient connection poolsize Issue-ID: CPS-2173 Change-Id: I21584563034d58e8ae3ff3cbcf172e0d14b408fb Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-05-17CmSubscription topics param updatempriyank6-19/+12
- topic application parameters updated to be in sync with the actual convention we are following for the flow. - environment variables also updated to follow the same - removed the unused parameters related to notification Issue-ID: CPS-2210 Change-Id: If5adb3dac1ce81df5afe2e99f99513adc2011cc9 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-16CPS-2187 - #6 Add module Set Tag to ncmp (single cm handle) data request to dmidavid.mcweeney3-29/+56
Change-Id: I59cdb021d8f2f767b943f09715f4becad820e786 Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: CPS-2187
2024-05-16Merge "CPS-2181 - #1 Included Module Set Tag in NCMP calls to DMI for Yang ↵Toine Siebelink3-10/+40
Module Resources"
2024-05-15CPS-2181 - #1 Included Module Set Tag in NCMP calls to DMI for Yang Module ↵david.mcweeney3-10/+40
Resources Change-Id: I4f8cf79667e3155f49b9109d26b5807f5d54f90c Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: CPS-2181
2024-05-09Ncmp out event for REJECTED scenariompriyank3-9/+36
- Handling and publishing the event to client when dmi plugin rejects applying the subscription - test scenarios to support the same Issue-ID: CPS-2214 Change-Id: I2ac6d125a7262a7428a962d81a26a33594b570d9 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-03Schedule response to clientmpriyank2-7/+16
- Scheduling sending the response by reading whatever is present in the cache for subscription after a pre-configured time. - Also added test validation for the same Issue-ID: CPS-2209 Change-Id: Ifacb0b12734a0529e671b0b63836189a243e453c Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-02Merge "Query operation path by alternate id"Daniel Hanrahan4-14/+117
2024-04-30CM Subscription: Link method to publish to DMI in service layeremaclee10-36/+228
- Add call to method to publish to DMI for create request - Refactor calls to all Mappers to a single Mapper class handler Issue-ID: CPS-2196 Change-Id: I6476f47684ea9a0f55a7d207c1931a0fef8aa672 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-04-30Merge "CM Subscription: REfactor classes of producers and consumers"Priyank Maheshwari13-14/+157
2024-04-30Reverted web client changes as it breaking CPS functionality:sourabh_sourabh15-252/+95
1. Error handling not working 2. Unable to make dmi call as url appens extra "/" Commit 1: Replace RestTemplate with WebClient in synchronous DMI calls - added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - ingnored failing NCMP related integration tests (related to WebClient, will be fixed in a future patch) - encode query params for DMI requests Commit 2: Module sync task failing with WebClient - added configurable buffer size Commit 3: Re-use ncmp.dmi.httpclient.maximumConnectionsTotal parameter (as documented in RTD) to control webclient connection poolsize Issue-ID:CPS-989, CPS-2195, CPS-2198 Change-Id: I6c71ab2801b222708404f51bd60f2b3031ebf32e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-04-29CM Subscription: REfactor classes of producers and consumersemaclee13-14/+157
Issue-ID: CPS-2196 Change-Id: I0b56f37a1b615b9615d6bd7005348733e1739a46 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-04-29Re-use ncmp.dmi.httpclient.maximumConnectionsTotal parametersourabh_sourabh3-19/+25
(as documented in RTD) to control webclient connection poolsize Issue-ID: CPS-2198 Change-Id: Id441208c66433b2539adf83a0881c3c3c79d2b15 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-04-29Query operation path by alternate idsourabh_sourabh4-14/+117
- New method is written to find longest match for fdn path - Introduced new exception for alternate id Issue-ID: CPS-2142 Change-Id: Ifd048574db88586a2d37a3681034a083eb2b7691 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-04-29Merge "Module sync task failing with WebClient"Daniel Hanrahan3-1/+9
2024-04-29Merge "CM SUBSCRIPTION: Remove accepted and rejected cache entries"Priyank Maheshwari5-23/+95
2024-04-26Module sync task failing with WebClientleventecsanyi3-1/+9
- added configurable buffer size Issue-ID: CPS-2195 Change-Id: I7cdb09856fd4d80134a91e54faa7e6600f3721dc Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-04-26CM SUBSCRIPTION: Remove accepted and rejected cache entriesemaclee5-23/+95
Issue-ID: CPS-2185 Change-Id: I01ba8e4f6e0e42a31ad5234ad468ac4625c2b0f3 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-04-25Replace RestTemplate with WebClient in synchronous DMI callsleventecsanyi15-97/+242
- added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - ingnored failing NCMP related integration tests (related to WebClient, will be fixed in a future patch) - encode query params for DMI requests Issue-ID:CPS-989 Change-Id: I26434568f68266e95669a51c134978ddd197d802 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-04-24Merge "Reject create request with duplicated subscriptionId"Priyank Maheshwari7-17/+212
2024-04-24Reject create request with duplicated subscriptionIdemaclee7-17/+212
Issue-ID: CPS-2184 Change-Id: I1bddb02239e6a2d3f47aa731eb24a9f1f64e63b5 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-04-24NcmpCloudEventBuilder refactoringmpriyank3-16/+18
- Builder named as NcmpEvent and we have specialised method to build the NcmpEvent as cloud event now - Introduced source as the builder default property Issue-ID: CPS-2191 Change-Id: I51c571313091ce9a4d10f4e1af7423eee999cea8 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-04-23[BUG] Make failed async task report failure on Kafka topicdanielhanrahan2-11/+91
- In event of async task timeout, error code 102 (DMI_SERVICE_NOT_RESPONDING) is sent to client topic. - In event of unexpected error (such as database unavailable), error code 108 (UNKNOWN_ERROR) is sent to client topic. - The default timeouts have been adjusted so that the task timeout (60s) is longer than the HTTP and Database timeouts (30s), so that expected codes are returned. Issue-ID: CPS-2186 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I84c3447a625e084c445ab2f5c01e2b32a0c971ac
2024-04-18Fix build issue with subscriptionemaclee2-3/+3
Issue-ID: CPS-2164 Change-Id: I49a18df0927b5beff62a12f9bc2a2e8e486537c9 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-04-17Merge "Cm Subscription: Remove subscription method"Daniel Hanrahan3-45/+115
2024-04-17Cm Subscription: Remove subscription methodemaclee3-45/+115
- method to remove a subscription Id from leaflist - condition if subscription list is empty, remove subscription all together Issue-ID: CPS-2164 Change-Id: Id694f441f9675fa9a048e3b824e1f02fae73f87e Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-04-12Merge "Handle Subscription Response from DMI"Priyank Maheshwari4-6/+126
2024-04-12Handle Subscription Response from DMIseanbeirne4-6/+126
Issue-ID: CPS-1972 Change-Id: Idb8ad14f06e365707404d099a4581282d4a0add9 Signed-off-by: seanbeirne <sean.beirne@est.tech>
2024-04-11Merge "Update depcrecated method in KafaConfig"Toine Siebelink2-7/+11
2024-04-11Update depcrecated method in KafaConfigToineSiebelink2-7/+11
Issue-ID: CPS-2179 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I882746a68f2d32f07fbcfeeac1f45b9dbbb8c62e
2024-04-10Define a java based datastructure for DataJob and interfacesourabh_sourabh9-4/+340
- Defined java interface to handle datajob - Defined all the modules needed to process data job request - data jon response module id also defined - dummy impl. of java interface Issue-ID: CPS-2155 Change-Id: I20c7b621aa4bd40fe7758cb19b8720fc7cf5164c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-04-10Document new NCMP Status Code: 112, message too largeToineSiebelink1-1/+2
- Updated RTD - Added new value to relevant Enum (although not used in our code) Issue-ID: CPS-2178 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I4ba8c1622921919ae253a292d96307439ef20e2a
2024-04-04Add moduleSetTag to the request towards dmi pluginleventecsanyi4-4/+7
- mapping module set tag to DmiRequest Issue-ID: CPS-2030 Change-Id: I487e48baf98919d3ff5e25d2428a065dd3a30335 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-03-29Merge "Uplift Spring boot 3.2.4"Priyank Maheshwari5-8/+33
2024-03-29Uplift Spring boot 3.2.4emaclee5-8/+33
- uplifted spring boot from 3.1.2 to 3.2.4 - removed redundant dependencies - upgraded relevant dependencies - use of @Bean(some_name) is give a specific bean name - using @Bean(some_name) with @Qualifier so on the injection point to specify which bean to actually inject, this is used as we deal with multiple beans of the same type. Issue-ID: CPS-2101 Change-Id: I64d5bf567b9eb03fb39034a46528d0160b332715 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-03-27Merge "Scheduled task for Subscription Response"Lee Anjella Macabuhay3-18/+182