summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
AgeCommit message (Collapse)AuthorFilesLines
2022-06-22Data Sync Watchdog Processsourabh_sourabh16-56/+455
- Get all the Cm Handles state in READY and Operational datastores sync state in UNSYNCHRONIZED - Get a random Cm Handle - Get the first resource data from the node - Save the data in Cps Db - Update the Operational datastores sync state to SYNCHRONIZED Issue-ID: CPS-1052 Issue-ID: CPS-1053 Issue-ID: CPS-1054 Change-Id: I9a20391ef30e6d56c4d789a92b8bf42cd3756c62 Signed-off-by: Lathish <lathishbabu.ganesan@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-06-22Merge "Eliminate cmhandle-properties tag"Joseph Keenan1-2/+2
2022-06-21Merge "Quick fix for performance degradation bug"Toine Siebelink2-11/+14
2022-06-21Eliminate cmhandle-properties tagmpriyank1-2/+2
- Eliminate the cmhandle-properties tag in case of DELETE operation - Fixed Test cases corresponding to that Issue-ID: CPS-1098 Change-Id: Icd5e08403e0b101baf682f5e558c36ee4ebfd5c3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-21Merge "Publish LCM Events"Joseph Keenan9-9/+65
2022-06-21Merge "Exclude CM-Handles that are not in state 'READY'"Toine Siebelink2-0/+20
2022-06-20Publish LCM Eventsmpriyank9-9/+65
- Publish LCM Create Event when watchdog process moves the cmHandle state from ADVISED to READY - Publish LCM Update Event when public properties are updated, no event when DMI propertis are updated - Publish LCM Delete Event when a cmHandle is been removed - Related test scenarios update - See User Story CPS-1034 for related sub-tasks Issue-ID: CPS-1090 Change-Id: I70d81fde7c80794ea13a10cd1f235a7012b20b3c Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-17Quick fix for performance degradation bugkissand2-11/+14
Issue-ID: CPS-1085 Change-Id: I15715ef37909d4e2fe2f1f80e621a21c8037fbd0 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-16Merge "Fix sonar code smells"Joseph Keenan5-26/+26
2022-06-15Merge "Retry CM-Handles that are LOCKED, Failed-to-Sync"Joseph Keenan7-18/+100
2022-06-15Retry CM-Handles that are LOCKED, Failed-to-Syncputhuparambil.aditya7-18/+100
Watchdog added to fetched locked cm handles by Lock reason and operation sync state Tests updated Issue-ID: CPS-878 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I0ecc519e93b097ec3d309db7f686fb23a0fc59b2
2022-06-15NcmpEvent creation and Mappingmpriyank4-0/+276
- Mapping class to create header and event payload based on type of operation i.e CREATE, UPDATE and DELETE. - Service class to get CmHandle public properties, create event and delegate request to event publisher. - Modification in NcmpEvent schema json to mark field as String instead of URI - Test scenarios - UPCOMING: Call the service method from relevant code to actually publish the event. Issue-ID: CPS-1037 Change-Id: I6bb7de4b27e602c4d8ee6a5528a866e5f7e8799a Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-14Exclude CM-Handles that are not in state 'READY'JosephKeenan2-0/+20
Exclude CM-Handles which are not in state ready from ncmp operations Issue-ID: CPS-877 Change-Id: I59783c860091d99e328cec9ccafb34c09b277753 Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Signed-off-by: lukegleeson <luke.gleeson@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2022-06-13Fix sonar code smellskissand5-26/+26
- https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYFC3OguDZ5Vb3SQMOU1 Issue-ID: CPS-1016 Change-Id: Ic8fdae78337da1ff2c239ae2dfae67e23e88a4bb Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-09Merge "Handle errors during cm handle search"Toine Siebelink1-4/+4
2022-06-09Handle errors during cm handle searchkissand1-4/+4
Issue-ID: CPS-1067 Change-Id: Iadc3413a29f9a455e658ec5bcaffc4881b7f7684 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-09Merge "Fix sonar code smells"Toine Siebelink1-4/+5
2022-06-09Remove Model Sync From RegistrationToineSiebelink13-93/+65
Decouple the model sync from registration process Sync now only happens during the watchdog process Cm Handles are persisted in state ADVISED when registartion is successful Issue-ID: CPS-876 Change-Id: Ia3353a0ab1c65a9db553e09138d5690d4f915727 Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2022-06-09Fix sonar code smellsemaclee1-4/+5
- Remove useless curly braces around statement (https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYD_5_HLFWip2-KRhcLs) - Define a constant (https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYEj9y6sq272EuFEMiu-) Issue-ID: CPS-475 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Ib430fac481b29dba8725ed0dac4da3daa56a3984
2022-06-09Merge "Ncmp Producer Setup"Toine Siebelink5-60/+257
2022-06-08Merge 2 'query' end points in NCMPkissand11-146/+646
- merge two endpoint for a same backend - use xPath query instead of sql query - modify searches endpoint to return a cmHandle object with all public properties - handle old (deprecated) queries - handle public property queries - create useful examples - use more verbose error messages - simplify openapi yamls - create new query service - change second endpoint name to a better matched name - modify legacy tests with new requirements - create new tests for the new scenarios Issue-ID: CPS-1016 Change-Id: I7476e9dbd510ec93b5b48ce85d477ecb2dadffff Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-06-07Ncmp Producer Setupmpriyank5-60/+257
- Ncmp Kafka Publisher setup - Test scenarios - Refactored existing test class which were using kafka producer and consumer properties to use from common MessageSpec - Upcoming : Implementation Proposal and Actual logic to publish the correct event Issue-ID: CPS-1035 Change-Id: I93ae392e8c4e4c85d88ca7858332e79b59e85535 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-01Merge "Module Sync Lock State implementation"Toine Siebelink21-220/+350
2022-06-01Module Sync Lock State implementationDylanB95EST21-220/+350
Implementation of Lock state for module sync watchdog Cm Handle state is locked if any exception is found during sync process Make changes around READY state method in line with the new schema set Add last updated time to composite state Remove running datastore references as this is being done at a later time Issue-ID: CPS-875 Change-Id: I6bd159faefef2fa84dbf536c292ff0a132793381 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-06-01Merge "DMI-NCMP Asynchronously Publish Response Event to Client Topic"Toine Siebelink1-0/+67
2022-06-01Fixing CompositeState mappingmpriyank2-5/+11
- Mapper null check - NcmpServiceCmHandle mapping for the new composite state - Added global parameter for jackson to include only NON_NULL attributes in the response Issue-ID: CPS-1066 Change-Id: I1924fef45345c77873f9c788baa701311e72bea7 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-01DMI-NCMP Asynchronously Publish Response Event to Client Topicsourabh_sourabh1-0/+67
- [NCMP] Added Unit Tests for NcmpAsyncRequestResponseEventMapper.java Issue-ID: CPS-830 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I64dad7f0bb9b64e1864f19db5a5d74922dc6a83b
2022-06-01Merge "Handle RestTemplate Error handling so NCMP cna report correct server ↵Joseph Keenan8-226/+105
status"
2022-05-31Handle RestTemplate Error handling so NCMP cna report correct server statusToineSiebelink8-226/+105
- Moved resposne handling to DmRestClient - Clean up incorrect/redundant tests in CmProxyDataServiceImplSpec Issue-ID: CPS-1056 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I78ba87d6af7255d85758893cfef237d75227875a
2022-05-26Merge "CompositeStateBuilder added for building the compositeState"Joseph Keenan5-7/+241
2022-05-26CompositeStateBuilder added for building the compositeStateputhuparambil.aditya5-7/+241
Added composite state to YangModelCmHandleRetriever Issue-ID: CPS-878 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I8bdea55c0a8e27a906e24fc367dedf81c9b3501c Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
2022-05-25Async request response NCMP -> ClientJosephKeenan7-11/+358
-Added consumer for DMI events and producer for forwarding to client -Added schemas for events -Updated tests -Added new module for ncmp events -Used mapstruct for event mapping Issue-ID: CPS-830 Change-Id: I096d08af9d69092cf8651e11eaa00ce441fc3605 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2022-05-24Enhanced response with Complex State in APImpriyank4-4/+10
- Introduced RestOutputCmHandleState in API specs of retrieveCmHandleDetailsById - Mapper to map CompositeState to RestOutputCmHandleState - Enhanced existing test cases and introduced new one to test the mapping result Issue-ID: CPS-1047 Change-Id: I34fa198287e5d920bc0cea312ee4e368f3be2b90 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-05-20Merge "Get cm-handle public properties endpoint"Toine Siebelink3-6/+55
2022-05-20Get cm-handle public properties endpointlukegleeson3-6/+55
Added RestOuputCmHandlePublicProperties OpenApi Object Added Get cm-handle public properties endpoint Added rest and service layer functionality for endpoint with tests Fixed Copyright Checker violations Issue-ID: CPS-1018 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ifc13cde350a49f6ba705a09e31853dc9c73be168
2022-05-20Merge "URI is not absolute when service name is not set"Joseph Keenan2-3/+15
2022-05-19Merge "Composite State to handle dmi-reg YANG updates"Toine Siebelink10-32/+211
2022-05-19Composite State to handle dmi-reg YANG updatesmpriyank10-32/+211
- Introduce CompositeState object which handles change in updated YANG for dmi-registry - Used Builder pattern as some of the fields are optional - Removed the abstract ready method from CmHandleState which was used as state machine - Fixed few test cases Issue-ID: CPS-1042 Change-Id: I8aaf6f819c66b3a9d30c5e8f0a0007f9528b247f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-05-19URI is not absolute when service name is not setDylanB95EST2-3/+15
BUG - URI is not absolute exception when dmi-service-name is not set in the database, due to null String Has now been set to null value Issue-ID: CPS-1043 Change-Id: If48c34d8caee302a1849555755960dccfd26ab7a Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-05-16Remove NCMP tag from propertiesDylanB95EST3-11/+10
We have decided to remove the NCMP tag from properties and will add it later as part of our release process for KOHN. Issue-ID: CPS-875 Change-Id: I7282c3c11879f2252c8a1b193df17f3f4bb1cf14 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-05-13Merge "Watchdog-process that syncs 'ADVISED' CM Handles"Toine Siebelink8-24/+130
2022-05-12Watchdog-process that syncs 'ADVISED' CM HandlesDylanB95EST8-25/+131
- Sync and Create Schema Set during module sync watchdog process. - Add a cm handle state transition machine to handle state changes for a cm handle during watchdog which syncs module service. Issue-ID: CPS-875 Change-Id: I3b178f5693cb7ac30577dd81cdc82b462555389a Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-05-12Merge "Add graceful shutdown for Session Manager"Joseph Keenan1-2/+3
2022-05-12Add graceful shutdown for Session Manageremaclee1-2/+3
Introduce singleton session manager Add unit test for session manager Issue-Id: CPS-898 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Iaf91f1aa6c1ebfe0ab907e7f7d80a01e940a0fdd
2022-05-10Watchdog Process-Make ConfigurableDylanB95EST1-1/+1
Make time configurable for the watchdog process. Add documentation outlining this. Issue-ID: CPS-875 Change-Id: I1307c82d02789097efda1ba981eb1fd36c9efc38 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-05-09Add ncmp tag to application yamlDylanB95EST2-9/+10
Add an NCMP tag to Application.yml to store NCMP related propeties Issue-ID: CPS-875 Change-Id: I2bce3d765ae69cc2a4bb52a472eea7cae745fd2c Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-04-29Watchdog-process that changes CM Handles stateDylanB95EST11-10/+280
Add a fixed delay scheduler to switch cm-handles found in an ADVISED state to a READY state Scheduler currently runs every 30 seconds Will only update a single cm-handle at a time Queries CM-Handle with Advised States Only using CPS Path. Will choose cm handle at random Issue-ID: CPS-875 Change-Id: Ie1b49c89a0350d20e14748a65f9c1d260d8502d2 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-04-12Refactor existing model sync code into separate packagesourabh_sourabh5-66/+134
- Created a new class to seperate sync related operations of modules. - Kept newly created class into .../api/inventory/sync package. - Created a separate groovy test. - Fixed existing groovy test. Issue-ID: CPS-950 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ie7cc36ea75daf43f1383757bcf2057c5cb4894b1
2022-04-08Refactoring/ Adding Tests for ValidationDylanB95EST15-106/+184
Refactored classes affected by validation Have added tests for anywhere where validation is used Have refactored the parse and sync modules validation to be validated at the public api method Issue-ID: CPS-322 Change-Id: I4989cfd03300fbdca41571d0aa2d0b96978858ba Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-04-06Query based on Public CM PropertiesJosephKeenan3-0/+67
-Updated OpenAPI for new Endpoint -Will replace SQL with CPSPathQuery once investigation is complete -Functionality in place to determine if public properties match - -Added Unit and CSIT tests - small modifications may need to be made -CSIT tests enhanced to add additional nodes and tests Issue-ID: CPS-731 Change-Id: I403e603ce79c4a4a6994d51b459b5703510d5a83 Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech>