Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1706

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
"eventSchema"2
"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?
Is it possible to count the total messages published into the topic "ncmp-events" as well?2
The metric is agreed on the Assumptions #1.


Overview

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



The CURL Request:


Code Block
languagetext
titleCM Handle Registration CURL
		curl --location 'http://localhost:8883/ncmpInventory/v1/ch' \
		--header 'Content-Type: application/json' \
		--header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
		--headerdata 'Cookie: JSESSIONID=node0m0pehau5f3be1ly3jmq2yeib70.node0' \
		--data '{
				{
    "dmiDataPlugin":"dminame1",
				    "dmiModelPlugin":"x",
				    "createdCmHandles": [
						{
								        {
            "cmHandle": "CMHandle1",
								            "cmHandleProperties": {
										                "Books": "Social Media"
								},
								            },
            "publicCmHandleProperties": {
										                "Color": "yellow",
										                "Size": "small",
										                "Shape": "cube"
								}
						},
						{
								"cmHandle": "CMHandle2",
								"cmHandleProperties": {
										"Books": "Novel"
								},
								"publicCmHandleProperties": {
										"Color": "blue",
										"Size": "medium",
										"Shape": "square"
								}
						}
				]
		}'            }
        }
    ]
}'


Event Sample published to the Kafka bus, after the POST request mentioned above.Event Samples for Each DMI at initial step:


Code Block
languagetext
titleThe events created for each DMI at initial step
		{
			 "eventId":"2d6b9baf-a05d-49e0-badd-6e7de2b9a644",
			 "eventCorrelationId":"CMHandle2",
			 "eventTime":"2023-05-17T11:40:15.126+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":"CMHandle2",
					"newValues":{
						 "cmHandleState":"ADVISED",
						 "cmHandleProperties":[
								{
									 "Shape":"square",
									 "Size":"medium",
									 "Color":"blue"
								}
						 ]
					}
			 }
		}

		{
			 "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:


Code Block
languagetext
titleEvent sample for DMI state changesVerification fields
		{
			 "eventId":"aa8ac2c3-24a9-4bd8-966c-8699c264862b",
			 "eventCorrelationId":"CMHandle2",
			 "eventTime":"2023-05-17T11:40:38.641+0000",
			 "eventSource":"org.onap.ncmp",
			 "eventType":"org.onap.ncmp.cmhandle-lcm-event.updatecreate",
			 "eventSchema":"org.onap.ncmp:cmhandle-lcm-event",
			 "eventSchemaVersion":"1.0",
			 "event":{
					"cmHandleId":"CMHandle2CMHandle1",
					"oldValuesnewValues":{
						 "cmHandleState":"ADVISED"
					},
					"newValues":{
						 "cmHandleStatecmHandleProperties":"LOCKED"[
					}
			 }{
		}

		{
			 "eventId":"aaa8a3c3-5c25-465f-aee7-76b7d324275c",
			 "eventCorrelationIdShape":"CMHandle1cube",
			 "eventTime":"2023-05-17T11:40:38.643+0000",
			 "eventSource":"org.onap.ncmp",
			 "eventTypeSize":"org.onap.ncmp.cmhandle-lcm-event.updatesmall",
			 "eventSchema":"org.onap.ncmp:cmhandle-lcm-event",
			 "eventSchemaVersion":"1.0",
			 "eventColor":{
					"cmHandleId":"CMHandle1",
					"oldValues":{
	"yellow"
					 "cmHandleState":"ADVISED"
					},
					"newValues":{
						 "cmHandleState":"LOCKED" ]
					}
			 }
		}