Fix create custom Mistral action
Class mistral.actions.base.Action is moved to mistral_lib.actions.Action accoring to https://docs.openstack.org/mistral/latest/developer/extensions/creating_custom_action.html This change imports the new action class and add context parameter for the run method. Related-Bug: #1874007 Change-Id: I7858f69ca051c64a8ac52e6bfde353d55a42a43e
This commit is contained in:
parent
aba4cf9c89
commit
b38ed56020
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
|
|
||||||
from mistral.actions import base
|
from mistral_lib import actions
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ from tacker import context as t_context
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class PingVimAction(base.Action):
|
class PingVimAction(actions.Action):
|
||||||
|
|
||||||
def __init__(self, count, targetip, vim_id,
|
def __init__(self, count, targetip, vim_id,
|
||||||
interval, timeout):
|
interval, timeout):
|
||||||
|
@ -80,7 +80,7 @@ class PingVimAction(base.Action):
|
||||||
vim_id=self.vim_id,
|
vim_id=self.vim_id,
|
||||||
status=status)
|
status=status)
|
||||||
|
|
||||||
def run(self):
|
def run(self, action_ctx):
|
||||||
servers = []
|
servers = []
|
||||||
try:
|
try:
|
||||||
rpc.init_action_rpc(cfg.CONF)
|
rpc.init_action_rpc(cfg.CONF)
|
||||||
|
|
Loading…
Reference in New Issue