Commit 0168a480 authored by Michele Carignani's avatar Michele Carignani
Browse files

Templates and folder structures for SOL005 APIs.


(Patch 2 fixes errors in build scripts and openapis templates)

Change-Id: I60a1253130d9e84461819aa8f3f7509d41b22212
Signed-off-by: default avatarMichele Carignani <michele.carignani@etsi.org>
parent 0bd877f3
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
build/
*.pyc

.jenkins.sh

0 → 100644
+21 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt

cd "$(dirname "$0")"

run_dir="$(pwd)"

rm build/*-API.yaml
rm build/*-API.json

cd docker

./build-container.sh
./run-container.sh "${run_dir}"

cd ..

python ./scripts/add_change_comment.py

exit $?

COPYRIGHT

0 → 100644
+15 −0
Original line number Diff line number Diff line
ETSI FORGE COPYRIGHT STATEMENT

Copyright (c) ETSI 2018.

This software is subject to copyrights owned by ETSI. Non-exclusive permission 
is hereby granted, free of charge, to copy, reproduce and amend this file 
under the following conditions: It is provided "as is", without warranty of any 
kind, expressed or implied. 

ETSI shall never be liable for any claim, damages, or other liability arising 
from its use or inability of use.This permission does not apply to any documentation 
associated with this file for which ETSI keeps all rights reserved. The present 
copyright notice shall be included in all copies of whole or part of this 
software and shall not imply any sub-license right.

Readme.md

0 → 100644
+62 −0
Original line number Diff line number Diff line
# NFV SOL005 APIs

This repository hosts the [OpenAPI](https://www.openapis.org/) specificatons and other documentation
for the APIs defined in ETSI NFV GSs [SOL005](http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf).

The APIs described in this repository are defined for the `Os-Ma-nfvo` reference point.

**IMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification it refers to and has not been approved by the ETSI NFV ISG. In case of discrepancies the published ETSI Group Specification takes precedence.**

More information at [NFV Solutions wiki](https://nfvwiki.etsi.org/index.php?title=NFV_Solutions).

## Content structure

All the main OpenAPI files should be put in the `src` directory and organized with the following schema:

    src/deliverable-number/api-name/api-name.yaml
   
e.g.

    src/SOL005/NSDManagement/NSDManagement.yaml
   
   
## Building

The build file `.jenkins.sh` will validate the files, evaluate JSON references and store the generated files in the build directory. In case the build is executed by Jenkins, the merged file will be store in a specific directory to be web-served.

To build locally, once Docker is installed, simple run

    $ sudo bash .jenkins.sh
   
and the results will be stored in a `build/` directory in the project folder.

## How to raise issues

Change requests can be filed at [ETSI Forge Bugzilla](forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=62&product=NFV). Please report errors, bugs or other issues [here](https://forge.etsi.org/bugzilla/enter_bug.cgi?product=NFV).

## How to contribute

ETSI Forge uses Gerrit to manage submissions to the repository, any submission is tracked with a Change. Currently open and closed Changes can be reviewed [here](https://forge.etsi.org/gerrit/#/q/project:NFV-SOL005).

### Latest builds

See the recent builds from:

* [Master](https://forge.etsi.org/jenkins/job/NFV%20-%20Network%20Functions%20Virtualisation/job/sol005-master/)
* [Gerrit changes](https://forge.etsi.org/jenkins/job/NFV%20-%20Network%20Functions%20Virtualisation/job/sol005/).

## License

Copyright (c) ETSI 2018.
 
This software is subject to copyrights owned by ETSI. Non-exclusive permission 
is hereby granted, free of charge, to copy, reproduce and amend this file 
under the following conditions: It is provided "as is", without warranty of any 
kind, expressed or implied. 

ETSI shall never be liable for any claim, damages, or other liability arising 
from its use or inability of use.This permission does not apply to any documentation 
associated with this file for which ETSI keeps all rights reserved. The present 
copyright notice shall be included in all copies of whole or part of this 
file and shall not imply any sub-license right.

docker/Dockerfile

0 → 100644
+33 −0
Original line number Diff line number Diff line
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt

FROM alpine:3.6

RUN env
RUN apk update
RUN apk add bash
RUN apk add nodejs
RUN apk add nodejs-npm
RUN apk add asciidoctor
RUN apk add openjdk8
RUN apk add ca-certificates wget && update-ca-certificates 
RUN apk add openssl
RUN gem install rdoc --pre || gem install rdoc --pre
RUN gem install asciidoctor-pdf-cjk
RUN wget https://forge.etsi.org/swagger2markup-cli-1.3.2.jar
RUN npm config set proxy $http_proxy
RUN npm install -g swagger-tools@0.10.3
RUN npm install -g json-refs@3.0.2
RUN npm install -g yamljs@0.3.0

ADD validate-in-docker.sh /validate-in-docker.sh
RUN chmod +x /validate-in-docker.sh

ADD swg2mrkup /bin/swg2mrkup
RUN chmod +x /bin/swg2mrkup

ADD oas2pdf /bin/oas2pdf
RUN chmod +x /bin/oas2pdf

ENTRYPOINT ["/validate-in-docker.sh"]
Loading