# 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/utils.py
# def do_action_on_many(action, resources, success_msg, error_msg):
# def load_content(content):
# def load_file(path):
# def get_contents_if_file(contents_or_file_name):
# def load_json(input_string):


import argparse
from osc_lib.command import command
from mistralclient.commands.v2 import base
from mistralclient import utils
        mistral_client = self.app.client_manager.workflow_engine

        workbook = mistral_client.workbooks.create(
            parsed_args.definition.read(),
            namespace=parsed_args.namespace,
            scope=scope
        )

        return WorkbookFormatter.format(workbook)


class Delete(command.Command):
    """Delete workbook."""

    def get_parser(self, prog_name):
        parser = super(Delete, self).get_parser(prog_name)

        parser.add_argument('workbook', nargs='+', help='Name of workbook(s).')
        parser.add_argument(
            '--namespace',
            nargs='?',
            default=None,
            help="Namespace to delete the workbook(s) from."
        )

        return parser

    def take_action(self, parsed_args):
        mistral_client = self.app.client_manager.workflow_engine


# 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/utils.py
# def do_action_on_many(action, resources, success_msg, error_msg):
# def load_content(content):
# def load_file(path):
# def get_contents_if_file(contents_or_file_name):
# def load_json(input_string):


# Path: mistralclient/commands/v2/workbooks.py
import argparse
from osc_lib.command import command
from mistralclient.commands.v2 import base
from mistralclient import utils

        mistral_client = self.app.client_manager.workflow_engine

        workbook = mistral_client.workbooks.create(
            parsed_args.definition.read(),
            namespace=parsed_args.namespace,
            scope=scope
        )

        return WorkbookFormatter.format(workbook)


class Delete(command.Command):
    """Delete workbook."""

    def get_parser(self, prog_name):
        parser = super(Delete, self).get_parser(prog_name)

        parser.add_argument('workbook', nargs='+', help='Name of workbook(s).')
        parser.add_argument(
            '--namespace',
            nargs='?',
            default=None,
            help="Namespace to delete the workbook(s) from."
        )

        return parser

    def take_action(self, parsed_args):
        mistral_client = self.app.client_manager.workflow_engine


        utils.do_action_on_many(