# Path: muranoclient/apiclient/exceptions.py
# class ClientException(Exception):
# class MissingArgs(ClientException):
# class ValidationError(ClientException):
# class UnsupportedVersion(ClientException):
# class CommandError(ClientException):
# class AuthorizationFailure(ClientException):
# class ConnectionRefused(ClientException):
# class AuthPluginOptionsMissing(AuthorizationFailure):
# class AuthSystemNotFound(AuthorizationFailure):
# class NoUniqueMatch(ClientException):
# class EndpointException(ClientException):
# class EndpointNotFound(EndpointException):
# class AmbiguousEndpoints(EndpointException):
# class HttpError(ClientException):
# class HTTPRedirection(HttpError):
# class HTTPClientError(HttpError):
# class HttpServerError(HttpError):
# class MultipleChoices(HTTPRedirection):
# class BadRequest(HTTPClientError):
# class Unauthorized(HTTPClientError):
# class PaymentRequired(HTTPClientError):
# class Forbidden(HTTPClientError):
# class NotFound(HTTPClientError):
# class MethodNotAllowed(HTTPClientError):
# class NotAcceptable(HTTPClientError):
# class ProxyAuthenticationRequired(HTTPClientError):
# class RequestTimeout(HTTPClientError):
# class Conflict(HTTPClientError):
# class Gone(HTTPClientError):
# class LengthRequired(HTTPClientError):
# class PreconditionFailed(HTTPClientError):
# class RequestEntityTooLarge(HTTPClientError):
# class RequestUriTooLong(HTTPClientError):
# class UnsupportedMediaType(HTTPClientError):
# class RequestedRangeNotSatisfiable(HTTPClientError):
# class ExpectationFailed(HTTPClientError):
# class UnprocessableEntity(HTTPClientError):
# class InternalServerError(HttpServerError):
# class HttpNotImplemented(HttpServerError):
# class BadGateway(HttpServerError):
# class ServiceUnavailable(HttpServerError):
# class GatewayTimeout(HttpServerError):
# class HttpVersionNotSupported(HttpServerError):
#     def __init__(self, missing):
#     def __init__(self, opt_names):
#     def __init__(self, auth_system):
#     def __init__(self, endpoints=None):
#     def __init__(self, message=None, details=None,
#                  response=None, request_id=None,
#                  url=None, method=None, http_status=None):
#     def __init__(self, *args, **kwargs):
# def from_response(response, url, method):


import abc
import argparse
import os
from stevedore import extension
from muranoclient.apiclient import exceptions
    global _discovered_plugins
    _discovered_plugins = {}

    def add_plugin(ext):
        _discovered_plugins[ext.name] = ext.plugin

    ep_namespace = "muranoclient.apiclient.auth"
    mgr = extension.ExtensionManager(ep_namespace)
    mgr.map(add_plugin)


def load_auth_system_opts(parser):
    """Load options needed by the available auth-systems into a parser.

    This function will try to populate the parser with options from the
    available plugins.
    """
    group = parser.add_argument_group("Common auth options")
    BaseAuthPlugin.add_common_opts(group)
    for name, auth_plugin in _discovered_plugins.items():
        group = parser.add_argument_group(
            "Auth-system '%s' options" % name,
            conflict_handler="resolve")
        auth_plugin.add_opts(group)


def load_plugin(auth_system):
    try:
        plugin_class = _discovered_plugins[auth_system]
    except KeyError:

# Path: muranoclient/apiclient/exceptions.py
# class ClientException(Exception):
# class MissingArgs(ClientException):
# class ValidationError(ClientException):
# class UnsupportedVersion(ClientException):
# class CommandError(ClientException):
# class AuthorizationFailure(ClientException):
# class ConnectionRefused(ClientException):
# class AuthPluginOptionsMissing(AuthorizationFailure):
# class AuthSystemNotFound(AuthorizationFailure):
# class NoUniqueMatch(ClientException):
# class EndpointException(ClientException):
# class EndpointNotFound(EndpointException):
# class AmbiguousEndpoints(EndpointException):
# class HttpError(ClientException):
# class HTTPRedirection(HttpError):
# class HTTPClientError(HttpError):
# class HttpServerError(HttpError):
# class MultipleChoices(HTTPRedirection):
# class BadRequest(HTTPClientError):
# class Unauthorized(HTTPClientError):
# class PaymentRequired(HTTPClientError):
# class Forbidden(HTTPClientError):
# class NotFound(HTTPClientError):
# class MethodNotAllowed(HTTPClientError):
# class NotAcceptable(HTTPClientError):
# class ProxyAuthenticationRequired(HTTPClientError):
# class RequestTimeout(HTTPClientError):
# class Conflict(HTTPClientError):
# class Gone(HTTPClientError):
# class LengthRequired(HTTPClientError):
# class PreconditionFailed(HTTPClientError):
# class RequestEntityTooLarge(HTTPClientError):
# class RequestUriTooLong(HTTPClientError):
# class UnsupportedMediaType(HTTPClientError):
# class RequestedRangeNotSatisfiable(HTTPClientError):
# class ExpectationFailed(HTTPClientError):
# class UnprocessableEntity(HTTPClientError):
# class InternalServerError(HttpServerError):
# class HttpNotImplemented(HttpServerError):
# class BadGateway(HttpServerError):
# class ServiceUnavailable(HttpServerError):
# class GatewayTimeout(HttpServerError):
# class HttpVersionNotSupported(HttpServerError):
#     def __init__(self, missing):
#     def __init__(self, opt_names):
#     def __init__(self, auth_system):
#     def __init__(self, endpoints=None):
#     def __init__(self, message=None, details=None,
#                  response=None, request_id=None,
#                  url=None, method=None, http_status=None):
#     def __init__(self, *args, **kwargs):
# def from_response(response, url, method):


# Path: muranoclient/apiclient/auth.py
import abc
import argparse
import os
from stevedore import extension
from muranoclient.apiclient import exceptions

    global _discovered_plugins
    _discovered_plugins = {}

    def add_plugin(ext):
        _discovered_plugins[ext.name] = ext.plugin

    ep_namespace = "muranoclient.apiclient.auth"
    mgr = extension.ExtensionManager(ep_namespace)
    mgr.map(add_plugin)


def load_auth_system_opts(parser):
    """Load options needed by the available auth-systems into a parser.

    This function will try to populate the parser with options from the
    available plugins.
    """
    group = parser.add_argument_group("Common auth options")
    BaseAuthPlugin.add_common_opts(group)
    for name, auth_plugin in _discovered_plugins.items():
        group = parser.add_argument_group(
            "Auth-system '%s' options" % name,
            conflict_handler="resolve")
        auth_plugin.add_opts(group)


def load_plugin(auth_system):
    try:
        plugin_class = _discovered_plugins[auth_system]
    except KeyError:

        raise exceptions.AuthSystemNotFound(auth_system)