* This patch moves code related to YAQL and Jinja into their
specific modules so that there isn't any module that works with
both. It makes it easier to understand how code related to one
of these technologies works.
* Custome built-in functions for YAQL and Jinja are now in a
separate module. It's easier now to see what's related with
the expression framework now and what's with integration part,
i.e. functions themselves.
* Renamed the base module of expressions similar to other packages.
* Other style changes.
Change-Id: I94f57a6534b9c10e202205dfae4d039296c26407
Before changes `cls._env.from_string(expression).render(**ctx)` can
raise exception, for example the variable doesn't exist. And this
exception is not handled.
Jinja error handling was moved to cover this case.
Change-Id: Ib020550d0ec989ca382b738844a752ec9d02919a
Closes-bug: #1743649
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
Evaluate workflow names dynamically, so yaql or jinja expression
is allowed as sub-workflow name. Tasks names are not yet
dynamically evaluated.
Partially implements: blueprint mistral-dynamic-actions
Change-Id: Icfe591e27a4f45c2e3dcfa83512217f3b2122189
Jinja2 non-sandbox environment is unsafe as it gives
access to unsafe Python methods
Change-Id: If8a96bb92f64c4226a3d02e3cf6e0dcb0e9156fd
Closes-Bug: #1680112
Due to this invalid regex it is not possible to run workflows
with Jinja2 expressions in some python2 environment.
Change-Id: I3d8fe9a617d5e3f916a8c102d0408354064b766c
Closes-bug: #1658958
Allows to use Jinja instead of or along with YAQL for expression
evaluation.
* Improved error reporting on API endpoints. Previously, Mistral API
tend to mute important logs related to errors during YAML parsing
or expression evaluation. The messages were shown in the http
response, but would not appear in logs.
* Renamed yaql_utils to evaluation_utils and added few more tests to
ensure evaluation functions can be safely reused between Jinja and
YAQL evaluators.
* Updated action_v2 example to reflect similarities between YAQL and
Jinja syntax.
Change-Id: Ie3cf8b4a6c068948d6dc051b12a02474689cf8a8
Implements: blueprint mistral-jinga-templates