# Path: tuskar/openstack/common/rpc/common.py
# CONF = cfg.CONF
# LOG = logging.getLogger(__name__)
# _RPC_ENVELOPE_VERSION = '2.0'
# _VERSION_KEY = 'oslo.version'
# _MESSAGE_KEY = 'oslo.message'
#     SANITIZE = {'set_admin_password': [('args', 'new_pass')],
#                 'run_instance': [('args', 'admin_password')],
#                 'route_message': [('args', 'message', 'args', 'method_info',
#                                    'method_kwargs', 'password'),
#                                   ('args', 'message', 'args', 'method_info',
#                                    'method_kwargs', 'admin_password')]}
# class RPCException(Exception):
# class RemoteError(RPCException):
# class Timeout(RPCException):
# class DuplicateMessageError(RPCException):
# class InvalidRPCConnectionReuse(RPCException):
# class UnsupportedRpcVersion(RPCException):
# class UnsupportedRpcEnvelopeVersion(RPCException):
# class RpcVersionCapError(RPCException):
# class Connection(object):
# class CommonRpcContext(object):
# class ClientException(Exception):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, exc_type=None, value=None, traceback=None):
#     def __init__(self, info=None, topic=None, method=None):
#     def close(self):
#     def create_consumer(self, topic, proxy, fanout=False):
#     def create_worker(self, topic, proxy, pool_name):
#     def join_consumer_pool(self, callback, pool_name, topic, exchange_name):
#     def consume_in_thread(self):
# def _safe_log(log_func, msg, msg_data):
# def serialize_remote_exception(failure_info, log_failure=True):
# def deserialize_remote_exception(conf, data):
#     def __init__(self, **kwargs):
#     def __getattr__(self, key):
#     def to_dict(self):
#     def from_dict(cls, values):
#     def deepcopy(self):
#     def update_store(self):
#     def elevated(self, read_deleted=None, overwrite=False):
#     def __init__(self):
# def catch_client_exception(exceptions, func, *args, **kwargs):
# def client_exceptions(*exceptions):
#     def outer(func):
#         def inner(*args, **kwargs):
# def version_is_compatible(imp_version, version):
# def serialize_msg(raw_msg):
# def deserialize_msg(msg):
# 
# Path: tuskar/openstack/common/rpc/serializer.py
# class Serializer(object):
# class NoOpSerializer(Serializer):
#     def serialize_entity(self, context, entity):
#     def deserialize_entity(self, context, entity):
#     def serialize_entity(self, context, entity):
#     def deserialize_entity(self, context, entity):


from tuskar.openstack.common.rpc import common as rpc_common
from tuskar.openstack.common.rpc import serializer as rpc_serializer
        :param method: The method requested to be called by the incoming
                       message.
        :param namespace: The namespace for the requested method.  If None,
                          the dispatcher will look for a method on a callback
                          object with no namespace set.
        :param kwargs: A dict of keyword arguments to be passed to the method.

        :returns: Whatever is returned by the underlying method that gets
                  called.
        """
        if not version:
            version = '1.0'

        had_compatible = False
        for proxyobj in self.callbacks:
            # Check for namespace compatibility
            try:
                cb_namespace = proxyobj.RPC_API_NAMESPACE
            except AttributeError:
                cb_namespace = None

            if namespace != cb_namespace:
                continue

            # Check for version compatibility
            try:
                rpc_api_version = proxyobj.RPC_API_VERSION
            except AttributeError:
                rpc_api_version = '1.0'


# Path: tuskar/openstack/common/rpc/common.py
# CONF = cfg.CONF
# LOG = logging.getLogger(__name__)
# _RPC_ENVELOPE_VERSION = '2.0'
# _VERSION_KEY = 'oslo.version'
# _MESSAGE_KEY = 'oslo.message'
#     SANITIZE = {'set_admin_password': [('args', 'new_pass')],
#                 'run_instance': [('args', 'admin_password')],
#                 'route_message': [('args', 'message', 'args', 'method_info',
#                                    'method_kwargs', 'password'),
#                                   ('args', 'message', 'args', 'method_info',
#                                    'method_kwargs', 'admin_password')]}
# class RPCException(Exception):
# class RemoteError(RPCException):
# class Timeout(RPCException):
# class DuplicateMessageError(RPCException):
# class InvalidRPCConnectionReuse(RPCException):
# class UnsupportedRpcVersion(RPCException):
# class UnsupportedRpcEnvelopeVersion(RPCException):
# class RpcVersionCapError(RPCException):
# class Connection(object):
# class CommonRpcContext(object):
# class ClientException(Exception):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, exc_type=None, value=None, traceback=None):
#     def __init__(self, info=None, topic=None, method=None):
#     def close(self):
#     def create_consumer(self, topic, proxy, fanout=False):
#     def create_worker(self, topic, proxy, pool_name):
#     def join_consumer_pool(self, callback, pool_name, topic, exchange_name):
#     def consume_in_thread(self):
# def _safe_log(log_func, msg, msg_data):
# def serialize_remote_exception(failure_info, log_failure=True):
# def deserialize_remote_exception(conf, data):
#     def __init__(self, **kwargs):
#     def __getattr__(self, key):
#     def to_dict(self):
#     def from_dict(cls, values):
#     def deepcopy(self):
#     def update_store(self):
#     def elevated(self, read_deleted=None, overwrite=False):
#     def __init__(self):
# def catch_client_exception(exceptions, func, *args, **kwargs):
# def client_exceptions(*exceptions):
#     def outer(func):
#         def inner(*args, **kwargs):
# def version_is_compatible(imp_version, version):
# def serialize_msg(raw_msg):
# def deserialize_msg(msg):
# 
# Path: tuskar/openstack/common/rpc/serializer.py
# class Serializer(object):
# class NoOpSerializer(Serializer):
#     def serialize_entity(self, context, entity):
#     def deserialize_entity(self, context, entity):
#     def serialize_entity(self, context, entity):
#     def deserialize_entity(self, context, entity):


# Path: tuskar/openstack/common/rpc/dispatcher.py
from tuskar.openstack.common.rpc import common as rpc_common
from tuskar.openstack.common.rpc import serializer as rpc_serializer

        :param method: The method requested to be called by the incoming
                       message.
        :param namespace: The namespace for the requested method.  If None,
                          the dispatcher will look for a method on a callback
                          object with no namespace set.
        :param kwargs: A dict of keyword arguments to be passed to the method.

        :returns: Whatever is returned by the underlying method that gets
                  called.
        """
        if not version:
            version = '1.0'

        had_compatible = False
        for proxyobj in self.callbacks:
            # Check for namespace compatibility
            try:
                cb_namespace = proxyobj.RPC_API_NAMESPACE
            except AttributeError:
                cb_namespace = None

            if namespace != cb_namespace:
                continue

            # Check for version compatibility
            try:
                rpc_api_version = proxyobj.RPC_API_VERSION
            except AttributeError:
                rpc_api_version = '1.0'


            is_compatible = rpc_common.version_is_compatible(rpc_api_version,