Commit 4f5a6805 authored by Yann Garcia's avatar Yann Garcia
Browse files

Add description to test V2X messages distribution

parent 7e274c1a
Loading
Loading
Loading
Loading
+477 −3
Original line number Diff line number Diff line
@@ -18,6 +18,480 @@ Objective:
| 4. Start the MEC application or environment |  MEC Application will have a set of route points in the form of geo coordinates (lat/long) for all potential routes that a vehicular UE may take on its journey. <br> <br>  The MEC application should be able to provide this information in the form of a standard data model specified in ETSI GS MEC030 v2.2.1 |
| 5. `POST .../<user-specific-mec-sandbox-url>/mep1/vis/v2/provide_predicted_qos` | Request body for the `POST .../provide_predicted_qos` request contains route(s) information and is formulated by populating the relevant attributes in the standard `PredictedQos` data model, specified in "ETSI GS MEC030 v2.2.1" <br> <br> See Swagger UI by using the ["Try-it in browser" option](../Sandbox-User-Interface#sbox05a) for more information on the PredictedQos data model and example request & response bodies for the `/provide_predicted_qos` endpoint |
| 6. MEC application parses the received `PredictedQos` data model in the response body to determine the best possible route based on the RSRP and RSRQ values that are returned by the V2X Information service | Depending on the design scenario and implementation logic of user's MEC application, a decision can be made for the best possible route on the basis of available predicted QoS values or the information could be relayed to the vehicular UE as is. <br> <br> Accurate and timely predictions of radio environment at locations planned to be visied by the vehicle can enable the UE to decide whether to trigger, modify or postpone the application of certain V2X functionalities and/or download of content delivery / software packages  |
| 7. Stop the MEC Application | |
| 8. Terminate the MEC sandbox scenario | |
| 9. Logout of the MEC Sandbox |  |
| 7. V2X message distribution | This clause describes the CURL commands to use to manage the MEC Sandbox V2X message distribution.<br> <br>See Annex 1 for more details.|
| 8. Stop the MEC Application | |
| 9. Terminate the MEC sandbox scenario | |
| 10. Logout of the MEC Sandbox |  |

# Annex 1: The CURL commands for testing V2X message distribution

To subscribe for a V2X message distribution:

```sh
$ curl --verbose --request POST http://mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions --header "Accept: application/json" --data "{\"subscriptionType\": \"V2xMsgSubscription\",\"callbackReference\":\"http://yanngarcia.ddns.net:3000/vis-v2x-msg/1\",\"filterCriteria\":{\"stdOrganization\":\"ETSI\",\"msgType\": [1,2]},\"expiryDeadline\":{\"seconds\": 1977846800,\"nanoseconds\": 0}}"
```

To get the created subscription:

```sh
$ curl --verbose --request GET http://mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions/1 --header "Accept: application/json"
```

To get the list of the current subscriptions list:
```sh
$ curl --verbose --request GET http://mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions --header "Accept: application/json"
```

To publish a message after a subscription:

```sh
$ curl --verbose --request POST http://yanngarcia.ddns.net:30000/vis-v2x-msg/1 --header "Accept: application/json" --data "{_links:{subscription:{href:http://mec-platform.etsi.org/sbxykqjr17/vis/v2/subscriptions/1}},msgContent:031200f101038100400380818c20400100005802001ee600003c0004e548140072066b24d01eb78149084d5571800000001eb78b7b084dc18b07d000000000000007d20000020171d95b9ac7b8ecadcd001b90c0c1b4e7a4303036583545c747b7397938bffffffe11dbba1f0b01e80630f1c18025a76240a7f2ea020b63387f2ea020b63387f2ea020b63387f2ea020b63387f2ea020b633850012500020b8912896a0d1eb78149084d557106a2810101800300803163f35536c83ed010830000000000224e2ca0840024010280012481040301fffc80012581050401ffffff808083699e543101421024edf050b6f1e3b7ddf7ccc65cb31b1f72ec5dad924c4a4e01808070eefd2444f43f9884787d5da52e2e5a4b3ac71e87c254f6b8abefef8aa2c030a6201b45c1095594319607fa053b92ddc798f72cfde4800c97faa3fc9c51afdd808083c03e25010fe98f936b8d5be9695df3a5337e42a08ecff43c93e16ee0016397303199e961825786e715f096cf7e27556a3a0a0d9fd935d87a5606cf81fe5e24,msgEncodeFormat:hexadump,msgType:1,notificationType:V2xMsgNotification,stdOrganization:v2x_msg,timeStamp:{nanoSeconds:0,seconds:1673420426}}"
```

To delete a subscription:
```sh
$ curl --verbose --request DELETE "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions/1" --header "Accept: application/json"
```

To get the log of the meep-vis service:

```sh
$ kubectl logs mec030-1-<deploy_id>-<pod_id> meep-vis -n <namespace> # e.g. kubectl logs mec030-1-57f7cbc494-tll5n meep-vis -n sbxykqjr17
```

\
# Annex 2: The Postman Json project for testing V2X message distribution
The code below is the the Postman workspace equivalent to the curl requests above.
```json
{
	"info": {
		"_postman_id": "299b6531-1625-4eeb-9db8-009559e3eb54",
		"name": "demo5",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "152820"
	},
	"item": [
		{
			"name": "Get UU Unicast provisioning ECGI",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/queries/uu_unicast_provisioning_info?location_info=ecgi,268738486303",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"queries",
						"uu_unicast_provisioning_info"
					],
					"query": [
						{
							"key": "location_info",
							"value": "ecgi,268738486303"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Get UU Unicast provisioning Geo",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/queries/uu_unicast_provisioning_info?location_info=latitude=0.00,0.01,longitude=1.00,1.01",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"queries",
						"uu_unicast_provisioning_info"
					],
					"query": [
						{
							"key": "location_info",
							"value": "latitude=0.00,0.01,longitude=1.00,1.01"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Post subscriptions",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"subscriptionType\": \"V2xMsgSubscription\",\r\n  \"callbackReference\": \"http://yanngarcia.ddns.net:3000/vis-v2x-msg/1\",\r\n  \"filterCriteria\": {\r\n    \"stdOrganization\": \"ETSI\",\r\n    \"msgType\": [\r\n      1,\r\n      2\r\n    ]\r\n  },\r\n  \"expiryDeadline\": {\r\n    \"seconds\": 1977836800,\r\n    \"nanoseconds\": 0\r\n  }\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"subscriptions"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get subscription",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions/1",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"subscriptions",
						"1"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get subscription list",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"subscriptions"
					]
				}
			},
			"response": []
		},
		{
			"name": "Post V2xMsgPublication",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"stdOrganization\": \"ETSI\",\r\n  \"msgType\": 2,\r\n  \"msgEncodeFormat\": \"hexadump\",\r\n  \"msgContent\": \"031200f101038100400380818c20400100005802001ee600003c0004e548140072066b24d01eb78149084d5571800000001eb78b7b084dc18b07d000000000000007d20000020171d95b9ac7b8ecadcd001b90c0c1b4e7a4303036583545c747b7397938bffffffe11dbba1f0b01e80630f1c18025a76240a7f2ea020b63387f2ea020b63387f2ea020b63387f2ea020b63387f2ea020b633850012500020b8912896a0d1eb78149084d557106a2810101800300803163f35536c83ed010830000000000224e2ca0840024010280012481040301fffc80012581050401ffffff808083699e543101421024edf050b6f1e3b7ddf7ccc65cb31b1f72ec5dad924c4a4e01808070eefd2444f43f9884787d5da52e2e5a4b3ac71e87c254f6b8abefef8aa2c030a6201b45c1095594319607fa053b92ddc798f72cfde4800c97faa3fc9c51afdd808083c03e25010fe98f936b8d5be9695df3a5337e42a08ecff43c93e16ee0016397303199e961825786e715f096cf7e27556a3a0a0d9fd935d87a5606cf81fe5e24\"\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/publish_v2x_message",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"publish_v2x_message"
					]
				}
			},
			"response": []
		},
		{
			"name": "Delete subscription",
			"request": {
				"method": "DELETE",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/subscriptions/1",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"subscriptions",
						"1"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get UU Unicast provisioning Invalid 1",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/queries/uu_unicast_provisioning_info",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"queries",
						"uu_unicast_provisioning_info"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get UU Unicast provisioning Invalid 2",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/queries/uu_unicast_provisioning_info?location_info=ecgi",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"queries",
						"uu_unicast_provisioning_info"
					],
					"query": [
						{
							"key": "location_info",
							"value": "ecgi"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Get UU Unicast provisioning Invalid 3",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/queries/uu_unicast_provisioning_info?location_info=longitude,0.00",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"queries",
						"uu_unicast_provisioning_info"
					],
					"query": [
						{
							"key": "location_info",
							"value": "longitude,0.00"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Get UU Unicast provisioning Invalid 4",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/queries/uu_unicast_provisioning_info?location_info=latitude=0.00",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"queries",
						"uu_unicast_provisioning_info"
					],
					"query": [
						{
							"key": "location_info",
							"value": "latitude=0.00"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Get UU Unicast provisioning Invalid 5",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text",
						"disabled": true
					}
				],
				"url": {
					"raw": "mec-platform.etsi.org/sbxykqjr17/mep1/vis/v2/queries/uu_unicast_provisioning_info?location_info=latitude=0.00,0.01,longitude=1.00",
					"host": [
						"mec-platform",
						"etsi",
						"org"
					],
					"path": [
						"sbxykqjr17",
						"mep1",
						"vis",
						"v2",
						"queries",
						"uu_unicast_provisioning_info"
					],
					"query": [
						{
							"key": "location_info",
							"value": "latitude=0.00,0.01,longitude=1.00"
						}
					]
				}
			},
			"response": []
		}
	]
}
```