# Path: osprofiler/cmd/commands.py
# class BaseCommand(object):
# class TraceCommands(BaseCommand):
#     def show(self, args):
#         def datetime_json_serialize(obj):
#     def _create_dot_graph(self, trace):
#         def _create_node(info):
#         def _create_sub_graph(root):
#     def list(self, args):
# 
# Path: osprofiler/exc.py
# class CommandError(Exception):
# class LogInsightAPIError(Exception):
# class LogInsightLoginTimeout(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
# 
# Path: osprofiler/opts.py
# _PROFILER_OPTS = [
#     _enabled_opt,
#     _trace_sqlalchemy_opt,
#     _hmac_keys_opt,
#     _connection_string_opt,
#     _es_doc_type_opt,
#     _es_scroll_time_opt,
#     _es_scroll_size_opt,
#     _socket_timeout_opt,
#     _sentinel_service_name_opt,
#     _filter_error_trace
# ]
# def set_defaults(conf, enabled=None, trace_sqlalchemy=None, hmac_keys=None,
#                  connection_string=None, es_doc_type=None,
#                  es_scroll_time=None, es_scroll_size=None,
#                  socket_timeout=None, sentinel_service_name=None):
# def is_trace_enabled(conf=None):
# def is_db_trace_enabled(conf=None):
# def enable_web_trace(conf=None):
# def disable_web_trace(conf=None):
# def list_opts():


import argparse
import inspect
import sys
import osprofiler
from oslo_config import cfg
from osprofiler.cmd import commands
from osprofiler import exc
from osprofiler import opts
            subcommand_parser = group_parser.add_subparsers()

            for name, callback in inspect.getmembers(
                    group_cls(), predicate=inspect.ismethod):
                command = name.replace("_", "-")
                desc = callback.__doc__ or ""
                help_message = desc.strip().split("\n")[0]
                arguments = getattr(callback, "arguments", [])

                command_parser = subcommand_parser.add_parser(
                    command, help=help_message, description=desc)
                for (args, kwargs) in arguments:
                    command_parser.add_argument(*args, **kwargs)
                command_parser.set_defaults(func=callback)

    def _no_project_and_domain_set(self, args):
        if not (args.os_project_id or (args.os_project_name
                and (args.os_user_domain_name or args.os_user_domain_id))
                or (args.os_tenant_id or args.os_tenant_name)):
            return True
        else:
            return False


def main(args=None):
    if args is None:
        args = sys.argv[1:]

    try:
        OSProfilerShell(args)

# Path: osprofiler/cmd/commands.py
# class BaseCommand(object):
# class TraceCommands(BaseCommand):
#     def show(self, args):
#         def datetime_json_serialize(obj):
#     def _create_dot_graph(self, trace):
#         def _create_node(info):
#         def _create_sub_graph(root):
#     def list(self, args):
# 
# Path: osprofiler/exc.py
# class CommandError(Exception):
# class LogInsightAPIError(Exception):
# class LogInsightLoginTimeout(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
# 
# Path: osprofiler/opts.py
# _PROFILER_OPTS = [
#     _enabled_opt,
#     _trace_sqlalchemy_opt,
#     _hmac_keys_opt,
#     _connection_string_opt,
#     _es_doc_type_opt,
#     _es_scroll_time_opt,
#     _es_scroll_size_opt,
#     _socket_timeout_opt,
#     _sentinel_service_name_opt,
#     _filter_error_trace
# ]
# def set_defaults(conf, enabled=None, trace_sqlalchemy=None, hmac_keys=None,
#                  connection_string=None, es_doc_type=None,
#                  es_scroll_time=None, es_scroll_size=None,
#                  socket_timeout=None, sentinel_service_name=None):
# def is_trace_enabled(conf=None):
# def is_db_trace_enabled(conf=None):
# def enable_web_trace(conf=None):
# def disable_web_trace(conf=None):
# def list_opts():


# Path: osprofiler/cmd/shell.py
import argparse
import inspect
import sys
import osprofiler
from oslo_config import cfg
from osprofiler.cmd import commands
from osprofiler import exc
from osprofiler import opts

            subcommand_parser = group_parser.add_subparsers()

            for name, callback in inspect.getmembers(
                    group_cls(), predicate=inspect.ismethod):
                command = name.replace("_", "-")
                desc = callback.__doc__ or ""
                help_message = desc.strip().split("\n")[0]
                arguments = getattr(callback, "arguments", [])

                command_parser = subcommand_parser.add_parser(
                    command, help=help_message, description=desc)
                for (args, kwargs) in arguments:
                    command_parser.add_argument(*args, **kwargs)
                command_parser.set_defaults(func=callback)

    def _no_project_and_domain_set(self, args):
        if not (args.os_project_id or (args.os_project_name
                and (args.os_user_domain_name or args.os_user_domain_id))
                or (args.os_tenant_id or args.os_tenant_name)):
            return True
        else:
            return False


def main(args=None):
    if args is None:
        args = sys.argv[1:]

    try:
        OSProfilerShell(args)

    except exc.CommandError as e: