Skip to content

Design documentation

Anton Roman edited this page Dec 19, 2018 · 3 revisions

Design documentation

Types of validation

The SDK validation tool performs 4 types of validation:

  1. syntax: check the file descriptor file against its YAML schema file which is referenced from the descriptor file and downloaded during the validation.
  2. integrity: the integrity tests validates that the descriptor contains all the required elements.
  3. topology : it verifies that there are not topology issues in the definitions such as network loops which can make the system unusable.
  4. custom validation: these new type of rules enable the creation of YAML files with custom rules which can be generated by the developer of the original VNF/NS. The tng-sdk-validator tool will check that the descriptors are compliant with the custom rules which are read at execution-time and which can be changed at any moment without any modification in the validation tool code. The custom validation is still a work in progress and more improvements will be soon available in the stable version of tng-sdk-validation.

Custom rules design

In order to be able to generate business rules from a YAML file we used an existing project to handle the rule generation and execution. After considering several projects business-rules was chosen as it allows the creation of a complete set of rules which meets the requirements for this new feature.

The figure below depicts the general diagram of the custom rule feature. The file containing the rules is a YAML file which is then converted to a JSON file (note the JSON is a subset of YAML) and then passed as a parameter in the rule engine.

Custom rule diagram

The custom validator gets the relevant information from the descriptor and stores it in a set of variables and actions allowed for the descriptor. In our case the actions allowed are raise_error() and raise_warning() which display error and warning messages in tng-sdk-validator output.