The tacker.nfvo.workflows.vim_monitor.vim_ping_action Module

The tacker.nfvo.workflows.vim_monitor.vim_ping_action Module

class tacker.nfvo.workflows.vim_monitor.vim_ping_action.PingVimAction(count, targetip, vim_id, interval, timeout)

Bases: mistral.actions.base.Action

killAction(context, **kwargs)
run()

Run action logic.

Returns:Result of the action. Note that for asynchronous actions

it should always be None, however, if even it’s not None it will be ignored by a caller.

Result can be of two types: 1) Any serializable value meaningful from a user perspective (such as string, number or dict). 2) Instance of {mistral.workflow.utils.Result} which has field “data” for success result and field “error” for keeping so called “error result” like HTTP error code and similar. Using the second type allows to communicate a result even in case of error and hence to have conditions in “on-error” clause of direct workflows. Depending on particular action semantics one or another option may be preferable. In case if action failed and there’s no need to communicate any error result this method should throw a ActionException.

start_rpc_listeners()

Start the RPC loop to let the server communicate with actions.

test()

Returns action test result.

This method runs in test mode as a test version of method run() to generate and return a representative test result. It’s basically a contract for action ‘dry-run’ behavior specifically useful for testing and workflow designing purposes.

Returns:Representative action result.
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.