summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy/org
AgeCommit message (Collapse)AuthorFilesLines
2023-05-02Align the hazelcast cluster namesmpriyank2-12/+22
- We need to align the hazelcast cluster names as members of the same cluster can join each other. We will still have exclusivity as the instance names and configs are different for each distributed object. - Exposing env variable to override the cluster name depending on the env it is run on. - Modified test cases to validate the cluster names as well Issue-ID: CPS-1637 Change-Id: Ib0f8c80dc9b2268f976b0c2d3ccd6d64792d4781 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-04-28Timeout for Subscription Create Partial Responselukegleeson5-9/+206
- Implemented default 30s timeout for DMI Responses - Placeholders have been TODO'd for Outcome Response generation and Persisted Subscription Updating - Refactored common HazelcastCacheConfig methods - Some tests required a blocking variable due to seperate thread usage Issue-ID: CPS-1599 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I2b1a35e93939daa0524d379ac4736d714ef61a6f
2023-04-27Merge "Add retry mechanism on Subscription loader"Luke Gleeson1-2/+34
2023-04-27Add retry mechanism on Subscription loaderemaclee1-2/+34
Issue-ID: CPS-1568 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I35697c260cc1a774f50d12552996b39f812fc2de
2023-04-27CPS-1553 :REST endpoint to accept collection of cm handles for GET operationsourabh_sourabh7-66/+112
-Introduced an interface having all un-implemented or default defination of any method that is further extended or implemented by abstract or stubbed controller. -Exposed an endpoint to accept bulk request -Modified an existing methods for more readability. (Parameterized datasource for ... methods) -Code impl. for getResourceDataFromDmi method to send bulk request to new proposed dmi-plugin endpoint that would accept bulk request. -We need to investigate a groovy test that fails only into onap CICD pipeline. For now it's commented out by added TODO tag. (org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy:205) Issue-ID: CPS-1553 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ieac39690956e3a0eab41068db57c5d93a16d04f0 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-04-24Extend capability of distributed cachempriyank1-1/+36
- Extend cache configs to be able to work in stanalone mode as well as in cluster mode in kubernetes. - Expose the parameters to enable or disable the feature. - to make it work in standalone mode autodiscovery config will take care , and to run it on kubernetes enable the kubernetes option and provide the service name property. Issue-ID: CPS-1637 Change-Id: I704c4aa11e65b17b5be80048e4246079014d8bb7 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-04-17[CPS] Removing the duplicate producer coderaviteja.karumuri2-12/+15
# Using the existing 'EventPublisher' class and deleting the duplicated producer classes. Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I6dd8e9c9d9dbec06a2c9464fc2d382fa89f6fc32
2023-04-14[CPS] Re-structuring the packages for better understandingraviteja.karumuri12-21/+18
Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I16be74808eea6e3ce24574ae24ce082063bd0de9
2023-04-11Merge "[CPS] Fix SonarQube Violations / Improve Coverage - Recurring task"Toine Siebelink1-16/+26
2023-04-11[CPS] Fix SonarQube Violations / Improve Coverage - Recurring taskraviteja.karumuri1-16/+26
Issue-ID: CPS-475 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I7429e1563608159b5592a2dc52ab5383f11a8ab3
2023-04-06Toggle subscription persistence for model loaderlukegleeson1-5/+9
Current implementation will attempt to persist the subscription model for subscription create events even when the model loader is disabled which causes a persistence error. Subscription Model will now be persisted based on whether the model loader is enabled Issue-ID: CPS-1394 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I8f8cfc47996eed6b95fd3958996f16c8395dc341
2023-04-03Merge "Persist SubscriptionEvent"Priyank Maheshwari3-9/+155
2023-03-30Persist SubscriptionEventlukegleeson3-9/+155
- Updated subscription.yang to subscription name instead of client name - Implemented Mapper for SubscriptionEvent to yang model version - Implemented Subscription Persistence for storing subscriptions - Minor changes to existing variable names Issue-ID: CPS-1394 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ibe066006a913cb7f6e52b6fa8a851e976a338ac3
2023-03-30[CPS] Improve code coverage for Class 'SubscriptionModelLoader'raviteja.karumuri1-37/+50
Issue-ID: CPS-1584 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: Ief2b14cc90c24db50a95f1c62661b1918413408e
2023-03-28[CPS] Fix SonarQube Violations / Improve Coverage - Recurring taskraviteja.karumuri1-7/+21
Issue-ID: CPS-475 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: Id3507fb24c4c6eb002a9ae6fed553daa2fca7895
2023-03-21Add event to mapper as wellmpriyank1-2/+4
- 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 Maheshwari5-14/+153
2023-03-14subscription-registry node in subscription loaderlukegleeson1-1/+30
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)lukegleeson5-14/+153
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/+3
- 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-06Merge "JAVA onboarding of YANG model"Priyank Maheshwari1-0/+145
2023-03-03JAVA onboarding of YANG modelemaclee1-0/+145
- 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) queriesseanbeirne5-279/+230
- 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-2/+2
- 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"lukegleeson1-37/+9
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 queriesseanbeirne1-9/+37
-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 Gleeson5-27/+32
2023-02-17CPS-1401 Implement V2 of GET Data Node APIarpitsingh5-27/+32
- 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 deregistrationdanielhanrahan2-4/+15
- 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 Siebelink2-22/+15
Performance improvement"
2023-02-14Use getDataNodes (plural version) into NCMP to get CM handles Performance ↵seanbeirne2-22/+15
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-9/+7
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-0/+57
cm-avc-subscription"
2023-02-09Merge "Update CmHandleState on deregistration response"Priyank Maheshwari1-39/+60
2023-02-09Produce subscription create event for subscription-topic: cm-avc-subscriptionsourabh_sourabh1-0/+57
- 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_sourabh2-1/+40
- 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-39/+60
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 deletiondanielhanrahan2-5/+16
- 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-23Merge "[NCMP] Consume & Forward to client topic"Toine Siebelink2-5/+88
2023-01-23[NCMP] Consume & Forward to client topicseanbeirne2-5/+88
-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-12Merge "Updating CmHandleStates using batch operation"Toine Siebelink1-2/+2
2023-01-12Updating CmHandleStates using batch operationJosephKeenan1-2/+2
Issue-ID: CPS-1424 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: Ia67db468ece4a7ab694d95cb63a954f24dd8cb55
2022-12-22Consume Subscription Creation Eventseanbeirne1-0/+52
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_sourabh2-38/+25
- 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-01Filter on private properties of CM Handlesleventecsanyi11-28/+328
- 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-16Merge "Query data NCMP-Operational with CPSpath"Sourabh Sourabh1-0/+46
2022-11-15Query data NCMP-Operational with CPSpathlukegleeson1-0/+46
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-11-11Temporary registry updatempriyank1-1/+1
- temporarily updating the registry to test the failing tests. Issue-ID: CPS-1360 Change-Id: I7e303bb72b3f87565e27bcca7b1d9f5afc2b1417 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-10-27Read Performance Improvement - Using Native QueryToineSiebelink1-10/+23
- Native query for FragmentExtracts - Convert FragmentExtracts to tree of FragmentEntity - Native Query now used for all Gets with descendants (orignal hibernate option only used when descendanst ommited) - Added error handling for not-found on native query - Ommit descendants by default on many udpate use-cases (this might have a signifcant perf. improvemnt impact too) - Improved legacy tests for delete use-cases - Corrected performace test expectation - Fix TTL test realizing TTL resolution is whole seconds! Issue-ID: CPS-1301 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I658ac1b7b7036f01050f30bdf9e5bd175725ef1d