'Proxy RPC to the given compute topic.'

def proxy_rpc_to_manager(self, message, host_name, rpc_message, topic, timeout):

    objects.Service.get_by_compute_host(message.ctxt, host_name)
    (topic, _sep, server) = topic.partition('.')
    cctxt = rpc.get_client(messaging.Target(topic=topic, server=(server or None)))
    method = rpc_message['method']
    kwargs = rpc_message['args']
    if message.need_response:
        cctxt = cctxt.prepare(timeout=timeout)
        return cctxt.call(message.ctxt, method, **kwargs)
    else:
        cctxt.cast(message.ctxt, method, **kwargs)
