Exemplo n.º 1
0
    def fanout_cast(self, context, msg, version=None):
        """rpc.fanout_cast() a remote method.

        :param context: The request context
        :param msg: The message to send, including the method and args.
        :param version: (Optional) Override the requested API version in this
               message.

        :returns: None.  rpc.fanout_cast() does not wait on any return value
                  from the remote method.
        """
        self._set_version(msg, version)
        rpc.fanout_cast(context, self.topic, msg)
Exemplo n.º 2
0
Arquivo: api.py Projeto: Willtech/nova
def update_service_capabilities(context, service_name, host, capabilities):
    """Send an update to all the scheduler services informing them
       of the capabilities of this service."""
    kwargs = dict(method='update_service_capabilities',
                  args=dict(service_name=service_name, host=host,
                            capabilities=capabilities))
    return rpc.fanout_cast(context, 'scheduler', kwargs)
Exemplo n.º 3
0
 def _notify_all_volume_hosts(self, event):
     rpc.fanout_cast(
         context.get_admin_context(), FLAGS.volume_topic, {"method": "notification", "args": {"event": event}}
     )