# Path: mistralclient/api/v2/workflows.py
# class Workflow(base.Resource):
# class WorkflowManager(base.ResourceManager):
#     def create(self, definition, namespace='', scope='private'):
#     def update(self, definition, namespace='', scope='private', id=None):
#     def list(self, namespace='', marker='', limit=None, sort_keys='',
#              sort_dirs='', fields='', **filters):
#     def get(self, identifier, namespace=''):
#     def delete(self, identifier, namespace=None):
#     def validate(self, definition):
# 
# Path: mistralclient/commands/v2/base.py
# DEFAULT_LIMIT = 100
#     COLUMNS = []
# class MistralFormatter(metaclass=abc.ABCMeta):
# class MistralLister(command.Lister, metaclass=abc.ABCMeta):
# class MistralExecutionLister(MistralLister, metaclass=abc.ABCMeta):
#     def fields(cls):
#     def headings(cls):
#     def format_list(cls, instance=None):
#     def format(instance=None, lister=False):
#     def _get_format_function(self):
#     def get_parser(self, parsed_args):
#     def _get_resources(self, parsed_args):
#     def _validate_parsed_args(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, parsed_args):
#     def take_action(self, parsed_args):
# def cut(string, length=25):
# def wrap(string, width=25):
# def get_filters(parsed_args):
# def get_duration_str(start_dt_str, end_dt_str):
# 
# Path: mistralclient/commands/v2/workflows.py
# class WorkflowFormatter(base.MistralFormatter):
# class List(base.MistralLister):
# class Get(show.ShowOne):
# class Create(base.MistralLister):
# class Delete(command.Command):
# class Update(base.MistralLister):
# class GetDefinition(command.Command):
# class Validate(show.ShowOne):
#     COLUMNS = [
#         ('id', 'ID'),
#         ('name', 'Name'),
#         ('namespace', 'Namespace'),
#         ('project_id', 'Project ID'),
#         ('tags', 'Tags'),
#         ('input', 'Input'),
#         ('scope', 'Scope'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at')
#     ]
#     def format(workflow=None, lister=False):
#     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 _get_format_function(self):
#     def _validate_parsed_args(self, parsed_args):
#     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 _get_format_function(self):
#     def _get_resources(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def _format(result=None):
#     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=''):


from unittest import mock
from mistralclient.api.v2 import workflows
from mistralclient.commands.v2 import base as cmd_base
from mistralclient.commands.v2 import workflows as workflow_cmd
from mistralclient.tests.unit import base



WORKFLOW_DICT = {
    'id': '1-2-3-4',
    'name': 'a',
    'namespace': '',
    'project_id': '12345',
    'tags': ['a', 'b'],
    'input': 'param',
    'scope': 'private',
    'created_at': '1',
    'updated_at': '1'
}

WF_DEF = """
version: '2.0'

flow:
  tasks:
    task1:
      action: nova.servers_get server="1"
"""

WF_WITH_DEF_DICT = WORKFLOW_DICT.copy()
WF_WITH_DEF_DICT.update({'definition': WF_DEF})
WORKFLOW = workflows.Workflow(mock, WORKFLOW_DICT)
WORKFLOW_WITH_DEF = workflows.Workflow(mock, WF_WITH_DEF_DICT)



# Path: mistralclient/api/v2/workflows.py
# class Workflow(base.Resource):
# class WorkflowManager(base.ResourceManager):
#     def create(self, definition, namespace='', scope='private'):
#     def update(self, definition, namespace='', scope='private', id=None):
#     def list(self, namespace='', marker='', limit=None, sort_keys='',
#              sort_dirs='', fields='', **filters):
#     def get(self, identifier, namespace=''):
#     def delete(self, identifier, namespace=None):
#     def validate(self, definition):
# 
# Path: mistralclient/commands/v2/base.py
# DEFAULT_LIMIT = 100
#     COLUMNS = []
# class MistralFormatter(metaclass=abc.ABCMeta):
# class MistralLister(command.Lister, metaclass=abc.ABCMeta):
# class MistralExecutionLister(MistralLister, metaclass=abc.ABCMeta):
#     def fields(cls):
#     def headings(cls):
#     def format_list(cls, instance=None):
#     def format(instance=None, lister=False):
#     def _get_format_function(self):
#     def get_parser(self, parsed_args):
#     def _get_resources(self, parsed_args):
#     def _validate_parsed_args(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, parsed_args):
#     def take_action(self, parsed_args):
# def cut(string, length=25):
# def wrap(string, width=25):
# def get_filters(parsed_args):
# def get_duration_str(start_dt_str, end_dt_str):
# 
# Path: mistralclient/commands/v2/workflows.py
# class WorkflowFormatter(base.MistralFormatter):
# class List(base.MistralLister):
# class Get(show.ShowOne):
# class Create(base.MistralLister):
# class Delete(command.Command):
# class Update(base.MistralLister):
# class GetDefinition(command.Command):
# class Validate(show.ShowOne):
#     COLUMNS = [
#         ('id', 'ID'),
#         ('name', 'Name'),
#         ('namespace', 'Namespace'),
#         ('project_id', 'Project ID'),
#         ('tags', 'Tags'),
#         ('input', 'Input'),
#         ('scope', 'Scope'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at')
#     ]
#     def format(workflow=None, lister=False):
#     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 _get_format_function(self):
#     def _validate_parsed_args(self, parsed_args):
#     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 _get_format_function(self):
#     def _get_resources(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def _format(result=None):
#     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_workflows.py
from unittest import mock
from mistralclient.api.v2 import workflows
from mistralclient.commands.v2 import base as cmd_base
from mistralclient.commands.v2 import workflows as workflow_cmd
from mistralclient.tests.unit import base




WORKFLOW_DICT = {
    'id': '1-2-3-4',
    'name': 'a',
    'namespace': '',
    'project_id': '12345',
    'tags': ['a', 'b'],
    'input': 'param',
    'scope': 'private',
    'created_at': '1',
    'updated_at': '1'
}

WF_DEF = """
version: '2.0'

flow:
  tasks:
    task1:
      action: nova.servers_get server="1"
"""

WF_WITH_DEF_DICT = WORKFLOW_DICT.copy()
WF_WITH_DEF_DICT.update({'definition': WF_DEF})
WORKFLOW = workflows.Workflow(mock, WORKFLOW_DICT)
WORKFLOW_WITH_DEF = workflows.Workflow(mock, WF_WITH_DEF_DICT)



class TestCLIWorkflowsV2(base.BaseCommandTest):