コード例 #1
0
ファイル: service.py プロジェクト: CaptTofu/moniker-1
    def __init__(self, *args, **kwargs):
        kwargs.update(host=cfg.CONF.host, topic=cfg.CONF.central_topic)

        policy.init_policy()

        super(Service, self).__init__(*args, **kwargs)

        self.storage_conn = storage.get_connection(cfg.CONF)
コード例 #2
0
ファイル: service.py プロジェクト: managedit/moniker
    def __init__(self, *args, **kwargs):
        kwargs.update(host=cfg.CONF.host, topic=cfg.CONF.central_topic)

        policy.init_policy()

        super(Service, self).__init__(*args, **kwargs)

        self.storage_conn = storage.get_connection(cfg.CONF)
コード例 #3
0
ファイル: service.py プロジェクト: jc-martin/moniker
    def __init__(self, *args, **kwargs):
        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.central_topic
        )

        policy.init_policy()

        super(Service, self).__init__(*args, **kwargs)

        # Get a storage connection
        self.storage_conn = storage.get_connection(cfg.CONF)

        # Initialize extensions
        self.handlers = self._init_extensions()

        if self.handlers:
            # Get a rpc connection if needed
            self.rpc_conn = rpc.create_connection()
コード例 #4
0
ファイル: service.py プロジェクト: mohitsethi/moniker
    def __init__(self, *args, **kwargs):
        backend_driver = cfg.CONF['service:central'].backend_driver
        self.backend = backend.get_backend(backend_driver,
                                           central_service=self)

        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.central_topic,
        )

        policy.init_policy()

        super(Service, self).__init__(*args, **kwargs)

        # Get a storage connection
        self.storage = storage.get_storage()

        # Get a quota manager instance
        self.quota = quota.get_quota()
コード例 #5
0
ファイル: service.py プロジェクト: mohitsethi/moniker
    def __init__(self, backlog=128, threads=1000):

        api_paste_config = cfg.CONF['service:api'].api_paste_config
        config_paths = utils.find_config(api_paste_config)

        if len(config_paths) == 0:
            msg = 'Unable to determine appropriate api-paste-config file'
            raise exceptions.ConfigurationError(msg)

        LOG.info('Using api-paste-config found at: %s' % config_paths[0])

        policy.init_policy()

        application = deploy.loadapp("config:%s" % config_paths[0],
                                     name='osapi_dns')

        super(Service, self).__init__(application=application,
                                      host=cfg.CONF['service:api'].api_host,
                                      port=cfg.CONF['service:api'].api_port,
                                      backlog=backlog,
                                      threads=threads)
コード例 #6
0
ファイル: service.py プロジェクト: riteshnanda09/moniker
    def __init__(self, *args, **kwargs):

        backend_driver = cfg.CONF['service:central'].backend_driver
        self.backend = backend.get_backend(backend_driver)

        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.central_topic,
        )

        policy.init_policy()

        super(Service, self).__init__(*args, **kwargs)

        # Get a storage connection
        self.storage_conn = storage.get_connection()

        # Initialize extensions
        self.handlers = self._init_extensions()

        if self.handlers:
            # Get a rpc connection if needed
            self.rpc_conn = rpc.create_connection()