def _get_failingaction_exec_db_model(self, params): actionexec_db = ActionExecutionDB() actionexec_db.status = 'initializing' actionexec_db.start_timestamp = datetime.datetime.now() actionexec_db.action = ResourceReference( name=RunnerContainerTest.failingaction_db.name, pack=RunnerContainerTest.failingaction_db.pack).ref actionexec_db.parameters = params actionexec_db.context = {'user': cfg.CONF.system_user.user} return actionexec_db
def _run_action(action_ref, parent_execution_id, params, wait_for_completion=True): execution = ActionExecutionDB(action=action_ref) execution.parameters = ActionChainRunner._cast_params(action_ref, params) execution.context = {'parent': str(parent_execution_id)} execution = action_service.schedule(execution) while (wait_for_completion and execution.status != ACTIONEXEC_STATUS_SUCCEEDED and execution.status != ACTIONEXEC_STATUS_FAILED): eventlet.sleep(1) execution = action_db_util.get_actionexec_by_id(execution.id) return execution
def _run_action(action_ref, parent_execution_id, params, wait_for_completion=True): execution = ActionExecutionDB(action=action_ref) execution.parameters = ActionChainRunner._cast_params( action_ref, params) execution.context = {'parent': str(parent_execution_id)} execution = action_service.schedule(execution) while (wait_for_completion and execution.status != ACTIONEXEC_STATUS_SUCCEEDED and execution.status != ACTIONEXEC_STATUS_FAILED): eventlet.sleep(1) execution = action_db_util.get_actionexec_by_id(execution.id) return execution