-
Notifications
You must be signed in to change notification settings - Fork 3
Tutorial: LLCM curl examples
Rafael Schellenberg edited this page Oct 27, 2019
·
1 revision
Get a list with of on-boarded packages:
$ curl -X GET http://127.0.0.1:5000/packages
[{"created_at": "2019-10-09 07:54:45.097627",
"uuid": "71f7178e-9e6f-4531-b37e-914e3e3b8434",
"pd": {"version": "0.1",
"name": "emulator-example-service"}}]
On-board a package:
$ curl -X POST -F package=@misc/eu.5gtango.emulator-example-service.0.1.tgo http://127.0.0.1:5000/packages
{"service_uuid": "71f7178e-9e6f-4531-b37e-914e3e3b8434",
"sha1": "9b64a73fe5889dd5ccefdf93742395d685ca7b25",
"error": null,
"size": 4876}
Get list of instantiated vnfs:
$ curl -X GET http://127.0.0.1:5000/instantiations
[{"instance_name": "eu.5gtango.emulator_example.0.9-inst.0",
"status": "running",
"created_at": "2019-10-09 07:54:49.678198",
"uuid": "71f7178e-9e6f-4531-b37e-914e3e3b8434"}]
Instantiate the first services in the list:
$ curl -X POST http://127.0.0.1:5000/instantiations -d "{}"
{"service_instance_uuid": "aadbf833-4998-4dfd-8136-72d143b099f3",
"id": "aadbf833-4998-4dfd-8136-72d143b099f3"}
Get a list of onboarded services:
$ curl -X GET http://127.0.0.1:5000/services
[{"created_at": "2019-10-09 07:54:45.097627",
"nsd": {"version": "0.9", "name": "emulator_example"},
"uuid": "71f7178e-9e6f-4531-b37e-914e3e3b8434"}]
Instantiate a service specified by its service_uuid
:
$ curl -X POST http://127.0.0.1:5000/instantiations -d '{"service_uuid": "449040b4-4792-4fef-9e2d-5a472f529f24"}'
{"service_instance_uuid": "7252b6c3-87d5-4e3b-954d-904fcb9942ce",
"id": "7252b6c3-87d5-4e3b-954d-904fcb9942ce"}
Instantiate a service specified by its service_name:
$ curl -X POST http://127.0.0.1:5000/instantiations -d '{"service_name": "emulator_example"}'
{"service_instance_uuid": "cfe55c5a-0f5b-439d-8c3c-4bf6fe8c4933",
"id": "cfe55c5a-0f5b-439d-8c3c-4bf6fe8c4933"}