# Path: mistralclient/api/client.py
# def client(auth_type='keystone', **kwargs):
#     return client_v2.Client(auth_type=auth_type, **kwargs)
# 
# Path: mistralclient/auth/auth_types.py
# ALL = extension.ExtensionManager(
#     namespace='mistralclient.auth',
#     invoke_on_load=False
# ).names()
# 
# Path: mistralclient/exceptions.py
# class MistralClientException(Exception):
# class IllegalArgumentException(MistralClientException):
#     def __str__(self):
#     def __init__(self, message=message):
#     def __init__(self, message=None):


import argparse
import logging
import os
import sys
import mistralclient.commands.v2.action_executions
import mistralclient.commands.v2.actions
import mistralclient.commands.v2.code_sources
import mistralclient.commands.v2.cron_triggers
import mistralclient.commands.v2.dynamic_actions
import mistralclient.commands.v2.environments
import mistralclient.commands.v2.event_triggers
import mistralclient.commands.v2.executions
import mistralclient.commands.v2.members
import mistralclient.commands.v2.services
import mistralclient.commands.v2.tasks
import mistralclient.commands.v2.workbooks
import mistralclient.commands.v2.workflows
from cliff import app
from cliff import commandmanager
from osc_lib.command import command
from mistralclient.api import client
from mistralclient.auth import auth_types
from mistralclient import exceptions as exe

        # Set default for auth_url if not supplied. The default is not
        # set at the parser to support use cases where auth is not enabled.
        # An example use case would be a developer's environment.
        if not self.options.auth_url:
            if self.options.password or self.options.token:
                self.options.auth_url = 'http://localhost:35357/v3'

        if (self.options.auth_type == 'keystone' and
                not self.options.auth_url.endswith("/v2.0")):
            # Assume that keystone V3 is used and try to be more user-friendly,
            # i.e provide default values for domains
            if (not self.options.project_domain_id and
                    not self.options.project_domain_name):
                self.options.project_domain_id = "default"

            if (not self.options.user_domain_id and
                    not self.options.user_domain_name):
                self.options.user_domain_id = "default"

            if (not self.options.target_project_domain_id and
                    not self.options.target_project_domain_name):
                self.options.target_project_domain_id = "default"

            if (not self.options.target_user_domain_id and
                    not self.options.target_user_domain_name):
                self.options.target_user_domain_id = "default"

        if self.options.auth_url and not self.options.token:
            if not self.options.username:

# Path: mistralclient/api/client.py
# def client(auth_type='keystone', **kwargs):
#     return client_v2.Client(auth_type=auth_type, **kwargs)
# 
# Path: mistralclient/auth/auth_types.py
# ALL = extension.ExtensionManager(
#     namespace='mistralclient.auth',
#     invoke_on_load=False
# ).names()
# 
# Path: mistralclient/exceptions.py
# class MistralClientException(Exception):
# class IllegalArgumentException(MistralClientException):
#     def __str__(self):
#     def __init__(self, message=message):
#     def __init__(self, message=None):


# Path: mistralclient/shell.py
import argparse
import logging
import os
import sys
import mistralclient.commands.v2.action_executions
import mistralclient.commands.v2.actions
import mistralclient.commands.v2.code_sources
import mistralclient.commands.v2.cron_triggers
import mistralclient.commands.v2.dynamic_actions
import mistralclient.commands.v2.environments
import mistralclient.commands.v2.event_triggers
import mistralclient.commands.v2.executions
import mistralclient.commands.v2.members
import mistralclient.commands.v2.services
import mistralclient.commands.v2.tasks
import mistralclient.commands.v2.workbooks
import mistralclient.commands.v2.workflows
from cliff import app
from cliff import commandmanager
from osc_lib.command import command
from mistralclient.api import client
from mistralclient.auth import auth_types
from mistralclient import exceptions as exe


        # Set default for auth_url if not supplied. The default is not
        # set at the parser to support use cases where auth is not enabled.
        # An example use case would be a developer's environment.
        if not self.options.auth_url:
            if self.options.password or self.options.token:
                self.options.auth_url = 'http://localhost:35357/v3'

        if (self.options.auth_type == 'keystone' and
                not self.options.auth_url.endswith("/v2.0")):
            # Assume that keystone V3 is used and try to be more user-friendly,
            # i.e provide default values for domains
            if (not self.options.project_domain_id and
                    not self.options.project_domain_name):
                self.options.project_domain_id = "default"

            if (not self.options.user_domain_id and
                    not self.options.user_domain_name):
                self.options.user_domain_id = "default"

            if (not self.options.target_project_domain_id and
                    not self.options.target_project_domain_name):
                self.options.target_project_domain_id = "default"

            if (not self.options.target_user_domain_id and
                    not self.options.target_user_domain_name):
                self.options.target_user_domain_id = "default"

        if self.options.auth_url and not self.options.token:
            if not self.options.username:

                raise exe.IllegalArgumentException(