# Path: mistralclient/api/v2/action_executions.py
# class ActionExecution(base.Resource):
# class ActionExecutionManager(base.ResourceManager):
#     def create(self, name, input=None, namespace='', **params):
#     def update(self, id, state=None, output=None):
#     def list(self, task_execution_id=None, limit=None, marker='', fields=None,
#              sort_keys='', sort_dirs='', **filters):
#     def get(self, id):
#     def delete(self, id):
# 
# Path: mistralclient/commands/v2/action_executions.py
# LOG = logging.getLogger(__name__)
#     COLUMNS = [
#         ('id', 'ID'),
#         ('name', 'Name'),
#         ('workflow_name', 'Workflow name'),
#         ('workflow_namespace', 'Workflow namespace'),
#         ('task_name', 'Task name'),
#         ('task_execution_id', 'Task ID'),
#         ('state', 'State'),
#         ('state_info', 'State info'),
#         ('accepted', 'Accepted'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at'),
#     ]
#     LIST_COLUMN_FIELD_NAMES = [c[0] for c in COLUMNS if c[0] != 'state_info']
#     LIST_COLUMN_HEADING_NAMES = [c[1] for c in COLUMNS if c[0] != 'state_info']
# class ActionExecutionFormatter(base.MistralFormatter):
# class Create(command.ShowOne):
# class List(base.MistralExecutionLister):
# class Get(command.ShowOne):
# class Update(command.ShowOne):
# class GetOutput(command.Command):
# class GetInput(command.Command):
# class Delete(command.Command):
#     def format(action_ex=None, lister=False):
#     def produce_output(self, parsed_args, column_names, data):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def _get_format_function(self):
#     def get_parser(self, prog_name):
#     def _get_resources(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: mistralclient/tests/unit/base.py
# class BaseClientTest(base.BaseTestCase):
# class BaseCommandTest(base.BaseTestCase):
#     def setUp(self):
#     def setUp(self):
#     def call(self, command, app_args=(), prog_name=''):


import copy
import io
import sys
from unittest import mock
from oslo_serialization import jsonutils
from mistralclient.api.v2 import action_executions as action_ex
from mistralclient.commands.v2 import action_executions as action_ex_cmd
from mistralclient.tests.unit import base
#    under the License.
#




ACTION_EX_DICT = {
    'id': '123',
    'name': 'some',
    'workflow_name': 'thing',
    'workflow_namespace': '',
    'task_name': 'task1',
    'task_execution_id': "1-2-3-4",
    'state': 'RUNNING',
    'state_info': 'RUNNING somehow.',
    'accepted': True,
    'created_at': '1',
    'updated_at': '1',
}

ACTION_EX_RESULT = {"test": "is", "passed": "successfully"}
ACTION_EX_INPUT = {"param1": "val1", "param2": 2}

ACTION_EX_WITH_OUTPUT_DICT = ACTION_EX_DICT.copy()
ACTION_EX_WITH_OUTPUT_DICT.update(
    {'output': jsonutils.dumps(ACTION_EX_RESULT)})

ACTION_EX_WITH_INPUT_DICT = ACTION_EX_DICT.copy()
ACTION_EX_WITH_INPUT_DICT.update({'input': jsonutils.dumps(ACTION_EX_INPUT)})


# Path: mistralclient/api/v2/action_executions.py
# class ActionExecution(base.Resource):
# class ActionExecutionManager(base.ResourceManager):
#     def create(self, name, input=None, namespace='', **params):
#     def update(self, id, state=None, output=None):
#     def list(self, task_execution_id=None, limit=None, marker='', fields=None,
#              sort_keys='', sort_dirs='', **filters):
#     def get(self, id):
#     def delete(self, id):
# 
# Path: mistralclient/commands/v2/action_executions.py
# LOG = logging.getLogger(__name__)
#     COLUMNS = [
#         ('id', 'ID'),
#         ('name', 'Name'),
#         ('workflow_name', 'Workflow name'),
#         ('workflow_namespace', 'Workflow namespace'),
#         ('task_name', 'Task name'),
#         ('task_execution_id', 'Task ID'),
#         ('state', 'State'),
#         ('state_info', 'State info'),
#         ('accepted', 'Accepted'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at'),
#     ]
#     LIST_COLUMN_FIELD_NAMES = [c[0] for c in COLUMNS if c[0] != 'state_info']
#     LIST_COLUMN_HEADING_NAMES = [c[1] for c in COLUMNS if c[0] != 'state_info']
# class ActionExecutionFormatter(base.MistralFormatter):
# class Create(command.ShowOne):
# class List(base.MistralExecutionLister):
# class Get(command.ShowOne):
# class Update(command.ShowOne):
# class GetOutput(command.Command):
# class GetInput(command.Command):
# class Delete(command.Command):
#     def format(action_ex=None, lister=False):
#     def produce_output(self, parsed_args, column_names, data):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def _get_format_function(self):
#     def get_parser(self, prog_name):
#     def _get_resources(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: mistralclient/tests/unit/base.py
# class BaseClientTest(base.BaseTestCase):
# class BaseCommandTest(base.BaseTestCase):
#     def setUp(self):
#     def setUp(self):
#     def call(self, command, app_args=(), prog_name=''):


# Path: mistralclient/tests/unit/v2/test_cli_action_execs.py
import copy
import io
import sys
from unittest import mock
from oslo_serialization import jsonutils
from mistralclient.api.v2 import action_executions as action_ex
from mistralclient.commands.v2 import action_executions as action_ex_cmd
from mistralclient.tests.unit import base

#    under the License.
#




ACTION_EX_DICT = {
    'id': '123',
    'name': 'some',
    'workflow_name': 'thing',
    'workflow_namespace': '',
    'task_name': 'task1',
    'task_execution_id': "1-2-3-4",
    'state': 'RUNNING',
    'state_info': 'RUNNING somehow.',
    'accepted': True,
    'created_at': '1',
    'updated_at': '1',
}

ACTION_EX_RESULT = {"test": "is", "passed": "successfully"}
ACTION_EX_INPUT = {"param1": "val1", "param2": 2}

ACTION_EX_WITH_OUTPUT_DICT = ACTION_EX_DICT.copy()
ACTION_EX_WITH_OUTPUT_DICT.update(
    {'output': jsonutils.dumps(ACTION_EX_RESULT)})

ACTION_EX_WITH_INPUT_DICT = ACTION_EX_DICT.copy()
ACTION_EX_WITH_INPUT_DICT.update({'input': jsonutils.dumps(ACTION_EX_INPUT)})


ACTION_EX = action_ex.ActionExecution(mock, ACTION_EX_DICT)