Overview
The Modeling/etsicatalog project provides package management service and parser service by Micro Service. It can be used to store packages distributed by the SDC, and which then can be consumed by other projects or components, such as UUI, VF-C, etc. It also includes a TOSCA parser service which provides generic parser service.
...
Architecture
Build and Install
Etsicatalog is a standalone web application based on python3 and Django framework.
Locally
Pre-requisites:
- Python3 & pip
- MySQL
Clone repository:
$ git clone https://gerrit.onap.org/r/modeling/etsicatalog
$ cd etsicatalog
Install dependencies:
$ pip3 install -r requirements.txt
Create database:
$ cd /resources/dbscripts/mysql
Run modeling-etsicatalog-createdb.sql to create database.
Run commands followed to init database:
$ python manage.py makemigrations
$ python manage.py makemigrations database
$ python manage.py migrate
$ python manage.py migrate database
Review and edit \catalog\pub\config\config.py
MySQL default configuration is as follows:
...
DB_IP = "127.0.0.1"
DB_PORT = 3306
DB_NAME = "etsicatalog"
DB_USER = "etsicatalog"
DB_PASSWD = "etsicatalog"
Start server:
$ python manage.py runserver 8806
Test:
Run Healthcheck: http://127.0.0.1:8806/api/catalog/v1/health_check
You should get:
...
View API document:
http://127.0.0.1:8806/api/catalog/v1/swagger
Docker
Requirements
- Docker
- Docker-compose
Offered APIs
Please see the REST API document as follows.
Consumed APIs
Etsicatalog project consumes SDC External REST APIs as follows:
- Get List of Existing Catalog Assets per Type
https://{serverRoot}/sdc/v1/catalog/{assetType}
- Get Specific Asset Detailed Metadata
https://{serverRoot}/sdc/v1/catalog/{assetType}/{uuid}/metadata
- Download (CSAR of) Specific Asset
...