sonata-nfv / tng-sdk-package

The 5GTANGO SDK tool to create and unpack 5GTANGO packages.
http://www.5gtango.eu
Apache License 2.0
7 stars 9 forks source link

Unpack a 5GTANGO package using REST #9

Closed mpeuster closed 6 years ago

mpeuster commented 6 years ago

Additional features

We might create independent issues for these.

We skip label and reference support in v0.

mpeuster commented 6 years ago

Example command: tng-package -u misc/5gtango-ns-package-example.tgo -o /tmp -v

mpeuster commented 6 years ago

Status: Started to parse TOSCA.meta file

mpeuster commented 6 years ago

Status: TOSCA.meta, ETSI MF and NAPD are read. Now metadata needs to be combined.

mpeuster commented 6 years ago

Status: TOSCA.meta and ETSI MF are merged to empty NapdRecord. Next step: Deep-merge NAPD.yaml into NapdRecord (packager.py l.101) Unittests for this!

mpeuster commented 6 years ago

Next step: Complete _assert_usable_tango_package (packager.py l463) Done.

mpeuster commented 6 years ago

Next steps (packager.py l440):

mpeuster commented 6 years ago

Next step: Refactor checksum method and its error handling

mpeuster commented 6 years ago

Next step: Error handling in REST mode

# terminal A
python misc/callback_mock.py

# terminal B
tng-package -s

# terminal C
## good package 
curl -X POST -v -H "Content-Type: multipart/form-data" \
    -F callback_url="http://127.0.0.1:8000/api/v1/packages/on-change" \
    -F package="@misc/5gtango-ns-package-example.tgo" \
    http://127.0.0.1:5099/api/v1/packages

## bad package
curl -X POST -v -H "Content-Type: multipart/form-data" \
    -F callback_url="http://127.0.0.1:8000/api/v1/packages/on-change" \
    -F package="@misc/5gtango-ns-package-example-malformed.tgo" \
    http://127.0.0.1:5099/api/v1/packages
mpeuster commented 6 years ago

Next:

mpeuster commented 6 years ago

Done!