Commit 7a5ef1af authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance demo4-ue

parent 5ed2736c
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -97,24 +97,34 @@ $ curl -X POST "http://mec-platform.etsi.org:31111/dai/instantiate" -H "accept:
{"appAutoInstantiation":true,"appInfo":{"appDId":"onboarded-demo4","appDVersion":"v0.1.0","appDescription":"Basic HTTP Ping Pong","appName":"onboarded-demo4","appProvider":"ETSI","appSoftVersion":"v0.1.0","appPackageSource":"appPackageSource1","userAppInstanceInfo":[{"appInstanceId":"20","appLocation":{"countryCode":"33"},"referenceURI":"https://mec-platform.etsi.org/yannsb/onboarded-demo4"}]},"appLocationUpdates":true,"associateDevAppId":"04e71585-87c7-4d2e-b913-538cf1ef","callbackReference":"http://demo4-ue1:80","contextId":"20"}
```

Note that, in the response, the field "contextId" indicate the identifier to be used to [terminate the instance](#terminate-an-existing-instance-of-onboarded-mec-application).
Note that, in the response:
- The field "contextId" indicates the identifier to be used to [terminate the instance](#terminate-an-existing-instance-of-onboarded-mec-application),
- The field "referenceURI" indicates the URL to the new instance of the onboarded MEC application, see clause [Ping request](#ping-request]).

#### Ping request

The requets `GET /dai/doping` is the ping/pong request.
The requets `GET /onboarded-demo4/ping/{appcontextid}` is the ping/pong request to send to the instance of the onboarded MEC application [onboarded-demo4](#onboarded-demo4).
```sh
$ curl "https://mec-platform.etsi.org/yannsb/onboarded-demo4/ping" -H "accept: application/json"
$ curl "http://mec-platform.etsi.org/yannsb/onboarded-demo4/ping/20" -H "accept: application/json"
"pong"
```

#### Terminate an existing instance of onboarded MEC application

The requets `DELETE /dai/delete/{contextId}` terminates the instance of the specified onboarded MEC application.
The requets `DELETE /dai/delete/{appcontextid}` terminates the instance of the specified onboarded MEC application.

```sh
$ curl -X DELETE "http://mec-platform.etsi.org:31111/dai/delete/20" -H "accept: application/json"
```

#### application location availability task

The requets `POST /dai/availability/{appcontextid}` provides the location availability for the specified instance of the onboarded MEC application.

```sh
$ curl -X POST "http://mec-platform.etsi.org:31111/dai/availability/20" -H "accept: application/json"
```

### onboarded-demo4

The MEC application onboarded-demo4 is a basic HTTP REST API "Ping/Pong" application. When it recieves an HTTP GET /ping request, it replies with 200 OK "pong".
@@ -122,9 +132,9 @@ The goal of thos application is just to validate the support of MEC-016 Service

## Using Demo4

### Preamble
### Preamble (reserved to MEC Sandbox administrator)

Before to use Demo4, you have to copy the file ~/AdvantDEGE/examples/demo4-ue/src/onboarded-demo4.yaml into the folder /var/lib/docker/volumes/meep-dai/_data/ (required to use sudo command)
Before to use Demo4, the file ~/AdvantDEGE/examples/demo4-ue/src/onboarded-demo4.yaml shall be cpopied into the folder /var/lib/docker/volumes/meep-dai/_data/ (required to use sudo command). This is the descriptor of the onboarded MEC application [onboarded-demo4](#onboarded-demo4).

### Using Demo4 with AdvantEDGE