def _create_compute_node_service(self, host):
        service = t_service.NovaService(
            host=host,
            binary="nova-compute",
            topic="compute",  # TODO(saggi): get from conf
            db_allowed=False,
            periodic_enable=True,
            report_interval=_REPORT_INTERVAL,
            periodic_interval_max=_REPORT_INTERVAL_MAX,
            manager=get_import_path(DispatcherComputeManager),
            site_manager=self._site_manager
        )

        t_service.fix_compute_service_exchange(service)

        return service
Exemple #2
0
def setup_server():
    service = t_service.NovaService(
        host=CONF.host,
        # NOTE(zhiyuan) binary needs to start with "nova-"
        # if nova service is used
        binary="nova-proxy",
        topic="proxy",
        db_allowed=False,
        periodic_enable=True,
        report_interval=_REPORT_INTERVAL,
        periodic_interval_max=_REPORT_INTERVAL_MAX,
        manager=get_import_path(ProxyComputeManager),
    )

    t_service.fix_compute_service_exchange(service)

    return service