Esempio n. 1
0
    def __init__(self, name, threads=None):
        threads = threads or 1000
        super(Service, self).__init__(threads)
        self.name = name
        self.host = CONF.host

        policy.init()

        if not rpc.initialized():
            rpc.init(CONF)
Esempio n. 2
0
    def __init__(self, threads=1000):
        super(Service, self).__init__(threads)

        policy.init()

        # NOTE(kiall): All services need RPC initialized, as this is used
        #              for clients AND servers. Hence, this is common to
        #              all Designate services.
        if not rpc.initialized():
            rpc.init(CONF)
Esempio n. 3
0
    def __init__(self, host, binary, topic, service_name=None, endpoints=None):
        super(Service, self).__init__()

        if not rpc.initialized():
            rpc.init(CONF)

        self.host = host
        self.binary = binary
        self.topic = topic
        self.service_name = service_name

        # TODO(ekarlso): change this to be loadable via mod import or
        # stevedore?
        self.endpoints = endpoints or [self]
Esempio n. 4
0
    def __init__(self, host, binary, topic, service_name=None, endpoints=None):
        super(Service, self).__init__()

        if not rpc.initialized():
            rpc.init(CONF)

        self.host = host
        self.binary = binary
        self.topic = topic
        self.service_name = service_name

        # TODO(ekarlso): change this to be loadable via mod import or
        # stevedore?
        self.endpoints = endpoints or [self]
Esempio n. 5
0
    def __init__(self, threads=None):
        threads = threads or 1000

        super(Service, self).__init__(threads)

        self._host = CONF.host
        self._service_config = CONF['service:%s' % self.service_name]

        policy.init()

        # NOTE(kiall): All services need RPC initialized, as this is used
        #              for clients AND servers. Hence, this is common to
        #              all Designate services.
        if not rpc.initialized():
            rpc.init(CONF)
Esempio n. 6
0
    def __init__(self, threads=None):
        threads = threads or 1000

        super(Service, self).__init__(threads)

        self._host = CONF.host
        self._service_config = CONF['service:%s' % self.service_name]

        policy.init()

        # NOTE(kiall): All services need RPC initialized, as this is used
        #              for clients AND servers. Hence, this is common to
        #              all Designate services.
        if not rpc.initialized():
            rpc.init(CONF)
Esempio n. 7
0
def init_application():
    conf_files = _get_config_files()
    logging.register_options(cfg.CONF)
    cfg.CONF([], project='designate', default_config_files=conf_files)
    config.set_defaults()
    logging.setup(cfg.CONF, 'designate')

    policy.init()

    if not rpc.initialized():
        rpc.init(CONF)

    heartbeat = heartbeat_emitter.get_heartbeat_emitter('api')
    heartbeat.start()

    conf = conf_files[0]

    return deploy.loadapp('config:%s' % conf, name='osapi_dns')
Esempio n. 8
0
def init_application():
    conf_files = _get_config_files()
    logging.register_options(cfg.CONF)
    cfg.CONF([], project='designate', default_config_files=conf_files)
    config.set_defaults()
    logging.setup(cfg.CONF, 'designate')

    policy.init()

    if not rpc.initialized():
        rpc.init(CONF)

    heartbeat = service.Heartbeat('api',
                                  threadgroup.ThreadGroup(thread_pool_size=1))
    heartbeat.start()

    conf = conf_files[0]

    return deploy.loadapp('config:%s' % conf, name='osapi_dns')
Esempio n. 9
0
 def deinit(self):
     if rpc.initialized():
         rpc.cleanup()
Esempio n. 10
0
 def deinit(self):
     if rpc.initialized():
         rpc.cleanup()