summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main/java/org
AgeCommit message (Collapse)AuthorFilesLines
2022-05-19Merge "Composite State to handle dmi-reg YANG updates"Toine Siebelink5-26/+116
2022-05-19Composite State to handle dmi-reg YANG updatesmpriyank5-26/+116
- 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 setDylanB95EST1-3/+3
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 propertiesDylanB95EST2-4/+4
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 Siebelink5-15/+64
2022-05-12Watchdog-process that syncs 'ADVISED' CM HandlesDylanB95EST5-16/+65
- 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 yamlDylanB95EST1-3/+3
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 stateDylanB95EST6-4/+150
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_sourabh2-35/+91
- 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 ValidationDylanB95EST7-70/+86
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>
2022-04-05Async: NCMP Rest impl. including Request ID generationsourabh_sourabh2-47/+22
- Restructured code and moved some of them at controller and service layer. - Unit is fixed and organized to it's belonging classes. Issue-ID: CPS-828 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I0919218e35b1d11cb579d707f376b76de80409da
2022-04-05[cps] Fix getResourceDataForPassthroughOperational endpointputhuparambil.aditya6-52/+14
Get endpoint only accepts application/json. Issue-ID: CPS-957 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Ifc7426fbcd6073a39554014dc18b2107b6343b16
2022-04-05Merge "Structured Exception details for DMI"Bruno Sakoto2-10/+53
2022-04-04Structured Exception details for DMImpriyank2-10/+53
- Introduced DmiErrorMessage in API docs with 502 Bad Gateway - HttpClientRequestException will be thrown which will be exposed as 502 BAD Gateway for the client from NCMP Issue-ID: CPS-917 Change-Id: Iba8f159e8216bc1f63a9ab86208e5c802437e2e8 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-04-01Update CM-Handle registration responseRenu Kumari1-3/+4
- update openapi.yml with new response structure - send only details of failed cm-handle operations - updated csit to validate 200 status Issue-ID: CPS-896 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: I3b868bcc5b8ff488c31faef51edc82c771452234
2022-03-30Additional validation for names/identifiersDylanB95EST3-4/+31
Implementing additional regex validation for names/identifiers in CPS - Introduces a CpsValidator - Applies to relevent java public API's - Tests have been updated where necessary Issue-ID: CPS-322 Change-Id: I29ab8820bb1fe0eee247e425d6bb018bcd38f28e Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-03-27Registration Response for Create cmhandles operationsRenu Kumari3-112/+38
- Changed implementation to register each cm-handle at a time instead of registering all at once - Removed YangCMHandleList class and using String format to generated expected JSON - Response of all three operation types is returned in the updateDmiRegistrationAndSyncModule method - Changed parseAndRemoveCmHandlesInDmiRegistration to protected to keep in sync with create flow - Refactored existing create CMHandle test cases Issue-ID: CPS-896 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: I5b0c01b3b8e31ca7c257b1e04069e35268be1132
2022-03-25Registration Response for Update and Delete cmhandles operationsRenu Kumari4-19/+75
- Process registration in the delete, create and update order - updateRegistration returns DMIRegistartionRespons that contains response for all operations - Added logic to not delete cmhandle if schemaset deletion fails Issue-ID: CPS-896 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: I907ff678d478894e7d4d3cc24b23a979c02ed97a
2022-03-21Return Registration response for updating cmhandlesRenu Kumari2-6/+106
- Added CMHandleRegistrationResponse class for registration response - Send response in the case of success and failure - Each update operation in the request is independent on previous one Issue-ID: CPS-896 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Ic6cc69da48bd2078029784cabede4f5965054c03
2022-03-14Async: NCMP Rest impl. including Request ID generationsourabh_sourabh2-4/+50
- In case of invalid topic return http status 400 with error message - Unit test is modified to handle/validate InvalidTopicException Issue-ID: CPS-828 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I05645c92ccebb8aa422a47f6edcde7b64088a118
2022-03-10Async: NCMP Rest impl. including Request ID generationsourabh_sourabh7-83/+209
- Based on topic api can be sync or async - RequestId is generated using UUID - Used UriComponentBuilder to populate dmi service url. - New test cases are introduced to validate service url generation. Issue-ID: CPS-828 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I2696d5cb012d9274b0c1265f16aa9b2369657f05
2022-03-01Create Endpoint For Get Cm Handles By NameDylanB95EST12-152/+218
Create endpoint and implement logic for get cm handle details by cm handle name Issue-ID: CPS-817 Change-Id: I83bd2da9219d13fac715a08b19108028ca6f6751 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-02-28NCMP Java API depends on NCM-Rest-API (cyclic) through json properties on ↵DylanB95EST4-18/+8
Java API Using POJO and new converter class instead of previous object mapper Issue-ID: CPS-893 Change-Id: I75531f386f08cb172d2901a4bbe97ae22cc5937e Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-02-28CPS-887 Decreasing performance of cmHandle registrationJosephKeenan2-33/+23
- Creating temporary table module references from the node - Query returning new moduleReferences for node to be added to CPS - Modified registration for node to use new implementation (incl. tests) - Refactored some interface to use collection instead of list - Modified SQL statements to use String.format() - Fixed tests Issue-ID: CPS-887 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: I58b17d29e8b9d6f7a644d33bf6cf8bf46f892580
2022-02-25Fix success response code CM Handle Registrationmpriyank1-2/+2
- changed registartion response code to 204 NO_CONTENT - improved exception handling for registration API - fixed failing csit related to changed response code - updated the release notes for CPS-892 and CPS-837 Issue-ID: CPS-892 Change-Id: I616e340debf1583b058e7ae6b8960972eec00f3e Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-02-16Core logic to update,add or remove cmHandle propertiesmpriyank3-29/+228
Issue-ID: CPS-837 Change-Id: Ia078b6a0291ae916931259a309dd592b0554da28 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-02-14Improve logging in NCMPsourabh_sourabh1-4/+2
- Code to change to apply logs at runtime - Fix for minor code smell Issue-ID: CPS-855 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I93a556fe0fb7ca05a42e84eb5ec4f84afaa8fd92
2022-02-02[TECHDEBT] Align CPS NCMP REST API SpecificationJosephKeenan4-4/+79
- Updated ncmp.yml to align implementation with specification - Added new Exception classes to differentiate between server NCMP issues and client based NCMP issues - Added 500 error to specification - To be merged after https://gerrit.onap.org/r/c/cps/+/126848 - Added excpetion handlers for SerNcmpException & DmiRequestException Issue-ID: CPS-823 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: If1c9c6c29c6ea2daa07753d7f766ef15c1ba4ca0
2022-01-28Support 'public' Cm Handle PropertiesDylanB95EST6-79/+74
Add support for new Public Additional Properties list to Register CM Handles API Issue-ID: CPS-677 Change-Id: I6efc88734da2416f72f71a403622e519398b502d Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2022-01-25Replace gson mapper with jackson mappersourabh_sourabh4-81/+37
We introduced JsonObjectMapper (wapper) as Spring component. Issue-ID: CPS-751 Change-Id: I536b0771a3a263325e6907717baf6941d70c0d6c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-01-21Merge "patch operation for ncmp running"aditya puthuparambil2-3/+4
2022-01-21patch operation for ncmp runningtragait2-3/+4
Signed-off-by: tragait <rahul.tyagi@est.tech> Change-Id: Ib136291963a5d7f115c8637708a1d5a64c62c9f2 Issue-ID: CPS-641
2022-01-19[TECHDEBT] Remove deprecated API methods related to NCMPmpriyank2-123/+2
CpsQueryService instantiation removed as it was not in use. License Header updated for Nordix Foundation to 2021-2022. Issue-ID: CPS-642 Change-Id: I1aa204730f5d347d379cfdaaf0740323a317a559 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2021-12-20Fix Sonar Qube Violations - Recurring tasksourabh_sourabh1-2/+2
Issue-ID: CPS-475 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I5c10360ec42bc9737ed86140398ef954109275dd
2021-12-15Adding unit tests and robuestness for DMI registrationJosephKeenan1-12/+13
-Added more scenarios for combinations of plugins -Made plugin registration more robust Issue-ID: CPS-736 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: I7495eb802fec8708e7ea6b0a97a9d7fe4676c8c1
2021-12-14Merge "Changing putOperationWithJson to postOperationWithJson"Toine Siebelink5-64/+74
2021-12-14Changing putOperationWithJson to postOperationWithJsonJosephKeenan5-64/+74
-Modified responseEntity<String> to reesponseEntity<Object> -Changed behaviour of sync to use new repsonses and removed JSON parsing -Updated tests to use new responsess -Tests have been updated and added jira to docs -Added messageConverters to RestTemplate to support plain text with ResponseEntity<Object> -Added docker log output for cps & dmi containers during CSIT teardown -Moved reponse conversion from service into DMIModelOperations class -Added response handling test (edgecases) -Updated response request body for passthrough-running CSIT test to pass Issue-ID: CPS-777 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: If2acf83a97b8aad5aa2c342154d807a47cace6a0
2021-12-14Add exception handling to delete schema set when a registration is removedniamhcore1-2/+10
Issue-ID: CPS-783 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ief4c6727e788822bc29379a757d25dff14f68c94
2021-12-08Delete anchor and schema set when a registration is removedniamhcore1-2/+5
Issue-ID: CPS-783 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I9644949e00c4de900b2609c1e70744ae5a243582
2021-12-08Support Delete operation for ds Passtrough-Running in NCMP 1/3DylanB95EST1-1/+2
Add delete operation for passthrough running within cps-ncmp. Issue-ID: CPS-638 Change-Id: I360672adc1f0f5c8eb351391c94f2d4fa913d0b4 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-12-07Undo manipulation of YangResource string as this is now handled correctly in ↵ToineSiebelink2-58/+1
DMI PLugin Issue-ID: CPS-788 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I7d308a62699709770f3629cbc55a26fb0e382010
2021-12-02Changing putOperationWithJson to postOperationWithJsonJosephKeenan2-17/+2
Issue-ID: CPS-736 Change-Id: I3fd2e0b6d6c20683b18f79ed78ed5c8990aee6d8 Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2021-11-26Patch operation passthrough runningniamhcore1-1/+2
Issue-ID: CPS-640 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I6badf241bbec265800d6b316da7ab8ad7782eb17
2021-11-25Allow separate registration of DMIDataPlugin and DmiModelPuginJosephKeenan15-504/+772
Moved relevant code from NetworkCmProxyDataServiceImp to DmiOperations Split DmiOperations into DMiData... and DMIModelOperations Merged update-operation changes Added tests for error message validation in NetworkCmProxyDataServiceImplSpec Removede @Service from DMIOperations and added @component to DmiDataOperations & DmiModelOperations Verify sync robot test is now hardened Added exitonfailure so robot tests stop after first encountered failed test Issue-ID: CPS-736 Change-Id: I0b40931cc8cd4fc0452328a0a7e0f60e6fc38d0a Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-11-10Update operation passthrough running - Service Layerniamhcore4-6/+67
Issue-ID: CPS-636 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I13334df383a23e59b3368b8664c10e086b1eb4a8
2021-11-02Add get cm handles by modules names - service layerniamhcore2-14/+43
Issue-ID: CPS-644 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ic2a57df02d533a0066382c12c35be8d524b6cdad