summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main/java/org
AgeCommit message (Collapse)AuthorFilesLines
2023-03-22NCMP Inventory documentation updateseanbeirne1-8/+21
- Updated release notes Issue-ID: CPS-1494 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I43fc285da9d6699326d5e0a933fdb3c5c7abcb12
2023-03-21Add event to mapper as wellmpriyank2-2/+7
- Explicitly add event to the mapper - Also parameterized the cm-events topic to be overridden later Issue-ID: CPS-1554 Change-Id: Ia6e75117dbb4214648d40318989c4c5fe6fd69f1 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-03-20Avc Event prop renamempriyank1-1/+1
- rename the eventTarget property as eventSource as per the schema in the spike - fixed the integration test and sample file Issue-ID: CPS-1554 Change-Id: Ieb8b749c6f64d69d87cacadae17a4589e9908cf2 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-03-15Merge "Forward Subscription Information to DMI Plugin(s)"Priyank Maheshwari4-18/+141
2023-03-14subscription-registry node in subscription loaderlukegleeson1-0/+20
Adding top node subscription-registry for the adding of subscriptions Issue-ID: CPS-1548 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I4107293ce023e4c53dbb8b5d3feb0922cc3d4817
2023-03-13Forward Subscription Information to DMI Plugin(s)lukegleeson4-18/+141
Note: Implemented common EventsPublisher class Issue-ID: CPS-1431 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I292a95f2c990a140f5fd63622ca4eba3f8284b9e
2023-03-10Introduce control switchmpriyank1-1/+9
- introduced a control switch and keeping it as false due to init issues Issue-ID: CPS-1537 Change-Id: I8455a5ff6fea09527c6f810ffbc620b4e38c488c Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-03-09Bug:SubscriptionModelLoader.getFileContentAsStringemaclee1-1/+1
Issue-ID: CPS-1537 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Icc88a8bf40830853a208e79658f3c590185ad051
2023-03-08[CPS] Add configurable params for topicmpriyank1-1/+1
- Configurable parameter for topic dmi-cm-events Issue-ID: CPS-1538 Change-Id: I5396ee8f50f33ea3c117291a314f10c1870966bc Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-03-06Merge "JAVA onboarding of YANG model"Priyank Maheshwari3-0/+213
2023-03-03JAVA onboarding of YANG modelemaclee3-0/+213
- removed docker compose init container - removed init container script files - created new model loader class to onboard YANG model which runs after the application has set up - new model loader class is created in new package in cps-service (org.onap.cps.ncmp.init) Issue-ID: CPS-1467 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I35fe82817aff7783520acf8db66ad504271026bd
2023-03-02Refactor cmHandle(ID) queriesseanbeirne7-442/+339
- first execute cm-handle id search only - get cm handles for ids only when needed using multiple-get-method - use Collection interface where posisble (instead of Set) - use java Function to combine multiple queries in a more genric way Issue-ID: CPS-1494 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: Icfcb8ec94f75e261303aaee5c9034b920c01f3c4
2023-02-27Expand CPS Service Integration Test (framework)ToineSiebelink1-3/+3
- Created package structure - Created several test bases - Created complete test set for Admin service - Created first test for Data service - Added human-readable toString() to FetchDescendantsOption for test reporting and debuging purposes - Renamed fetch descendants (enum) direct children option for consistency with others options - TODO: Add sample performance test (and base) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I75317686161be41662b6bf81314a9cd425ddd6eb
2023-02-23Revert "Omit descendants when not need in ncmp inventory queries"lukegleeson2-8/+5
This reverts commit eba77598601a7e3430f9582dfe433495ded3244c. Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I76a0d1252177c4115de9190ee7f3bb6d15c4e19a
2023-02-22Omit descendants when not need in ncmp inventory queriesseanbeirne2-5/+8
-Seperated tests by Id and details Issue-ID: CPS-1494 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: Ia1c2b637aa5ab2ffe3a92930d74af1dd7d0dbe92
2023-02-20Merge "CPS-1401 Implement V2 of GET Data Node API"Luke Gleeson6-22/+31
2023-02-17CPS-1401 Implement V2 of GET Data Node APIarpitsingh6-22/+31
- Modified the GET Data Node API so it returns all the data nodes when xpath set to root "/" - Fragment Repository now returns a collection of Fragment Entities - Instead of returning only the first Fragment Entity now all fragment entities are returned when xpath is set to root - The Fragemnt Entities are further processed to a Collection of Data Nodes. As opposed to singular Data Node in current implementation. - Finally the DataRestController also returns a Collection of Data Nodes when xpath is set to root and valid data is present - Response body changed from JSON object to JSON Array. - Exception handling for invalid xpath and non-existing xpath is now done separately at persistence layer. - Refactored code against CPS-1422 - Deprecated getDataNode method from Service and Persistence layer - Modified V1 of Get Data Node API to use the getDataNodes method and get the first data node from the collection returned. - Modified NCMP to use getDataNodes method - NCMP still does not support multiple data nodes. It retrieves the first data node from the collection returned by getDataNodes Signed-off-by: arpitsingh <as00745003@techmahindra.com> Change-Id: I494a5740a53f65376d135fcb9f1e2e8900a2803e
2023-02-15Bulk delete schemasets in CM handle deregistrationdanielhanrahan3-2/+17
- Batch delete schema sets in single query - Call deleteUnusedYangResourceModules once per batch, not per CM handle - Results for deregistering 10k: 14 mins before; 6 mins after Issue-ID: CPS-1423 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia3a86a0dc88677323e2f386253a99022a7f02603
2023-02-15Merge "Use getDataNodes (plural version) into NCMP to get CM handles ↵Toine Siebelink3-92/+27
Performance improvement"
2023-02-14Use getDataNodes (plural version) into NCMP to get CM handles Performance ↵seanbeirne3-92/+27
improvement - Code clean-up on existing classes - Removed duplicate code Issue-ID: CPS-1426 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I3e2ce5b804d7a6e87838490d970cde3cd563f06b
2023-02-09Use getDataNodes (plural) in CmHandle deregistrationdanielhanrahan1-15/+12
Issue-ID: CPS-1426 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I0ad79bf36840cdecc13898e185dc618cedafd529
2023-02-09Merge "Produce subscription create event for subscription-topic: ↵Toine Siebelink1-3/+4
cm-avc-subscription"
2023-02-09Merge "Update CmHandleState on deregistration response"Priyank Maheshwari1-7/+15
2023-02-09Produce subscription create event for subscription-topic: cm-avc-subscriptionsourabh_sourabh1-3/+4
- Groovy Kafka (component level) : Produce subscription create event. Issue-ID: CPS-1394 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ib020c0a4458406925792fc074afd998aa09af158 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-02-08Use getDataNodes (plural version) into NCMP to get CM handlessourabh_sourabh4-11/+185
- Use plural getYangModelCmHandles get YangModelCmHandles by CmHandles in batches. Issue-ID: CPS-1426 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ie175b471bd98b02b572ca4a3ff699d721b5b782a Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-02-07Update CmHandleState on deregistration responsedanielhanrahan1-7/+15
Current implementation incorrectly sets CmHandleState to DELETED for CM handles that were not deleted. - Update CmHandleState to DELETED only for deleted CM handles - Minor test refactoring Issue-ID: CPS-1471 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ibf8b6d2b87d46a7633f0497b065e3d4099851fd6
2023-02-02CmHandle batch deletiondanielhanrahan3-24/+63
- Use plural deleteDataNodes to remove CmHandles in batches, falling back to individual delete on error - Use single deleteDataNode instead of deleteListOrListElement for individual delete Issue-ID: CPS-1464 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If09f22478df8703290c8fc24aa6fe2a11c90788a
2023-01-31Introduce InstrumentationToineSiebelink3-6/+15
- Add instrumentation related dependency - Added Timed Instrumentation - CPS-Service Crud methods - CPS Yang parsing - NCMP Registration methods - NCMP Events handling - Remove manual Gauge for YanResources Cache as (better!) instrumentation is already built into the 3PP - Sorted dependecies alphabetically (as we used to enforce, to prevent duplicates) - Added ## P E R F O R M A N C E T E S T R E S U L T S ### mini report - (unrelated) test improvement (because of bug that turned out to be invalid) Reviewers: Sourabh,Priyank, Luke Issue-ID: CPS-1457 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I34b20bece2f59488b022b8effa9470704c57be4d
2023-01-26NCMP De-Register response payload and status is invalidsourabh_sourabh1-10/+9
-Refactored "DELETING" and "DELETED" update state to avoid wrong response code. Issue-ID: CPS-1463 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I639ba94986c4ffe48d2d42f14f6a6b4e2bd2713e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-01-23Merge "Further TTL increase"Toine Siebelink2-3/+3
2023-01-23Merge "[NCMP] Consume & Forward to client topic"Toine Siebelink4-2/+159
2023-01-23[NCMP] Consume & Forward to client topicseanbeirne4-2/+159
-Consumes event from dmi-cm-events -Immediately forwards to static topic (topic selection for events comes later from subscription information) -Added Kafka test -SHOULD BE MERGED BEFORE DMI PART Issue-ID: CPS-138 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: I0a426381e2c3f9173b8d3916960c05722ad4f77d Signed-off-by: seanbeirne <sean.beirne@est.tech>
2023-01-20Further TTL increasempriyank2-3/+3
- increased TTL to 10mins or 600secs now. - Added few more log informations. Issue-ID: CPS-1446 Change-Id: Ie0508b426fb8d1232f0cc3c1d428a27178294323 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-19Optimal TTL value for Module Sync WDmpriyank2-2/+2
- setting optimal value for TTL to 120secs from 200secs. - Since the retry parameter is configurable , not changing the same in patch , but can be set as per the environment we are working on Issue-ID: CPS-1446 Change-Id: Ifaca07ad1a049a88b2609fd7a1a8e1e2fa478dd9 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-17Bug Analysis for LOCKED cmHandlesmpriyank3-6/+10
- Increased TTL time from 60secs to 200secs - Added few info level logs to analyze more Issue-ID: CPS-1446 Change-Id: If4456040e51bd33a5bf321f48440e44af7698154 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-12Merge "Updating CmHandleStates using batch operation"Toine Siebelink1-7/+22
2023-01-12Updating CmHandleStates using batch operationJosephKeenan1-7/+22
Issue-ID: CPS-1424 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: Ia67db468ece4a7ab694d95cb63a954f24dd8cb55
2022-12-22Consume Subscription Creation Eventseanbeirne1-0/+53
Issue-ID: CPS-1392 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I0a5a8c256319a1a2944ee6606db1c14b50e8f8e4
2022-12-16Use public exposed interface of CPS service instead of spisourabh_sourabh3-33/+12
- Used public interface of cps service to get data node or anchor names. Issue-ID: CPS-1427 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I2a891dd5f8955977295f32005e49543886eac88c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-12-12Fixing SonarQube violationsleventecsanyi1-1/+2
- Code smell fixes Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Issue-ID: CPS-475 Change-Id: I4b47ece82aed7e4b31aaa28e601e419fb6f06718
2022-12-01Filter on private properties of CM Handlesleventecsanyi11-24/+449
- Moved cm handle query validation to cps-ncmp-service (where it belongs!) - Added new enum type for private/public field types - Created new methods for private and public queries - Added new REST endpoint - Created service methods for filtering on different types of properties - Refactored getPublicPropertyPairs and queryCmHandleAnyProperties - Added unit test for the controller layer - Fixed refactoring suggestions - Imporved code coverage with unit tests - Refactoring - Added new functionality to NcmpRestInputMapper - Updated version number to 3.2.1-SNAPSHOT and updated release-notes.rst Issue-ID: CPS-1236 Change-Id: I0ddf6866473f7c3c6b8507d222d441bf97ca6bdc Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2022-11-15Query data NCMP-Operational with CPSpathlukegleeson2-0/+87
New GET Endpoint: /v1/ch/{cm-handle}/data/ds/{ncmp-datastore-name}/query?cps-path={CPSPath} Implemented error for {ncmp-datastore-name} other than operational - (Toine) Refactored and renamed (abstract) handler for better re-use Mainly by introducing a separate handler for OperationalQuery Reviewers Toine, Sourabh, Priyank Issue-ID: CPS-1002 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Iaca018869d95d4ce800072431baa190050a6dad0
2022-10-20CPS Validator Changeslukegleeson6-25/+14
Changed CPS Validator from static to non-static Moved CPSValidator implementation to rest interface layer to prevent duplicated usage Created CPSValidator interface in persistence layer Removed unnecessary tests Refactored misplaced tests Copyright fixes Copyright Check Script output formatting fix Issue-ID: CPS-1228 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I4c99a51870e7d3b8e416bc1f909aeed5dc3baa42
2022-10-13TTL for module and data syncmpriyank3-12/+16
- Added configurable ttl parameters for module sync and data sync in the application yaml - Changing strategy to set the TTLs now. Its been set for each key at the inserting time only for both the maps. - Added test scenarios to verify the configs and the TTLs. Issue-ID: CPS-1288 Change-Id: I0a95cbd1a3e540ff15e23027e79e07e9a26f4c19 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-10-13Merge "Fix Id-searches endpoint performance degradation"Toine Siebelink3-30/+46
2022-10-12Fix Id-searches endpoint performance degradationkissand3-30/+46
- create more flexible control over fetch descendants - add a new FETCH_DIRECT_CHILDREN_ONLY option to fetch descendants options - enabel create custom fetch descendants option Reviewer: Toine, Joe, Priyank Issue-ID: CPS-1216 Change-Id: I900b32e813367aa9566c1dec986b20f009d27203 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2022-10-03Swallow kafkaExceptionmpriyank1-1/+6
- swallow the kafka exception if we are unable to send the kafka message due to any reason. - updated release notes as well Issue-ID: CPS-1294 Change-Id: Iaa8ae5b0bc289d819a46b4a95a1382f4ecee66aa Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-21Robustness cleaning of in progress cachesourabh_sourabh4-27/+34
- Removed cm handle entry from in progress map while moving from locked to advised and de-registration - Fixed groovy tests Issue-ID: CPS-1239 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ic527c7b5d209e0c7788888942e95ce0c2c59f7c6
2022-09-20Add NCMP tag in propertiesmpriyank4-7/+7
- Added back NCMP tag back as part of the comment in patch https://gerrit.onap.org/r/c/cps/+/129274 - Added parallelism level under ncmp as well. - Correcting env variable in the docker compose file for local run as well as the CSITs. Issue-ID: CPS-1279 Change-Id: I1f2993ac66f47ee2e5e7db0c4a6aac113a714d2a Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-13CmHandle registration/module sync watchdog performance improvmentsourabh_sourabh3-9/+19
- Tuned CPS DB parameters - Removed deprecated CPS DB parameter - Modified module sync watch logic - Added aditional logs - Removed logic to get FragmentEntities as stream - Removed detaching of fragment entity as it was causing NCMP to break with an exception "SQLSTATE(08006)" Issue-ID: CPS-1126 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I0bde11895f754602dece132efde701d82b377f12