summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/resources
AgeCommit message (Collapse)AuthorFilesLines
2024-02-20CmNotificationSubscription event from Dmi Pluginmpriyank1-0/+6
- Added infrastructure related code to read event from the dmi plugin - Just consuming and reading the message. - Core logic to introduced to be part of subsequent patches Issue-ID: CPS-2106 Change-Id: Ic58f4f80b3dded32df95daecac42315fa9212f58 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-22CmSubscription review commentsmpriyank7-151/+0
- Removed the old deprecated cmSubscription json examples - Incorporated minor review comments from myself Issue-ID: CPS-1951 Change-Id: Ifadaa186cc210b81bb1b27f73f537e1c11bf461d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-22Read and validate incoming sub create request from Kafkaseanbeirne1-0/+23
Issue-ID: CPS-1951 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I402dacc47c93e77a4ca63598acebe27c780951de
2023-12-21Deprecate use of basic subscription modelseanbeirne6-0/+0
- Deprecate json files in resources Issue-ID: CPS-1973 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I3bf59807f740e3e6f19af0cf0d418edb4f961328
2023-09-21Merge "Set lock state and reason upon request"Toine Siebelink1-1/+1
2023-09-18Set lock state and reason upon requestleventecsanyi1-1/+1
- added new LockReasonCategories and improved SyncUtils.isReadyForRetry - refactored logic aroudn retry times - refactored unit tests Issue-ID: CPS-1860 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I4382d6ad1fa0a7d9dacb8c8281b0458a5afc0375
2023-09-04Dmi plugin watchdog cheking alivenesshalil.cakal2-0/+30
- Add capability of GET request into DmiRestClient - Add watchdog job to check aliveness of dmi plugins - DmiPluginStatus enum as UP or DOWN - Add unit tests for the new function in dmi rest client - Add unit tests for dmi watchdog Issue-ID: CPS-1856 Change-Id: Ic38a96f0485a0bfe1b6af5bb2f57f6119d8fa563 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-24Extend model loader to support model-upgrade (part 1)ToineSiebelink1-1/+0
- refactor existign code for easier extension (no code changes yet, just want to review refactor in this first patch...) - changed log level of some (error) logging Issue-ID: CPS-1804 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I234ad6c4057e9447cd39a83b8f48799918ca6b7f
2023-08-21Merge "Cm Subscription: PENDING logic handling in NCMP"Luke Gleeson3-12/+37
2023-08-18Modify data operation schema to accommodate additional informationsourabh_sourabh2-2/+6
- Code is modify to add resourceIdentifier and option to data operation kafka response for status code 100, 101, 102 and 103. Issue-ID: CPS-1837 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I1f7870d9d373f69de03240700b9d74be46fbfb6c Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-08-17Cm Subscription: PENDING logic handling in NCMPmpriyank3-12/+37
- Remove PENDING state from dmi schema - Modify ncmp out event mapper to categorize response per details - Rename class and method names as well as in unit tests - resolved the merge conflicts Issue-ID: CPS-1830 Change-Id: I5b7f523f546ec9940c246bd286586fdeba2f892e Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-08-09Refactoring Subscription Create LCM use casempriyank5-0/+0
- Client to NCMP: CmSubscriptionNcmpInEvent - NCMP to DMI: CmSubscriptionDmiInEvent - DMI to NCMP: CmSubscriptionDmiOutEvent - NCMP to Client: CmSubscriptionNcmpOutEvent - code package changed from avcsubscription to cmsubscription - Other classes name as per the events naming above - Test classes refactored - NO LOGIC changes incorporated in this patch Issue-ID: CPS-1831 Change-Id: Id5ad5f799007deaaf6d6fc0f402c130339263d09 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-08-04Subscription Creation: Fixes for code review after demohalil.cakal3-27/+12
- Change missleading subscription details in testware - Change datastore check to comply with CPS enum - Remove redundant CloudConstructionException - Change exception handling in cloud event mappers to avoid loss of information - Remove exception handling from scheduler service as discussed in the meeting Issue-ID: CPS-1732 Change-Id: I9fee2eafd4db97a0eed80e39219463c904f5a980 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-04Ability to disable sending auth headermpriyank1-0/+1
- introduced configurable parameter to disable sending auth header in the request to dmi-plugin - default is to include the auth header - DMI_AUTH_ENABLED flag can be set to true/false to control the behaviour - Also added the env variables to the CSITs - updated release-notes Issue-ID: CPS-1819 Change-Id: If97c06e33f06e391d2190b7300d73210ed2f4e27 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-07-26Subscription Creation: NCMP to Client CloudEvent transformationhalil.cakal4-24/+80
- Delete legacy avc subscription event and event outcome schemas - Change subscription response and outcome sample json file contents - Change ncmp event response code to support avc subscriptions - Add mapper that maps cloud event to subscription event response - Add mapper that maps subscription event outcome to cloud event - Change subscription event response consumer to consume CloudEvents - Change time out task to support response event instead client id and name - Change subscription event response mapper to support Cloud Event - Change subscription outcome mapper to group subscription responses as per details and status - Change subscription status to have fromString functionality - Change all unit tests to support new functionalities - Add cps exceptions for cloud event and outcome type - Add details field in yang model - Change data node helper to supoort details field - Consolidate final subscription response codes - Fix code smells reported by SonarLint Issue-ID: CPS-1739 Change-Id: I5eadeb8ef40d3d7befb762b5a8d2139fe3c85d7e Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-07-07Subscription Creation: NCMP to DMI CloudEvent transformationhalil.cakal2-10/+40
- Add mapper to convert client event into ncmp event - Add sample json object of ncmp version - Change subscription event consumer to consume CloudEvents - Change subscription event forwarder to publish CloudEvents - Change test producer config to support CloudEvents - Change sample subscription event json to comply with new schema - Add more test for missing branches - Change packages of the mappers into relevant directory Issue-ID: CPS-1737 Change-Id: I8c9e6e7bf713a8fb530a0586dfb2bce796a462f5 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-06-29Updating the Kafka listener compliance to could events and legacyraviteja.karumuri1-1/+2
# Added filter property to the legay(DMIAsync) Consumer # Added containerFactory property to the CloudEvent(DataOperation) consumer to use 'cloudEventDeserializtion' Issue-ID: CPS-1746 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I73315b816eb6446b7e163fd8779bc35fd6cbef63
2023-06-27NCMP : Handle non-existing and non-ready cm handlessourabh_sourabh2-3/+5
- Modified data operation schema to contains cm handle as steing and response content field name as result. - Added a new common cloud event builder for NCMP to create an event. - Added data operation event creater that uses cloud event builder to create a cloud event. - Introduced a new method onto json object mapper to convert json object to bytes. - Modified EventDateTimeFormatter and added a new method to convert date timestamp into offsetdateTime. - Added a new code into ResourceRequestUtil to identify non-ready cm handle and non-existing cm handle and later publish it as cloud event to tha client given topic. - Introduced CpsApplicationContext to get spring mannaged bean into non spring managed java object. Issue-ID: CPS-1583, CPS-1614 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I24a39d2cb2c54dea25cd2f17e7748e21cd83a088 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-06-22NCMP : Replacing the word 'Batch' as 'DataOperation'.raviteja.karumuri1-0/+0
Issue-ID: CPS-1754 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: Ie9f56effb160582ba7177331fb6260b2bde2342b
2023-06-21Patch # 3: Data operation response event (NCMP → Client App) to comply ↵sourabh_sourabh2-24/+11
with CloudEvents - Modified data operation record strategy to consume cloud event. - Modified NCMP data operation event consumer to read cloud event header. (prefixed with ce_) - Modified event publisher to support legacy and cloud event based on event type (if legacy event use legacy kafka template else cloud kafka template). - Introduced a new method onto json object mapper to convert json object to bytes. - Modified data operation consumer spec to produce a cloud event and validate it. - Added Kafka Integration Test (for filtering) Issue-ID: CPS-1724 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ide701b1ff952f57413cb4e4aa0d55c08753f0298 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-06-20Merge "DMI Data AVC to cloud events"Luke Gleeson1-1/+1
2023-06-19Patch # 1: Data operation response event (NCMP → Client App) to comply ↵sourabh_sourabh1-19/+5
with CloudEvents - Removed header definitions (since we now use CloudEvents) - Used 'dataOperation' instead of batch where appropriate. - Modified test json Issue-ID: CPS-1724 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ic0f65297b944adf9cf5f3c2cbec679a031a675ec Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-06-19DMI Data AVC to cloud eventsmpriyank1-1/+1
- DMI Data AVC to be consumed as CloudEvents now - Removed the schema header as it is taken care by cloudevent headers - Implemented naming and packaging comments on the schema - Test cases refactoring Issue-ID: CPS-1719 Change-Id: I9864f90446720fe903fb3c1502d86035d886751d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-06-15Patch #2 : Introduce kafka template for cloud eventssourabh_sourabh1-0/+8
- Introduced a new cloud kafka template for cloud events that reads it's configuration from application.yml - Kept legacy kafka template for backward compatibility utill all cps events moved to cloud event comply. - Modified application.yml producer and consumer value deserializer properties to support cloud events. - Added new cloudevents-bom used into cps-ncmp-service pom. - For the time being we will have 2 kafkatemplates (legacyEventKafkaTemplate, cloudEventKafkaTemplate) into EventsPublisher until we fully move to cloudevents for all events. Once all cps events will be cloud event compy, we have TODO task where Deprecated: legacyKafkaEventTemplate will be removed with its java configuration file KafkaTemplateConfig. Issue-ID: CPS-1724 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I78c15bd480db063b89c6630c46c2d3a328b4fae4 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-06-01Subscription Create Event Outcome Kafka Parthalil.cakal2-1/+24
- 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-05-30Merge "Improve error scenarios SubscriptionEventForwarder"Priyank Maheshwari1-1/+2
2023-05-29Merge "NCMP: Update existing Batch endpoint (Moving url param into rest body)"Toine Siebelink1-0/+36
2023-05-26Improve error scenarios SubscriptionEventForwarderlukegleeson1-1/+2
- 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_sourabh1-0/+36
- 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.karumuri1-0/+46
Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I0ea040e98987f992f46105afea0a171c4031d64f
2023-05-16LcmEvent to have header nowmpriyank1-1/+1
- 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-11Subscription Create Event Outcome Database Parthalil.cakal1-0/+9
- 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-10DMI Data AVC to use kafka headersmpriyank1-7/+0
- 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-02Align the hazelcast cluster namesmpriyank1-0/+1
- 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-24Extend capability of distributed cachempriyank1-1/+8
- 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-03-21Add event to mapper as wellmpriyank1-0/+1
- 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 Maheshwari1-5/+5
2023-03-13Forward Subscription Information to DMI Plugin(s)lukegleeson1-5/+5
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/+4
- 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-03JAVA onboarding of YANG modelemaclee1-0/+1
- 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-02-09Produce subscription create event for subscription-topic: cm-avc-subscriptionsourabh_sourabh1-1/+1
- 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-01-23Merge "[NCMP] Consume & Forward to client topic"Toine Siebelink1-0/+12
2023-01-23[NCMP] Consume & Forward to client topicseanbeirne1-0/+12
-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>
2022-12-22Consume Subscription Creation Eventseanbeirne2-0/+28
Issue-ID: CPS-1392 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I0a5a8c256319a1a2944ee6606db1c14b50e8f8e4
2022-09-20Add NCMP tag in propertiesmpriyank1-9/+10
- 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-01Performance Improvement: Watchdog Parallel execution with configurationsourabh_sourabh1-0/+3
- Introduced AsyncSyncExecutor to get task and execute it with configured number of parallel threads. - Number of parallel thread can be configured from application.yml. - AsyncTaskExecutorSpec is added - Fixed existing grovvy test now async task would be submitted. Issue-ID: CPS-1200 Change-Id: I58c0368b945c90e619c2acfc7458ba58de047484 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-08-23Added eventSchemaVersion for async schemampriyank1-1/+2
- Added event schema version in the request and response schema. - Enhanced the mapper to adhere to new field. Issue-ID: CPS-1145 Change-Id: I408f73adefc2104b2e421bc3a3fe8f78dcba80f0 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-07-20Refractor code to use the new LcmEvent schemabmiklos2-20/+12
-Old schema deleted and comments from tests are removed -EventDateTimeFormatter utility added -From LcmEventsCreator.populateLcmEvent the NcmpServiceCmHandle param removed and tests are fixed accordingly -Changes made in test of the LcmEventsCreator for payload testing to make it more clear Issue-ID: CPS-1147 Change-Id: Id87c81f2755a6617a0fc68ba92a3d0e3170fd20f Signed-off-by: bmiklos <miklos.baranyak@est.tech>