Add support for mistral-lib to Mistral
This patch wont pass CI until mistral-lib is packaged for the TripleO CI. Depends-On-External: https://review.rdoproject.org/r/6266 Depends-On: Icec6d1a3c483a30e9e3fa3175ed0233053c69daa Change-Id: Iab8d093f53477585e60a99413ed5379fb7e5b4ae
This commit is contained in:
parent
b55f5a90bb
commit
20f66fd8f2
@ -16,7 +16,10 @@
|
||||
from oslo_log import log as logging
|
||||
from osprofiler import profiler
|
||||
|
||||
from mistral_lib import actions as mistral_lib
|
||||
|
||||
from mistral.actions import action_factory as a_f
|
||||
from mistral import context
|
||||
from mistral import exceptions as exc
|
||||
from mistral.executors import base
|
||||
from mistral.rpc import clients as rpc
|
||||
@ -99,7 +102,14 @@ class DefaultExecutor(base.Executor):
|
||||
|
||||
# Run action.
|
||||
try:
|
||||
result = action.run()
|
||||
|
||||
# NOTE(d0ugal): If the action is a subclass of mistral-lib we know
|
||||
# that it expects to be passed the context. We should deprecate
|
||||
# the builtin action class in Mistral.
|
||||
if isinstance(action, mistral_lib.Action):
|
||||
result = action.run(context.ctx())
|
||||
else:
|
||||
result = action.run()
|
||||
|
||||
# Note: it's made for backwards compatibility with already
|
||||
# existing Mistral actions which don't return result as
|
||||
|
@ -12,6 +12,7 @@ gnocchiclient>=2.7.0 # Apache-2.0
|
||||
Jinja2!=2.9.0,!=2.9.1,!=2.9.2,!=2.9.3,!=2.9.4,>=2.8 # BSD License (3 clause)
|
||||
jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT
|
||||
keystonemiddleware>=4.12.0 # Apache-2.0
|
||||
mistral-lib>=0.1.0 # Apache-2.0
|
||||
networkx>=1.10 # BSD
|
||||
oslo.concurrency>=3.8.0 # Apache-2.0
|
||||
oslo.config>=3.22.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user