diff --git a/doc/source/contributor/template_validation_status_code.rst b/doc/source/contributor/template_validation_status_code.rst index a12b9a7c8..3cf25ca79 100644 --- a/doc/source/contributor/template_validation_status_code.rst +++ b/doc/source/contributor/template_validation_status_code.rst @@ -24,6 +24,8 @@ The following describes all the possible status code and their messages: +------------------+---------------------------------------------------------+-------------------------------+ | 4 | Syntax error: [error message] | syntax | +------------------+---------------------------------------------------------+-------------------------------+ +| 5 | Invalid yaml format | syntax | ++------------------+---------------------------------------------------------+-------------------------------+ | 20 | definitions section must contain entities field | syntax | +------------------+---------------------------------------------------------+-------------------------------+ | 21 | definitions section is a mandatory section | syntax | @@ -39,10 +41,14 @@ The following describes all the possible status code and their messages: +------------------+---------------------------------------------------------+-------------------------------+ | 46 | Entity field is required | syntax | +------------------+---------------------------------------------------------+-------------------------------+ +| 47 | Invalid regular expression defined in field | content | ++------------------+---------------------------------------------------------+-------------------------------+ | 60 | metadata section must contain id field | syntax | +------------------+---------------------------------------------------------+-------------------------------+ | 62 | metadata is a mandatory section | syntax | +------------------+---------------------------------------------------------+-------------------------------+ +| 63 | Unsupported version. Version must be one of: {versions} | content | ++------------------+---------------------------------------------------------+-------------------------------+ | 80 | scenarios is a mandatory section | syntax | +------------------+---------------------------------------------------------+-------------------------------+ | 81 | At least one scenario must be defined | syntax | @@ -55,6 +61,8 @@ The following describes all the possible status code and their messages: +------------------+---------------------------------------------------------+-------------------------------+ | 85 | Failed to convert condition | content | +------------------+---------------------------------------------------------+-------------------------------+ +| 86 | Not operator can be used only on relationships. | content | ++------------------+---------------------------------------------------------+-------------------------------+ | 100 | Invalid relation type. Relation type must be from types:| syntax | | | [relation_types] | | +------------------+---------------------------------------------------------+-------------------------------+ @@ -109,3 +117,12 @@ The following describes all the possible status code and their messages: | 135 | condition must contain a common entity for all 'or' | content | | | clauses | | +------------------+---------------------------------------------------------+-------------------------------+ +| 140 | At least one template must be included | syntax | ++------------------+---------------------------------------------------------+-------------------------------+ +| 141 | Name field is unspecified for include | syntax | ++------------------+---------------------------------------------------------+-------------------------------+ +| 142 | Trying to include a template that does not exist | content | ++------------------+---------------------------------------------------------+-------------------------------+ +| 143 | A template definition file cannot contain 'includes' or | syntax | +| | 'scenarios' blocks | | ++------------------+---------------------------------------------------------+-------------------------------+ diff --git a/vitrage/evaluator/template_validation/status_messages.py b/vitrage/evaluator/template_validation/status_messages.py index ff88f8b26..407bca5a4 100644 --- a/vitrage/evaluator/template_validation/status_messages.py +++ b/vitrage/evaluator/template_validation/status_messages.py @@ -89,5 +89,6 @@ status_msgs = { 140: 'At least one template must be included', 141: 'Name field is unspecified for include', 142: 'Trying to include a template that does not exist', - 143: 'Includable cannot have Includes or Scenarios', + 143: 'A template definition file cannot contain \'includes\' or ' + '\'scenarios\' blocks', }