示例#1
0
    def __init__(self, *args, **kwargs):
        manager = backend.get_backend(cfg.CONF['service:agent'].backend_driver)

        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.agent_topic,
            manager=manager
        )

        super(Service, self).__init__(*args, **kwargs)
示例#2
0
    def __init__(self, *args, **kwargs):
        manager = backend.get_backend()
        manager.register_opts(cfg.CONF)

        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.agent_topic,
            manager=manager
        )

        super(Service, self).__init__(*args, **kwargs)
示例#3
0
    def __init__(self, *args, **kwargs):
        manager = backend.get_backend(cfg.CONF['service:agent'].backend_driver,
                                      central_service=central_api)

        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.agent_topic,
            manager=manager
        )

        super(Service, self).__init__(*args, **kwargs)
示例#4
0
    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
    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()
示例#6
0
 def get_backend_driver(self):
     return backend.get_backend()
示例#7
0
 def get_backend_driver(self):
     central_service = self.get_central_service()
     return backend.get_backend(cfg.CONF['service:agent'].backend_driver,
                                central_service=central_service)
示例#8
0
 def get_backend_driver(self):
     return backend.get_backend(cfg.CONF['service:agent'].backend_driver)