Exemple #1
0
 def _cast(self, method_name, **kwargs):
     try:
         rpc.cast(self.context, self._get_routing_key(),
                  {'method': method_name, 'args': kwargs})
     except Exception as e:
         LOG.error(e)
         raise exception.GuestError(original_message=str(e))
Exemple #2
0
 def _real_cast(self, method_name, **kwargs):
     try:
         rpc.cast(self.context, self._get_routing_key(),
                  {"method": method_name, "args": kwargs})
     except Exception as e:
         LOG.error(e)
         raise exception.TaskManagerError(original_message=str(e))
Exemple #3
0
 def _cast(self, method_name, **kwargs):
     try:
         rpc.cast(self.context, self._get_routing_key(), {
             'method': method_name,
             'args': kwargs
         })
     except Exception as e:
         LOG.error(e)
         raise exception.GuestError(original_message=str(e))
Exemple #4
0
    def cast(self, context, msg, topic=None, version=None):
        """rpc.cast() a remote method.

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

        :returns: None.  rpc.cast() does not wait on any return value from the
                  remote method.
        """
        self._set_version(msg, version)
        rpc.cast(context, self._get_topic(topic), msg)
Exemple #5
0
    def cast(self, context, msg, topic=None, version=None):
        """rpc.cast() a remote method.

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

        :returns: None.  rpc.cast() does not wait on any return value from the
                  remote method.
        """
        self._set_version(msg, version)
        rpc.cast(context, self._get_topic(topic), msg)