projects
/
osm
/
vim-emu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restructured to re-enable GK standalone mode.
[osm/vim-emu.git]
/
src
/
emuvim
/
api
/
sonata
/
README.md
diff --git
a/src/emuvim/api/sonata/README.md
b/src/emuvim/api/sonata/README.md
index
1845489
..
e3269aa
100644
(file)
--- a/
src/emuvim/api/sonata/README.md
+++ b/
src/emuvim/api/sonata/README.md
@@
-1,22
+1,38
@@
# SONATA dummy gatekeeper API:
# SONATA dummy gatekeeper API:
+## Requirements
+
+* uuid
+* hashlib
+* zipfile
+* yaml
+* docker-py
+* flask
+* flask_restful
+
+## 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:
## Upload a package (*.son) file:
-To upload the file `s
implest-example.son`
do:
+To upload the file `s
onata-demo.son` (from son-schema repo)
do:
-* `curl -i -X POST -F file=@s
implest-example.son http://127.0.0.1:8000/api/packages/upload
s`
+* `curl -i -X POST -F file=@s
onata-demo.son http://127.0.0.1:8000/api/package
s`
To list all uploaded packages do:
To list all uploaded packages do:
-* `curl http://127.0.0.1:8000/api/packages
/uploads
`
+* `curl http://127.0.0.1:8000/api/packages`
To instantiate (start) a service do:
To instantiate (start) a service do:
-* `curl ...`
+* 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 "{}"`
To list all running services do:
To list all running services do:
-* `curl
...
`
+* `curl
http://127.0.0.1:8000/api/instantiations
`
## API definition
## API definition
@@
-37,14
+53,14
@@
_Note: This API should converge to the API of the original GK as much as possibl
<th>Response:</th>
</tr>
<tr>
<th>Response:</th>
</tr>
<tr>
-<td>/api/packages
/uploads
</td>
+<td>/api/packages</td>
<td>POST</td>
<td>-</td>
<td>{file-content} as enctype=multipart/form-data</td>
<td>{"service_uuid": "c880aaab-f3b9-43ac-ac6b-3d27b46146b7", size=456, sha1=49ee6468dfa4ecbad440d669b249d523a38651be, error: null}</td>
</tr>
<tr>
<td>POST</td>
<td>-</td>
<td>{file-content} as enctype=multipart/form-data</td>
<td>{"service_uuid": "c880aaab-f3b9-43ac-ac6b-3d27b46146b7", size=456, sha1=49ee6468dfa4ecbad440d669b249d523a38651be, error: null}</td>
</tr>
<tr>
-<td>/api/packages
/uploads
</td>
+<td>/api/packages</td>
<td>GET</td>
<td>-</td>
<td></td>
<td>GET</td>
<td>-</td>
<td></td>
@@
-62,10
+78,20
@@
_Note: This API should converge to the API of the original GK as much as possibl
<td>GET</td>
<td>-</td>
<td></td>
<td>GET</td>
<td>-</td>
<td></td>
-<td>{service_instance_uuid_list: ["de4567-f3b9-43ac-ac6b-3d27b461123", "de4567-f3b9-43ac-ac6b-3d27b461124", "de4567-f3b9-43ac-ac6b-3d27b461125"]}</td>
+<td>
+{
+ "service_instance_list": [
+ [
+ "9da044b3-1f7a-40e6-a9b3-9e83a9834249",
+ "9371df14-a595-436a-92b5-fc243b74a9d7"
+ ]
+ ]
+}
+</td>
</tr>
</table>
</tr>
</table>
-## Run REST API in standalone mode (without emulator):
-* `sudo python src/emuvim/api/sonata/dummygatekeeper.py`
\ No newline at end of file
+## Run REST API in standalone mode (without emulator):
+This is not working yet!!!
+* `python src/emuvim/api/sonata/dummygatekeeper.py`
\ No newline at end of file