コード例 #1
0
ファイル: all.py プロジェクト: vkmc/manila
def main():
    log.register_options(CONF)
    config.set_middleware_defaults()
    CONF(sys.argv[1:], project='manila', version=version.version_string())
    log.setup(CONF, "manila")
    LOG = log.getLogger('manila.all')

    msg = _('manila-all is deprecated in Newton and '
            'will be removed in Ocata.')
    versionutils.report_deprecated_feature(LOG, msg)

    utils.monkey_patch()
    launcher = service.process_launcher()
    # manila-api
    try:
        server = service.WSGIService('osapi_share')
        launcher.launch_service(server, workers=server.workers or 1)
    except (Exception, SystemExit):
        LOG.exception(_LE('Failed to load osapi_share'))

    for binary in [
            'manila-share', 'manila-scheduler', 'manila-api', 'manila-data'
    ]:
        try:
            launcher.launch_service(service.Service.create(binary=binary))
        except (Exception, SystemExit):
            LOG.exception(_LE('Failed to load %s'), binary)
    launcher.wait()
コード例 #2
0
ファイル: all.py プロジェクト: ISCAS-VDI/manila-base
def main():
    log.register_options(CONF)
    config.set_middleware_defaults()
    CONF(sys.argv[1:], project='manila',
         version=version.version_string())
    log.setup(CONF, "manila")
    LOG = log.getLogger('manila.all')

    msg = _('manila-all is deprecated in Newton and '
            'will be removed in Ocata.')
    versionutils.report_deprecated_feature(LOG, msg)

    utils.monkey_patch()
    launcher = service.process_launcher()
    # manila-api
    try:
        server = service.WSGIService('osapi_share')
        launcher.launch_service(server, workers=server.workers or 1)
    except (Exception, SystemExit):
        LOG.exception(_LE('Failed to load osapi_share'))

    for binary in ['manila-share', 'manila-scheduler', 'manila-api',
                   'manila-data']:
        try:
            launcher.launch_service(service.Service.create(binary=binary))
        except (Exception, SystemExit):
            LOG.exception(_LE('Failed to load %s'), binary)
    launcher.wait()
コード例 #3
0
ファイル: api.py プロジェクト: bopopescu/OpenStack-Ocata
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='manila',
         version=version.version_string())
    config.verify_share_protocols()
    log.setup(CONF, "manila")
    utils.monkey_patch()

    launcher = service.process_launcher()
    server = service.WSGIService('osapi_share')
    launcher.launch_service(server, workers=server.workers or 1)
    launcher.wait()
コード例 #4
0
ファイル: share.py プロジェクト: scottwedge/manila-base
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='manila', version=version.version_string())
    log.setup(CONF, "manila")
    utils.monkey_patch()
    launcher = service.process_launcher()
    if CONF.enabled_share_backends:
        for backend in CONF.enabled_share_backends:
            host = "%s@%s" % (CONF.host, backend)
            server = service.Service.create(host=host,
                                            service_name=backend,
                                            binary='manila-share')
            launcher.launch_service(server)
    else:
        server = service.Service.create(binary='manila-share')
        launcher.launch_service(server)
    launcher.wait()
コード例 #5
0
ファイル: share.py プロジェクト: ISCAS-VDI/manila-base
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='manila',
         version=version.version_string())
    log.setup(CONF, "manila")
    utils.monkey_patch()
    launcher = service.process_launcher()
    if CONF.enabled_share_backends:
        for backend in CONF.enabled_share_backends:
            host = "%s@%s" % (CONF.host, backend)
            server = service.Service.create(host=host,
                                            service_name=backend,
                                            binary='manila-share')
            launcher.launch_service(server)
    else:
        server = service.Service.create(binary='manila-share')
        launcher.launch_service(server)
    launcher.wait()
コード例 #6
0
ファイル: all.py プロジェクト: suhaibchishti/sample_scripts
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='manila', version=version.version_string())
    log.setup(CONF, "manila")
    LOG = log.getLogger('manila.all')

    utils.monkey_patch()
    launcher = service.process_launcher()
    # manila-api
    try:
        server = service.WSGIService('osapi_share')
        launcher.launch_service(server, workers=server.workers or 1)
    except (Exception, SystemExit):
        LOG.exception(_LE('Failed to load osapi_share'))

    for binary in ['manila-share', 'manila-scheduler', 'manila-api']:
        try:
            launcher.launch_service(service.Service.create(binary=binary))
        except (Exception, SystemExit):
            LOG.exception(_LE('Failed to load %s'), binary)
    launcher.wait()
コード例 #7
0
ファイル: all.py プロジェクト: bennettbuchanan/manila
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='manila',
         version=version.version_string())
    log.setup(CONF, "manila")
    LOG = log.getLogger('manila.all')

    utils.monkey_patch()
    launcher = service.process_launcher()
    # manila-api
    try:
        server = service.WSGIService('osapi_share')
        launcher.launch_service(server, workers=server.workers or 1)
    except (Exception, SystemExit):
        LOG.exception(_LE('Failed to load osapi_share'))

    for binary in ['manila-share', 'manila-scheduler', 'manila-api']:
        try:
            launcher.launch_service(service.Service.create(binary=binary))
        except (Exception, SystemExit):
            LOG.exception(_LE('Failed to load %s'), binary)
    launcher.wait()