Commit Graph

6 Commits

Author SHA1 Message Date
Vitalii Solodilov 4bf03d8e7d Remove extra a specification validation
Currently when we get a specification using the instantiate_spec function,
we always validate their schema and semantics over and over again.
To prevent it we add new validate parameter to a Spec class.
The validate parameter must be True when we create a workflow, workbook
or action using a mistral-api. In all other cases, it must be False.

Change-Id: Ia450ea9635bc75c204fe031cfeeab154f1d03862
Closes-Bug: #1738769
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2018-07-30 11:55:35 +04:00
junboli 943514b244 Unsupported 'message' Exception attribute in PY3
The 'message' attribute has been deprecated and removed from Python3.
For more details, please check [1]:
[1] https://www.python.org/dev/peps/pep-0352/

Change-Id: I9d5173273b3ba3e92d72d6a7b7d60d367296897f
2017-07-25 11:47:12 +00:00
keliang 723cc85830 Trival: Remove unused logging import
Change-Id: I99c428c9a9204409404379342bc87ced767ce38e
2015-12-28 13:11:03 +08:00
Renat Akhmerov 49baf0311e Raising exception if there aren't start tasks in direct workflow
* Now if direct workflow graph doesn't have start tasks (ones with no
  inbound transitions) then an exception gets raised.
* Refactoring workflow specifications: moving specification related method
  from direct workflow controller into workflow specification.
* Implemented the mechanism of polymorphic DSL entities. At this point
  there's a hierarchy of specification classes to represent different types
  of workflow.
* Specification validation logic is now explicitly split into two methods:
  validate_schema() and validate_semantics() where the second one is supposed
  to implement integrity checks and other more high-level rules that are
  impossible to define in JSON schema.
* Other minor refactoring and style changes.

Change-Id: I60937b77e39133e3b254fed574e6aec6aa402eb0
2015-09-08 15:58:03 +06:00
LingxianKong a674853d62 Make use of graduated oslo.log module
* use oslo.log for logging functionality
* get rid of the file /mistral/openstack/common/log.py

Implements: blueprint mistral-log-enhancement
Partial-Bug: #1459188

Change-Id: I6b62cffda0a20b6caf59cc30bcc33c21ae1e5898
2015-06-09 17:38:19 +08:00
Winson Chan 06d6866a31 Add workbook and workflow validation endpoints
Add endpoints v2/workbooks/validate and v2/workflows/validate to the
REST API for workbook and workflow validation respectively. Use POST
method to submit spec for validation.

Change-Id: I0ef7d7d115b5fb59e8bd23bcc723ed8911994552
Implements: blueprint api-validate-dsl
2015-04-07 21:55:09 +00:00