summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src
AgeCommit message (Collapse)AuthorFilesLines
2023-06-07Agreed outstanding comments including package refactoringhalil.cakal11-33/+55
- Change package of AVC Subscription relevent codes into their place - Change package of Subscription Event Cache config inot its place - Add more branches for subscription outcome mapper - Add more branches for subscription event response consumer - Change unit test method params in order not to use deprecated methods Issue-ID: CPS-1730 Change-Id: Ieda587d5be318db8360d52d49dc38d7ce3dd85cd Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-06-07Fix some code smellshalil.cakal2-7/+7
Issue-ID: CPS-1507 Change-Id: Ic11ccbb37538242cb65ab1dbdde4fc77d9f94bdf Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-06-07Merge "NCMP : forward bulk response messages to client topic"Sourabh Sourabh2-8/+8
2023-06-06NCMP : forward bulk response messages to client topicraviteja.karumuri2-8/+8
# Fixing the avc subscription event is not consuming even there is a record published on to the topic. Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: If09fd1849f467785141cc56639839ddda9f2c0de
2023-06-01Subscription Create Event Outcome Kafka Parthalil.cakal24-123/+748
- Add subscription event outcome schema with java type for pojos - Add subscription event outcome json for testing - Add mapper to convert subscription response to event outcome - Add a bean to handle subscription response outcome tasks - Change response consumer to publish outcome for client app - Change response timeout task to publish outcome for client app - Change subscription persistance to read datanodes - Add helper to extract cm handle to status mapping from data nodes event - Fix code smells Issue-ID: CPS-1507 Change-Id: I70195073490f456f014e53c1f59d1b6761d18cd4 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-06-01NCMP : forward bulk response messages to client topicraviteja.karumuri1-4/+9
# Fixing the NullPointer Exception if the 'eventType' header not availabe. # eventType header is a mandatory header but still we are doing null check for supporting old events (AsyncResponseEvent is not moved to separate kafka headers) Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: Ie7923d0e2674402fa36cb28cde966575b899cedb
2023-05-30Merge "Improve error scenarios SubscriptionEventForwarder"Priyank Maheshwari3-6/+50
2023-05-29Merge "NCMP: Update existing Batch endpoint (Moving url param into rest body)"Toine Siebelink21-216/+751
2023-05-26Improve error scenarios SubscriptionEventForwarderlukegleeson3-6/+50
- Added placeholder for emtpy outcome response when no cmhandles match targets Issue-ID: CPS-1564 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ia04bb656c639946d259da779971ab29b6e91acea
2023-05-25NCMP: Update existing Batch endpoint (Moving url param into rest body)sourabh_sourabh21-216/+751
- NCMP batch endpoint is updated to accept details into request payload. - Removed unused code of previous impl. Issue-ID: CPS-1635 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ic290b750557da06b861c5a4a9bb12debc495ec2e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-05-24Avc Event compliant with RFC8641mpriyank1-2/+39
- The event section of the payload will be now in the format of RFC8641. - Once this event is updated , the corresponding code in the dmi plugin will be changed - Schema is present in cps-ncmp codebase so we will create a release and then it will be used in the dmi plugin Issue-ID: CPS-1668 Change-Id: Ibd811f318658d8b510b42575fad5d21357af9047 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-05-23NCMP : forward bulk response messages to client topicraviteja.karumuri4-0/+264
Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I0ea040e98987f992f46105afea0a171c4031d64f
2023-05-16LcmEvent to have header nowmpriyank11-44/+194
- Introduce LcmEventHeader as per our agreement with stakeholders - The version remains v1 as we just add the header and dont change anything in the existing event payload. - Later we will remove the header fields from the event payload. - tests modification and little code refractor for dmi data avc as well Issue-ID: CPS-1695 Change-Id: Ibef1138a6d0cc7ffec50b4c201a4d3417b99e27e Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-05-16Fixing minor compilationwaqas.ikram2-4/+4
- Complilation issues while importing project in eclipse - Fixing CSIT Change-Id: Idb85b08066d27a7f2a9b297d1580915df2b67541 Issue-ID: CPS-1672 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2023-05-11Subscription Create Event Outcome Database Parthalil.cakal9-19/+225
- Add mapper to convert subscription response to Yang model - Add update operation to update Yang model into database - Change Subscription persistence to support both save and update operations Issue-ID: CPS-1669 Change-Id: I40cab1052ada5846945c67cac8640c393358e988 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-05-10Merge "DMI Data AVC to use kafka headers"Toine Siebelink5-46/+82
2023-05-10DMI Data AVC to use kafka headersmpriyank5-46/+82
- POC done keeping AvcEvent schema in mind. - Approach to have header schema per event schema. - Moved the header information from AvcEvent to separate AvcEventHeader schema. - Added Jsr303 annotation support for required field check Issue-ID: CPS-1671 Change-Id: I2e4f969e8ca4f6282d1b9aa5fd52d16174a26084 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-05-10Merge "Change default use of Model Loader to TRUE"Priyank Maheshwari1-1/+1
2023-05-09NCMP: Delete DatastoreType enum from cps-ncmp-restsourabh_sourabh8-35/+99
- Delete duplicate enum of datastore - Use datastore from cps-ncmp-service Issue-ID: CPS-1635 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I36484d6a327c81d81741b18a932fc6a1febfc520
2023-05-09Change default use of Model Loader to TRUEemaclee1-1/+1
Issue-Id: CPS-1688 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I18bb5e3ad45ccdf5f3a1e88dd5a34dc830e06f4a
2023-05-03Refactor datatrore handling in API requestsToineSiebelink2-19/+19
- Fully parameterized datastore(name) - Improved controler testing to verify all parameter handling - Simplified service inject (alwasy using contructors instead of @AutoWire) - Added delay to fix isuse with intermitting failign test that tests invocation of a method that is executed on a separate thread Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Iba5d118d2484badee9c7c90ec7694882f6557d16
2023-05-02Align the hazelcast cluster namesmpriyank5-23/+28
- 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 Responselukegleeson12-76/+478
- 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 Gleeson3-3/+66
2023-04-27Add retry mechanism on Subscription loaderemaclee3-3/+66
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_sourabh21-258/+570
-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 cachempriyank3-2/+62
- 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.karumuri6-118/+29
# 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.karumuri27-45/+42
Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I16be74808eea6e3ce24574ae24ce082063bd0de9
2023-04-12Remove "isTagged" mapping methodlukegleeson1-6/+1
Remove redundant mapping method causing sonarqube violation Issue-ID: CPS-1394 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ie3ed1411c05fcc3671e547b80b41826dcd6e1fab
2023-04-11Merge "[CPS] Fix SonarQube Violations / Improve Coverage - Recurring task"Toine Siebelink2-21/+29
2023-04-11[CPS] Fix SonarQube Violations / Improve Coverage - Recurring taskraviteja.karumuri2-21/+29
Issue-ID: CPS-475 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I7429e1563608159b5592a2dc52ab5383f11a8ab3
2023-04-06Toggle subscription persistence for model loaderlukegleeson2-6/+15
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 Maheshwari12-20/+430
2023-03-30Persist SubscriptionEventlukegleeson12-20/+430
- 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.karumuri2-57/+68
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-27Enhanced logging for bugmpriyank1-3/+4
- Added minor logging and temporarily converted some debug logs to info level Issue-ID: CPS-1566 Change-Id: I2c706ecd601b06f2a92388b318a44640c682bdd1 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
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-22Merge "Subscription model with status and predicates"Priyank Maheshwari1-4/+19
2023-03-21Subscription model with status and predicatesemaclee1-4/+19
Issue-ID: CPS-1497 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I4a81389797620eac9b67f31ddcbb4d5168d742ce
2023-03-21Add event to mapper as wellmpriyank4-4/+12
- 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 renamempriyank3-3/+3
- 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 Maheshwari10-37/+299
2023-03-14subscription-registry node in subscription loaderlukegleeson2-1/+50
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)lukegleeson10-37/+299
Note: Implemented common EventsPublisher class Issue-ID: CPS-1431 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I292a95f2c990a140f5fd63622ca4eba3f8284b9e
2023-03-10Introduce control switchmpriyank3-3/+16
- 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 Maheshwari6-0/+364