Пример #1
0
def send_api_fault(context, url, status, exception):
    """Send an api.fault notification."""

    if not CONF.notify_api_faults:
        return

    payload = {'url': url, 'exception': str(exception), 'status': status}

    rpc.get_notifier('api').error(context, 'dns.api.fault', payload)
Пример #2
0
def send_api_fault(context, url, status, exception):
    """Send an api.fault notification."""

    if not CONF.notify_api_faults:
        return

    payload = {'url': url, 'exception': str(exception), 'status': status}

    rpc.get_notifier('api').error(context, 'dns.api.fault', payload)
Пример #3
0
    def start(self):
        super(RPCService, self).start()

        LOG.debug(_("Starting RPC server on topic '%s'") % self._rpc_topic)
        self._rpc_server.start()

        # TODO(kiall): This probably belongs somewhere else, maybe the base
        #              Service class?
        self.notifier = rpc.get_notifier(self.service_name)

        for e in self._rpc_endpoints:
            if e != self and hasattr(e, 'start'):
                e.start()
Пример #4
0
    def start(self):
        super(RPCService, self).start()

        LOG.debug("Starting RPC server on topic '%s'" % self._rpc_topic)
        self._rpc_server.start()

        # TODO(kiall): This probably belongs somewhere else, maybe the base
        #              Service class?
        self.notifier = rpc.get_notifier(self.service_name)

        for e in self._rpc_endpoints:
            if e != self and hasattr(e, 'start'):
                e.start()
Пример #5
0
    def start(self):
        version_string = version.version_info.version_string()
        LOG.audit(_('Starting %(topic)s node (version %(version_string)s)'),
                  {'topic': self.topic, 'version_string': version_string})

        LOG.debug(_("Creating RPC server on topic '%s'") % self.topic)

        target = messaging.Target(topic=self.topic, server=self.host)

        self.rpcserver = rpc.get_server(target, self.endpoints)
        self.rpcserver.start()

        self.notifier = rpc.get_notifier(self.service_name)
Пример #6
0
    def start(self):
        version_string = version.version_info.version_string()
        LOG.audit(_('Starting %(topic)s node (version %(version_string)s)'),
                  {'topic': self.topic, 'version_string': version_string})

        LOG.debug(_("Creating RPC server on topic '%s'") % self.topic)

        manager = self.manager or self
        endpoints = [manager]
        if hasattr(manager, 'additional_endpoints'):
            endpoints.extend(self.manager.additional_endpoints)

        target = messaging.Target(topic=self.topic, server=self.host)
        self.rpcserver = rpc.get_server(target, endpoints)
        self.rpcserver.start()

        self.notifier = rpc.get_notifier(self.service_name)
Пример #7
0
    def start(self):
        version_string = version.version_info.version_string()
        LOG.audit(_('Starting %(topic)s node (version %(version_string)s)'), {
            'topic': self.topic,
            'version_string': version_string
        })

        LOG.debug(_("Creating RPC server on topic '%s'") % self.topic)

        target = messaging.Target(topic=self.topic, server=self.host)
        self.rpcserver = rpc.get_server(target, self.endpoints)
        self.rpcserver.start()

        self.notifier = rpc.get_notifier(self.service_name)

        for e in self.endpoints:
            if e != self and hasattr(e, 'start'):
                e.start()
Пример #8
0
    def start(self):
        super(RPCService, self).start()

        version_string = version.version_info.version_string()
        LOG.info(_('Starting %(topic)s node (version %(version_string)s)') %
                 {'topic': self.topic, 'version_string': version_string})

        LOG.debug(_("Creating RPC server on topic '%s'") % self.topic)

        target = messaging.Target(topic=self.topic, server=self.host)
        self.rpcserver = rpc.get_server(target, self.endpoints)
        self.rpcserver.start()

        self.notifier = rpc.get_notifier(self.service_name)

        for e in self.endpoints:
            if e != self and hasattr(e, 'start'):
                e.start()
Пример #9
0
 def __init__(self):
     super(PeriodicExistsTask, self).__init__()
     self.notifier = rpc.get_notifier('zone_manager')
Пример #10
0
 def __init__(self):
     super(PeriodicExistsTask, self).__init__()
     self.notifier = rpc.get_notifier('producer')
Пример #11
0
 def __init__(self):
     super(PeriodicExistsTask, self).__init__()
     self.notifier = rpc.get_notifier('producer')
Пример #12
0
 def __init__(self):
     super(PeriodicExistsTask, self).__init__()
     self.notifier = rpc.get_notifier('zone_manager')
Пример #13
0
 def start(self):
     super(RPCService, self).start()
     target = messaging.Target(topic=self.rpc_topic, server=self.host)
     self.rpc_server = rpc.get_server(target, self.endpoints)
     self.rpc_server.start()
     self.notifier = rpc.get_notifier(self.name)