X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Fsonata%2FREADME.md;h=30586e7771d214a4444e270e5175c948c100cb85;hb=bb14dab5d7a07c0835da92c128b1a912e8b47b13;hp=b8679653b27624059ddedd3c077c9509e09e3c86;hpb=64b4550b56d1d20627e0c5f715449c665ec79c84;p=osm%2Fvim-emu.git diff --git a/src/emuvim/api/sonata/README.md b/src/emuvim/api/sonata/README.md index b867965..30586e7 100644 --- a/src/emuvim/api/sonata/README.md +++ b/src/emuvim/api/sonata/README.md @@ -1,23 +1,41 @@ # SONATA dummy gatekeeper API: +## Requirements + +* uuid +* hashlib +* zipfile +* yaml +* docker-py +* flask +* flask_restful + +## Run REST API in standalone mode (without emulator): +* `python src/emuvim/api/sonata/dummygatekeeper.py` + +## Run emulator example with active SONATA dummy gatekeeper: +The example starts a small network with two data centers. + +* `sudo python src/emuvim/examples/sonata_y1_demo_topology_1.py` + ## Upload a package (*.son) file: To upload the file `sonata-demo.son` (from son-schema repo) do: -* `curl -i -X POST -F file=@sonata-demo.son http://127.0.0.1:8000/api/packages` +* `curl -i -X POST -F package=@sonata-demo.son http://127.0.0.1:5000/packages` To list all uploaded packages do: -* `curl http://127.0.0.1:8000/api/packages` +* `curl http://127.0.0.1:5000/packages` To instantiate (start) a service do: -* Specific service: `curl -X POST http://127.0.0.1:8000/api/instantiations -d "{\"service_uuid\":\"59446b64-f941-40a8-b511-effb0512c21b\"}"` -* Last uploaded service (makes manual tests easier): `curl -X POST http://127.0.0.1:8000/api/instantiations -d "{}"` +* Specific service: `curl -X POST http://127.0.0.1:5000/instantiations -d "{\"service_uuid\":\"59446b64-f941-40a8-b511-effb0512c21b\"}"` +* Last uploaded service (makes manual tests easier): `curl -X POST http://127.0.0.1:5000/instantiations -d "{}"` To list all running services do: -* `curl http://127.0.0.1:8000/api/instantiations` +* `curl http://127.0.0.1:5000/instantiations` ## API definition @@ -38,28 +56,28 @@ _Note: This API should converge to the API of the original GK as much as possibl