Skip to content

StorageBackend: TangoCatalogBackend

Manuel Peuster edited this page Feb 6, 2019 · 4 revisions

This storage backen plugin is able to push all unpackaged artifacts to an instance of tng-cat which is specified by the CATALOGUE_URL environment variable.

Implementation

To communicate with tng-cat, we use the REST APIs offered by the catalogs. Before the packager starts to upload the artifacts from the package, it checks if there is already a package with the same vendor.name.version triple in the catalog. If so, the packager will abort the uploading procedure and return with a warning that the package already exists.

Unpackaging and uploading procedure

tng-sdk-package: pkg
tng-cat: cat
                              +-----+                                     +-----+
                              | pkg |                                     | cat |
                              +-----+                                     +-----+
                                 |                                           |
                                 | GET PD with vendor.name.version           |
                                 |------------------------------------------>|
                                 |                                           |
                                 |                       Response: list(PDs) |
                                 |<------------------------------------------|
-------------------------------\ |                                           |
| if len(list(PDs)) > 0: stop! |-|                                           |
|------------------------------| |                                           |
                                 |                                           |
                                 | POST all VNFDs                            |
                                 |------------------------------------------>|
                                 |                                           |
                                 |                                200 or 201 |
                                 |<------------------------------------------|
                                 |                                           |
                                 | POST all NSDs                             |
                                 |------------------------------------------>|
                                 |                                           |
                                 |                                200 or 201 |
                                 |<------------------------------------------|
                                 |                                           |
                                 | POST all TSTDs                            |
                                 |------------------------------------------>|
                                 |                                           |
                                 |                                200 or 201 |
                                 |<------------------------------------------|
                                 |                                           |
                                 | POST all other files (e.g. cloud.init)    |
                                 |------------------------------------------>|
                                 |                                           |
                                 |                                200 or 201 |
                                 |<------------------------------------------|
                                 |                                           |
                                 | POST the *.tgo package file               |
                                 |------------------------------------------>|
                                 |                                           |
                                 |                                200 or 201 |
                                 |<------------------------------------------|
                                 |                                           |
                                 | POST all PD                               |
                                 |------------------------------------------>|
                                 |                                           |
                                 |                                200 or 201 |
                                 |<------------------------------------------|
                                 |                                           |

Development

Run catalog locally: tng-cat

docker-compose up

Access and clear database:

http://127.0.0.1:8081/