[VVP] updating validation scripts in dublin
[vvp/validation-scripts.git] / README.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2018 AT&T Intellectual Property.  All rights reserved.
4
5 Manual Heat Template Validation
6 ===============================
7
8 validation-scripts
9 ------------------
10
11 This project contains validation scripts to test
12 that a set of Heat Templates adheres to
13 the ONAP VNF Heat Orchestration Template guidelines.
14
15 For more information on the ONAP Heat Orchestration
16 Template Guidelines, vist the `Heat Guidelines <https://onap.readthedocs.io/en/latest/submodules/vnfrqts/requirements.git/docs/Chapter5/Heat/index.html>`__
17
18 About
19 _____
20
21 The validation scripts project allows performing heat template
22 validation without installing the full VVP platform. The following
23 instructions apply to running these validation scripts in that manner.
24
25
26 Installation
27 ____________
28
29 This software is not platform dependent and can be run in a Windows, Unix or
30 OS X environment.
31
32 Satisfy Dependencies
33 ####################
34
35
36  These can be installed using pip (assuming pip is installed) with the command:
37
38 ``$ pip install -r requirements.txt``
39
40 Use
41 ___
42
43 Clone this project.
44
45 To validate Heat templates just run this the command under the folder ``ice_validator``:
46
47 ``</path/to/validation-scripts/ice_validator>$ pytest --tap-stream --template-directory=<Directory>``
48
49 where ``<Directory>`` is the full path to a folder containing heat templates.
50
51 Output
52 ______
53
54 After performing a validation, an output folder will be created.
55
56 ``/path/to/validation-scripts/ice_validator/output/``
57
58 This folder will contain a file ``report.html`` which contains a list of all
59 of the ONAP VNF Heat Template Guideline violations. If there are no violations,
60 the report will say ``No validation errors found.``
61
62 Interpreting the Output
63 _______________________
64
65 The report file will have 4 columns for details about a violation, and one
66 row for each violation. Below contains details about each column.
67
68 File
69 ####
70
71 This is the file(s) that contained the violation
72
73 Error Message
74 #############
75
76 This shows the test and brief error message from the validation script that
77 contained the violation. There is a ``Full Details`` button to show the
78 complete raw test output. The error message will also contain details
79 about what element is involved with the violation (such as the parameter
80 name, resource id, etc...).
81
82 Requirement(s)
83 ##############
84
85 This column contains the requirement(s) that each test/violation is
86 mapped to. These requirements are taken directly from the VNF Requirements
87 project Heat Orchestration Template Guidelines section.
88
89
90 Resolution Steps
91 ################
92
93 For some violations, there are pre-defined resolution steps that
94 indicate what action the user should take to resolve the violation.
95
96 **Note**: Not all violations will have resolution steps. Most violations
97 can be resolved simply by reviewing the requirements that have been violated
98 in the previous column.
99
100
101 Self-Test Suite
102 _______________
103
104 The ``ice_validator`` includes an extensive self-test suite. It is a
105 **requirement** for any additions or changes to the test suite to
106 successfully and cleanly complete a tox run. Simply run ``tox`` from
107 the project root as:
108
109 ``$ tox``
110
111 You can also run it under the folder ``ice_validator``:
112
113 ``$ pytest --self-test``
114