summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-events/src/main
AgeCommit message (Collapse)AuthorFilesLines
2024-02-08Add alternateId to legacy lcm-eventJvD_Ericsson1-0/+4
Issue-ID: CPS-2039 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I03863e986ea6b847fd7d25e55a24f948ca9a983d
2024-01-17Remove deprecated cmSubscription codempriyank4-358/+0
- Newer approach for cm subscription is in progress so removing the deprecated code now - Also deleted the old cache config - Changes to trust level csit to fix the kafka unknown partition issue Issue-ID: CPS-2028 Change-Id: Ieb19669e53f3f64cca876fa67d0b6409a97b2a09 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-12-14Moving and Renaming eexisting subscription implemaclee12-529/+529
-renamed the existing subscription related packages to have 'deprecated' on its name as this shall be removed with new implementation of the subscription positive cases - replaced the existing schemas with the new ones Issue-ID: CPS-1991 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I8f27861b80756540477e03971c53219ea589975c
2023-11-28Publish trust level notification eventJvD_Ericsson1-9/+9
- Add mapper that maps attribute value change event to cloud event - Add publisher that publish the cloud event from ncmp to client - Handle notifications for the uses cases below - Initial registration case - Device heart beat consumer case - Dmi status changes within dmi watchdog case - Added tests for mapper, publisher, and trustLevelManager - Added test for dmi watchdog Issue-ID: CPS-1910 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I7c0798346a221e703da58902b9d631115de8d91a Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2023-11-02Add trust level notification schemaJvD_Ericsson1-0/+56
Issue-ID: CPS-1910 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: If7265e0020b2ba247aaf64c9c0820e3cfdb23583
2023-10-18Merging of Subscription schemasmpriyank4-13/+119
- Added new schema from DMI Plugin to NCMP - Added new schema from NCMP to the clients - Renamed existing schemas as per the conventions - Removed the merge keyword from the schemas and naming. Still the package will have merge keyword which will eventually be removed when we remove the old code Issue-ID: CPS-1905 Issue-ID: CPS-1906 Change-Id: I1f8c35e7f6baa25346d9527d58e20bba7f0dddeb Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-10-16Merge "Add withTrustLevel condition to CmHandle Query API"Toine Siebelink1-0/+30
2023-10-13Update Subscription Event Schemas for mergeseanbeirne2-0/+168
Issue-ID: CPS-1877 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I7545b1efb71d5032fad31200e874481cf1efe5b0
2023-10-12Add withTrustLevel condition to CmHandle Query APIhalil.cakal1-0/+30
- Change untrustworthyCmHandleSet with trustLevelPerCmHandleMap - Change trust level cache config accordingly - Change device heartbet consumer accordingly - Add json schema for device trust level - Add with_trust_level enum into cm handle query conditions - Add query cm handle by trustlevel function to cm handle queries - Add query cm handle by trustlevel service to network cm proxy cm handle service - Add unit tests and fix code smells Issue-ID: CPS-1864 Change-Id: Ie214f0713cef779307d3379df81e2b95115b6d6d Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-17Cm Subscription: PENDING logic handling in NCMPmpriyank1-2/+1
- 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-16Modify data operation schema to accommodate additional informationsourabh_sourabh1-0/+8
- Data operation schema is updated to add resourceIdentifier and options. - dmi plugin stub is modified to add both the attributes into kafka response message. Issue-ID:CPS-1837 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I624c32d07ccf396f3090766049622f43f5c3f44f
2023-08-09Refactoring Subscription Create LCM use casempriyank4-16/+16
- 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-07-26Subscription Creation: NCMP to Client CloudEvent transformationhalil.cakal2-197/+0
- 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-06NCMP to client schema for Subscriptionmpriyank3-0/+69
- added schema to comply with the agreed upon changes and it include capability to have statusCode and statusMessage as well. - Renamed existing schemas just for consistency Issue-ID: CPS-1739 Change-Id: I6bb1d13bf5c84ca812c5cf37062a168845d6be1d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-06-29NCMP to DMI subscription event schema compliant with Cloud Eventshalil.cakal3-10/+132
- Change avc subscription schema into cloud events format - Remove json objects that is provided in header of cloud event - Add CmHandle object for private properties into json schema - Remove required field and additional properties from subscriptionevent and subscriptioneventresponse Issue-ID: CPS-1737 Change-Id: I9648e5f0264ac56153ff477b1242d3c7b53b2844 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-06-28Merge "Client to NCMP Subscription schema change"Priyank Maheshwari1-0/+99
2023-06-28Client to NCMP Subscription schema changeemaclee1-0/+99
- Schema changes only - Following code change changes on seperate commit Issue-ID: CPS-1736 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I37f67a325d800a479c065ff72822b3e51d7f525f
2023-06-28Merge "Subscription dmi_to_ncmp package clean-up"Luke Gleeson1-1/+1
2023-06-27Subscription dmi_to_ncmp package clean-upseanbeirne1-1/+1
Issue-ID: CPS-1738 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I7e01c89cb187233b53b8786e42d2fe2c0f24dbd9
2023-06-27NCMP : Handle non-existing and non-ready cm handlessourabh_sourabh1-3/+6
- 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-22Subscription Response Event Schemaseanbeirne1-0/+69
Issue-ID: CPS-1738 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I409baf66ca702166308821eeeff4887e9385148e
2023-06-20Merge "DMI Data AVC to cloud events"Luke Gleeson2-55/+4
2023-06-19Patch # 1: Data operation response event (NCMP → Client App) to comply ↵sourabh_sourabh2-70/+14
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 eventsmpriyank2-55/+4
- 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-01Subscription Create Event Outcome Kafka Parthalil.cakal1-0/+81
- 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-24Avc Event compliant with RFC8641mpriyank1-4/+87
- 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.karumuri2-0/+122
Issue-ID: CPS-1557 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I0ea040e98987f992f46105afea0a171c4031d64f
2023-05-16LcmEvent to have header nowmpriyank3-2/+58
- 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-10DMI Data AVC to use kafka headersmpriyank2-15/+29
- 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-03-20Avc Event prop renamempriyank1-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 "Enhance DMI Data AVC Event schema"Luke Gleeson1-2/+5
2023-03-14Enhance DMI Data AVC Event schemampriyank1-2/+5
- Enhancing the DMI Data Avc Event to have the event section as Object at the moment. Issue-ID: CPS-1554 Change-Id: I7f9e1d66ab146f4133886188cd3e4049ac17c76b Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-03-13Forward Subscription Information to DMI Plugin(s)lukegleeson1-5/+20
Note: Implemented common EventsPublisher class Issue-ID: CPS-1431 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I292a95f2c990a140f5fd63622ca4eba3f8284b9e
2023-01-23Merge "[NCMP] Consume & Forward to client topic"Toine Siebelink1-0/+57
2023-01-23[NCMP] Consume & Forward to client topicseanbeirne1-0/+57
-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 Eventseanbeirne1-0/+101
Issue-ID: CPS-1392 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I0a5a8c256319a1a2944ee6606db1c14b50e8f8e4
2022-08-23Added eventSchemaVersion for async schemampriyank2-1/+16
- 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 schemabmiklos1-81/+0
-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>
2022-07-13Agree LCM Event Schema(s)bmiklos1-0/+106
New schema was created according to discussion with minor fixes 2 Issue-ID: CPS-1104 Change-Id: I1809b679b2cc4d17c278f9e3a6fbd477ea2f3c84 Signed-off-by: bmiklos <miklos.baranyak@est.tech>
2022-06-27Merge "Introducing DELETING and DELETED Cmhandle State"Joseph Keenan1-1/+1
2022-06-23Remove operation from NcmpEventmpriyank1-5/+0
- Remove operation field from NcmpEvent schema as it is not required - Code refactoring corresponding to removal of operation field - Fixed test cases around it - UPCOMING: Some sort of state machine to handle the event publishing Issue-ID: CPS-1100 Change-Id: Ib89b86bd1408de2808b01d37a48ee44a2601f83d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-23Introducing DELETING and DELETED Cmhandle Statelukegleeson1-1/+1
Issue-ID: CPS-1101 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I527b47cd98150a753c0d7ba89332a52b414b6834
2022-06-21Eliminate cmhandle-properties tagmpriyank1-0/+1
- Eliminate the cmhandle-properties tag in case of DELETE operation - Fixed Test cases corresponding to that Issue-ID: CPS-1098 Change-Id: Icd5e08403e0b101baf682f5e558c36ee4ebfd5c3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-15NcmpEvent creation and Mappingmpriyank1-4/+2
- Mapping class to create header and event payload based on type of operation i.e CREATE, UPDATE and DELETE. - Service class to get CmHandle public properties, create event and delegate request to event publisher. - Modification in NcmpEvent schema json to mark field as String instead of URI - Test scenarios - UPCOMING: Call the service method from relevant code to actually publish the event. Issue-ID: CPS-1037 Change-Id: I6bb7de4b27e602c4d8ee6a5528a866e5f7e8799a Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-06-01NcmpEvent creation for ModuleSyncmpriyank1-0/+87
- NcmpEvent schema creation which will be published when module sync is completed - Added cmHandleId in the event payload and made eventCorrelationId as optional - Upcoming : NcmpEvent publisher code and mapping of the events Issue-ID: CPS-1036 Change-Id: I7731e6e6a4a8f718967ce68cc6ae0e411eb8c12b Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-05-25Async request response NCMP -> ClientJosephKeenan2-0/+274
-Added consumer for DMI events and producer for forwarding to client -Added schemas for events -Updated tests -Added new module for ncmp events -Used mapstruct for event mapping Issue-ID: CPS-830 Change-Id: I096d08af9d69092cf8651e11eaa00ce441fc3605 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: JosephKeenan <joseph.keenan@est.tech>