References

CPS-1613 - Getting issue details... STATUS

CPS-1706 - Getting issue details... STATUS

WIP- CPS-1613 Explore the Test Plan Scenarios for Kafka related use cases

Assumptions

#AssumptionNotesDecisions
1The validation metricThe current validation metrics are "eventSource", "eventSchema", and "eventType" and the "event".Regards to the discussion with the team, the expected format of the flow for verification will be in given below. However, there are some field on the headers like "eventId" and "eventTime" are impossible to know to validate, those are omitted in the validation.

Issues & Decisions

#IssueNotesDecisions
1What could be the best validation metric for that LCM of CM handles?The metric is agreed on the Assumptions #1.


Overview

Topic:ncmp-events
Flow Path:NCMP to External Clients
Trigger:CURL Request- LCM CM Handle- Registration

The CURL Request:

CM Handle Registration CURL
curl --location 'http://localhost:8883/ncmpInventory/v1/ch' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
--data '{
    "dmiDataPlugin":"dminame1",
    "dmiModelPlugin":"x",
    "createdCmHandles": [
        {
            "cmHandle": "CMHandle1",
            "cmHandleProperties": {
                "Books": "Social Media"
            },
            "publicCmHandleProperties": {
                "Color": "yellow",
                "Size": "small",
                "Shape": "cube"
            }
        }
    ]
}'

Event Sample published to the Kafka bus, after the POST request mentioned above.

The events created for each DMI at initial step
		{
			 "eventId":"d76be55a-f215-4bf5-a6b5-832d6417f96c",
			 "eventCorrelationId":"CMHandle1",
			 "eventTime":"2023-05-17T11:40:15.270+0000",
			 "eventSource":"org.onap.ncmp",
			 "eventType":"org.onap.ncmp.cmhandle-lcm-event.create",
			 "eventSchema":"org.onap.ncmp:cmhandle-lcm-event",
			 "eventSchemaVersion":"1.0",
			 "event":{
					"cmHandleId":"CMHandle1",
					"newValues":{
						 "cmHandleState":"ADVISED",
						 "cmHandleProperties":[
								{
									 "Shape":"cube",
									 "Size":"small",
									 "Color":"yellow"
								}
						 ]
					}
			 }
		}

The final verification parameters are given below:


Verification fields
			 "eventSource":"org.onap.ncmp",
			 "eventType":"org.onap.ncmp.cmhandle-lcm-event.create",
			 "eventSchema":"org.onap.ncmp:cmhandle-lcm-event",
			 "event":{
					"cmHandleId":"CMHandle1",
					"newValues":{
						 "cmHandleState":"ADVISED",
						 "cmHandleProperties":[
								{
									 "Shape":"cube",
									 "Size":"small",
									 "Color":"yellow"
								}
						 ]
					}
			 } 




  • No labels