diff --git a/.gitignore b/.gitignore index e35672b978b166a48b5650fa3e5fe78a8b0390b9..e1816c6c7e8ecd03c72bed9a23b9f540b4b34806 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc env +build/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ff33a7c7a798f46ccc14a407ba1f8863ca028003..4f2a4316292bbb58ccc2cf69f20823334cf46ba5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM ubuntu:latest -MAINTAINER ETSI CTI "cti_support@etsi.org" +LABEL maintainer="ETSI CTI - cti_support@etsi.org" ENV TZ=Europe/Paris RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b10b838c766e4e4198eb866e2b9d3eecc98423e0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +Copyright 2019-2020 ETSI + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Readme.md b/Readme.md index 9e71065511643726702e871334853449f18d0176..cadaedd3c588188ea33f1b85ab496af0243b8060 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,12 @@ # Tosca Import/Export +Tools to import/export TOSCA definitions in YAML from/to ETSI Specifications in Docx format. + +Currently supports ETSI GS NFV-SOL 001. + +This tool is provided as-is, no guarantees are applicable on the correctnes of the output. +Use at your own risk. + ## Create `env` file cp env_example env diff --git a/env_example b/env_example new file mode 100644 index 0000000000000000000000000000000000000000..3a7e2ce9b5e79929ddc977e2434dfd2c4f695613 --- /dev/null +++ b/env_example @@ -0,0 +1 @@ +TOSCAIE_SECRET='super_secret_key' \ No newline at end of file diff --git a/relaunch.sh b/relaunch.sh index fbb6bb65503e492836f51d4310af4a6bb4c2c297..8f1efc5d5894f91116d576e2f8678a10d31ce98d 100755 --- a/relaunch.sh +++ b/relaunch.sh @@ -1,4 +1,10 @@ #!/bin/bash +# Copyright ETSI +# See LICESEN files +# +# Stops or restarts the Docker image containing the web-app for doc2tosca and tosca2doc +# + CNT=$(docker ps | grep tosca-ie | cut -d " " -f1) if [ "$CNT" != "" ] ; then diff --git a/tests.sh b/tests.sh new file mode 100644 index 0000000000000000000000000000000000000000..f4dc026ac65da014842d36b4bbb65f21e708a810 --- /dev/null +++ b/tests.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright ETSI 2019-2020 +# See LICENSE file +# +# Executes doc2tosca on every file in the 'test_data' folder. +# Results are written in the 'build' folder + +mkdir -p build +cd build + +test_files=$(ls ../test_data) + +for file in $test_files ; do + python3 ../src/doc2tosca.py ../test_data/"$file" +done \ No newline at end of file