From b2193b72dcc1dbfd79a1d494800d7f5b023a3234 Mon Sep 17 00:00:00 2001
From: Michele Carignani <michele.carignani@etsi.org>
Date: Wed, 25 Nov 2020 15:58:41 +0100
Subject: [PATCH] improve documentation

---
 .gitignore  |  1 +
 Dockerfile  |  2 +-
 LICENSE     | 23 +++++++++++++++++++++++
 Readme.md   |  7 +++++++
 env_example |  1 +
 relaunch.sh |  6 ++++++
 tests.sh    | 15 +++++++++++++++
 7 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 LICENSE
 create mode 100644 env_example
 create mode 100644 tests.sh

diff --git a/.gitignore b/.gitignore
index e35672b..e1816c6 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 ff33a7c..4f2a431 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 0000000..b10b838
--- /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 9e71065..cadaedd 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 0000000..3a7e2ce
--- /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 fbb6bb6..8f1efc5 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 0000000..f4dc026
--- /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
-- 
GitLab