Merge "Add support for mistral-lib to Mistral"
This commit is contained in:
commit
f3bcd58a37
|
@ -16,7 +16,10 @@
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from osprofiler import profiler
|
from osprofiler import profiler
|
||||||
|
|
||||||
|
from mistral_lib import actions as mistral_lib
|
||||||
|
|
||||||
from mistral.actions import action_factory as a_f
|
from mistral.actions import action_factory as a_f
|
||||||
|
from mistral import context
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.executors import base
|
from mistral.executors import base
|
||||||
from mistral.rpc import clients as rpc
|
from mistral.rpc import clients as rpc
|
||||||
|
@ -99,6 +102,13 @@ class DefaultExecutor(base.Executor):
|
||||||
|
|
||||||
# Run action.
|
# Run action.
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
# 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()
|
result = action.run()
|
||||||
|
|
||||||
# Note: it's made for backwards compatibility with already
|
# Note: it's made for backwards compatibility with already
|
||||||
|
|
|
@ -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)
|
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
|
jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT
|
||||||
keystonemiddleware>=4.12.0 # Apache-2.0
|
keystonemiddleware>=4.12.0 # Apache-2.0
|
||||||
|
mistral-lib>=0.1.0 # Apache-2.0
|
||||||
networkx>=1.10 # BSD
|
networkx>=1.10 # BSD
|
||||||
oslo.concurrency>=3.8.0 # Apache-2.0
|
oslo.concurrency>=3.8.0 # Apache-2.0
|
||||||
oslo.config>=3.22.0 # Apache-2.0
|
oslo.config>=3.22.0 # Apache-2.0
|
||||||
|
|
Loading…
Reference in New Issue