Beispiel #1
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")

    wsgi_server = xvp_proxy.get_wsgi_server()
    service.serve(wsgi_server)
    service.wait()
Beispiel #2
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = s3server.get_wsgi_server()
    service.serve(server)
    service.wait()
Beispiel #3
0
def main():
    """Parse environment and arguments and call the appropriate action."""
    config.parse_args(sys.argv,
                      default_config_files=jsonutils.loads(
                          os.environ['CONFIG_FILE']))

    logging.setup("nova")
    global LOG
    LOG = logging.getLogger('nova.dhcpbridge')
    objects.register_all()

    if not CONF.conductor.use_local:
        block_db_access()
        objects_base.NovaObject.indirection_api = \
            conductor_rpcapi.ConductorAPI()

    if CONF.action.name in ['add', 'del', 'old']:
        msg = (_("Called '%(action)s' for mac '%(mac)s' with ip '%(ip)s'") % {
            "action": CONF.action.name,
            "mac": CONF.action.mac,
            "ip": CONF.action.ip
        })
        LOG.debug(msg)
        CONF.action.func(CONF.action.mac, CONF.action.ip)
    else:
        try:
            network_id = int(os.environ.get('NETWORK_ID'))
        except TypeError:
            LOG.error(_("Environment variable 'NETWORK_ID' must be set."))
            return (1)

        print(init_leases(network_id))

    rpc.cleanup()
def main():
    config.parse_args(sys.argv,['novadbtest.conf'])
    logging.setup("novadbtest")

    procs = parepare_process()

    # start subprocess
    length = len(procs)
    for i in range(length):
        if  i *100.0 % length == 0:
            sys.stdout.write(" %d%% subprocess have been started\r" % (i * 100.0 / length))
            sys.stdout.flush()
        procs[i].start()
    print 'All %d subprocesses have been started' % length
    dummy = DummyService()
    dummy.start()
    signal.signal(signal.SIGTERM, _handle_signal)
    signal.signal(signal.SIGINT, _handle_signal)
    try:
        status = None
        dummy.wait()
    except SignalExit as exc:
        signame = {signal.SIGTERM: 'SIGTERM',
                   signal.SIGINT: 'SIGINT'}[exc.signo]
        LOG.info('Caught %s, exiting', signame)
        status = exc.code
        for p in procs:
            p.terminate()
    except SystemExit as exc:
        status = exc.code
    finally:
        if rpc:
            rpc.cleanup()
        dummy.stop()
    return status
Beispiel #5
0
def proxy(host, port):
    # Setup flags
    config.parse_args(sys.argv)

    if CONF.ssl_only and not os.path.exists(CONF.cert):
        exit_with_error("SSL only and %s not found" % CONF.cert)

    # Check to see if tty html/js/css files are present
    if CONF.web and not os.path.exists(CONF.web):
        exit_with_error("Can not find html/js files at %s." % CONF.web)

    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    # Create and start the NovaWebSockets proxy
    websocketproxy.NovaWebSocketProxy(listen_host=host,
                                      listen_port=port,
                                      source_is_ipv6=CONF.source_is_ipv6,
                                      verbose=CONF.verbose,
                                      cert=CONF.cert,
                                      key=CONF.key,
                                      ssl_only=CONF.ssl_only,
                                      daemon=CONF.daemon,
                                      record=CONF.record,
                                      traffic=CONF.verbose and not CONF.daemon,
                                      web=CONF.web,
                                      file_only=True,
                                      RequestHandlerClass=websocketproxy.
                                      NovaProxyRequestHandler).start_server()
Beispiel #6
0
def main():
    # Setup flags
    config.parse_args(sys.argv)

    if CONF.ssl_only and not os.path.exists(CONF.cert):
        exit_with_error("SSL only and %s not found" % CONF.cert)

    logging.setup("nova")
    gmr.TextGuruMeditation.setup_autorun(version)

    # Create and start the NovaWebSockets proxy
    server = websocketproxy.NovaWebSocketProxy(
        listen_host=CONF.serial_console.serialproxy_host,
        listen_port=CONF.serial_console.serialproxy_port,
        source_is_ipv6=CONF.source_is_ipv6,
        verbose=CONF.verbose,
        cert=CONF.cert,
        key=CONF.key,
        ssl_only=CONF.ssl_only,
        daemon=CONF.daemon,
        record=CONF.record,
        traffic=CONF.verbose and not CONF.daemon,
        file_only=True,
        RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
    server.start_server()
Beispiel #7
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.Service.create(binary='nova-cert', topic=CONF.cert_topic)
    service.serve(server)
    service.wait()
Beispiel #8
0
def main():
    """Parse environment and arguments and call the appropriate action."""
    try:
        config_file = os.environ['CONFIG_FILE']
    except KeyError:
        config_file = os.environ['FLAGFILE']

    config.parse_args(sys.argv,
                      default_config_files=jsonutils.loads(config_file))

    logging.setup("nova")
    global LOG
    LOG = logging.getLogger('nova.dhcpbridge')

    if CONF.action.name in ['add', 'del', 'old']:
        msg = (_("Called '%(action)s' for mac '%(mac)s' with ip '%(ip)s'") % {
            "action": CONF.action.name,
            "mac": CONF.action.mac,
            "ip": CONF.action.ip
        })
        LOG.debug(msg)
        CONF.action.func(CONF.action.mac, CONF.action.ip)
    else:
        try:
            network_id = int(os.environ.get('NETWORK_ID'))
        except TypeError:
            LOG.error(_("Environment variable 'NETWORK_ID' must be set."))
            return (1)

        print init_leases(network_id)

    rpc.cleanup()
Beispiel #9
0
def run():

    # This is a fix to allow the --hide-elapsed flag while accepting
    # arbitrary nosetest flags as well

    argv = [x for x in sys.argv if x != '--hide-elapsed']
    hide_elapsed = argv != sys.argv
    logging.setup("healthnmon")

    # If any argument looks like a test name but doesn't have "nova.tests" in
    # front of it, automatically add that so we don't have to type as much

    for (i, arg) in enumerate(argv):
        if arg.startswith('test_'):
            argv[i] = 'healthnmon.tests.%s' % arg

    # testdir = os.path.abspath(os.path.join("healthnmon", "tests"))

    testdir = os.path.abspath('healthnmon')
    c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3,
                      workingDir=testdir,
                      plugins=core.DefaultPluginManager())

    runner = HealthnmonTestRunner(stream=c.stream,
                                  verbosity=c.verbosity, config=c,
                                  show_elapsed=not hide_elapsed)
    sys.exit(not core.run(config=c, testRunner=runner, argv=argv))
Beispiel #10
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.Service.create(binary='nova-cert', topic=CONF.cert_topic)
    service.serve(server)
    service.wait()
Beispiel #11
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.WSGIService("ec2", max_url_len=16384)
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #12
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")

    wsgi_server = xvp_proxy.get_wsgi_server()
    service.serve(wsgi_server)
    service.wait()
Beispiel #13
0
def proxy(host, port):
    # Setup flags
    config.parse_args(sys.argv)

    if CONF.ssl_only and not os.path.exists(CONF.cert):
        exit_with_error("SSL only and %s not found" % CONF.cert)

    # Check to see if tty html/js/css files are present
    if CONF.web and not os.path.exists(CONF.web):
        exit_with_error("Can not find html/js files at %s." % CONF.web)

    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    # Create and start the NovaWebSockets proxy
    websocketproxy.NovaWebSocketProxy(
        listen_host=host,
        listen_port=port,
        source_is_ipv6=CONF.source_is_ipv6,
        verbose=CONF.verbose,
        cert=CONF.cert,
        key=CONF.key,
        ssl_only=CONF.ssl_only,
        daemon=CONF.daemon,
        record=CONF.record,
        traffic=CONF.verbose and not CONF.daemon,
        web=CONF.web,
        file_only=True,
        RequestHandlerClass=websocketproxy.NovaProxyRequestHandler
    ).start_server()
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    LOG = logging.getLogger('nova.virt.baremetal.deploy_helper')
    app = BareMetalDeploy()
    srv = simple_server.make_server('', 10000, app)
    srv.serve_forever()
Beispiel #15
0
def main():
    # Setup flags
    CONF.set_default('web', '/usr/share/novnc')
    config.parse_args(sys.argv)
    logging.setup("nova")

    if CONF.ssl_only and not os.path.exists(CONF.cert):
        print("SSL only and %s not found" % CONF.cert)
        return(-1)

    # Check to see if novnc html/js/css files are present
    if not os.path.exists(CONF.web):
        print("Can not find novnc html/js/css files at %s." % CONF.web)
        return(-1)

    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    # Create and start the NovaWebSockets proxy
    server = websocketproxy.NovaWebSocketProxy(
                listen_host=CONF.novncproxy_host,
                listen_port=CONF.novncproxy_port,
                source_is_ipv6=CONF.source_is_ipv6,
                verbose=CONF.verbose,
                cert=CONF.cert,
                key=CONF.key,
                ssl_only=CONF.ssl_only,
                daemon=CONF.daemon,
                record=CONF.record,
                traffic=CONF.verbose and not CONF.daemon,
                web=CONF.web,
                file_only=True,
                RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
    server.start_server()
Beispiel #16
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.WSGIService('ec2', max_url_len=16384)
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #17
0
def main():
    """Parse options and call the appropriate class/method."""
    CONF.register_cli_opt(category_opt)
    try:
        config.parse_args(sys.argv)
        logging.setup("nova")
    except cfg.ConfigFilesNotFoundError:
        cfgfile = CONF.config_file[-1] if CONF.config_file else None
        if cfgfile and not os.access(cfgfile, os.R_OK):
            st = os.stat(cfgfile)
            print(_("Could not read %s. Re-running with sudo") % cfgfile)
            try:
                os.execvp('sudo', ['sudo', '-u', '#%s' % st.st_uid] + sys.argv)
            except Exception:
                print(_('sudo failed, continuing as if nothing happened'))

        print(_('Please re-run nova-manage as root.'))
        return(2)

    objects.register_all()

    if CONF.category.name == "version":
        print(version.version_string_with_package())
        return(0)

    if CONF.category.name == "bash-completion":
        if not CONF.category.query_category:
            print(" ".join(CATEGORIES.keys()))
        elif CONF.category.query_category in CATEGORIES:
            fn = CATEGORIES[CONF.category.query_category]
            command_object = fn()
            actions = methods_of(command_object)
            print(" ".join([k for (k, v) in actions]))
        return(0)

    fn = CONF.category.action_fn
    fn_args = [arg.decode('utf-8') for arg in CONF.category.action_args]
    fn_kwargs = {}
    for k in CONF.category.action_kwargs:
        v = getattr(CONF.category, 'action_kwarg_' + k)
        if v is None:
            continue
        if isinstance(v, six.string_types):
            v = v.decode('utf-8')
        fn_kwargs[k] = v

    # call the action with the remaining arguments
    # check arguments
    try:
        cliutils.validate_args(fn, *fn_args, **fn_kwargs)
    except cliutils.MissingArgs as e:
        print(fn.__doc__)
        print(e)
        return(1)
    try:
        fn(*fn_args, **fn_kwargs)
        return(0)
    except Exception:
        print(_("Command failed, please check log for more info"))
        raise
Beispiel #18
0
def main():
    CONF(sys.argv[1:], project='oslo')
    logging.setup("oslo")

    with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor:
        reactor.consume_in_thread()
        reactor.wait()
Beispiel #19
0
def main():
    """Parse environment and arguments and call the appropriate action."""
    config.parse_args(sys.argv,
        default_config_files=jsonutils.loads(os.environ['CONFIG_FILE']))

    logging.setup("nova")
    global LOG
    LOG = logging.getLogger('nova.dhcpbridge')
    objects.register_all()

    if not CONF.conductor.use_local:
        block_db_access()
        objects_base.NovaObject.indirection_api = \
            conductor_rpcapi.ConductorAPI()

    if CONF.action.name in ['add', 'del', 'old']:
        msg = (_("Called '%(action)s' for mac '%(mac)s' with ip '%(ip)s'") %
               {"action": CONF.action.name,
                "mac": CONF.action.mac,
                "ip": CONF.action.ip})
        LOG.debug(msg)
        CONF.action.func(CONF.action.mac, CONF.action.ip)
    else:
        try:
            network_id = int(os.environ.get('NETWORK_ID'))
        except TypeError:
            LOG.error(_("Environment variable 'NETWORK_ID' must be set."))
            return(1)

        print(init_leases(network_id))

    rpc.cleanup()
Beispiel #20
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.WSGIService('osapi_compute')
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #21
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    server = service.Service.create(binary='nova-consoleauth',
                                    topic=CONF.consoleauth_topic)
    service.serve(server)
    service.wait()
Beispiel #22
0
def main():
    # Setup flags
    config.parse_args(sys.argv)

    if CONF.ssl_only and not os.path.exists(CONF.cert):
        exit_with_error("SSL only and %s not found" % CONF.cert)

    logging.setup("nova")
    gmr.TextGuruMeditation.setup_autorun(version)

    # Create and start the NovaWebSockets proxy
    server = websocketproxy.NovaWebSocketProxy(
        listen_host=CONF.serial_console.serialproxy_host,
        listen_port=CONF.serial_console.serialproxy_port,
        source_is_ipv6=CONF.source_is_ipv6,
        verbose=CONF.verbose,
        cert=CONF.cert,
        key=CONF.key,
        ssl_only=CONF.ssl_only,
        daemon=CONF.daemon,
        record=CONF.record,
        traffic=CONF.verbose and not CONF.daemon,
        file_only=True,
        RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
    server.start_server()
Beispiel #23
0
def main():
    """加载和设置配置参数,有两点需要注意:
    1. 调用rpc.set_defaults设置默认的exchange为nova,如果不设置则为
    openstack
    2. 调用rpc.init设置Transport和Notifier,Transport是
    oslo_messaging/transport.py/Transport实例,我采用的是默认的
    rpc_backend=rabbit,所以Transport采用的driver=oslo_messaging/
    _drivers/impl_rabbit.py/RabbitDriver;Notifier是一个通知消息发
    送器,它借助Transport完成通知消息的发送
    """
    config.parse_args(sys.argv)
    logging.setup('nova')
    utils.monkey_patch()
    objects.register_all()

    gmr.TextGuruMeditation.setup_autorun(version)

    if not CONF.conductor.use_local:
        block_db_access()
        objects_base.NovaObject.indirection_api = \
            conductor_rpcapi.ConductorAPI()
    """调用类方法nova/service.py/Service.create创建Service服务对象
    输入参数topic = compute, db_allowd = false;`create`方法是一个
    类方法(@classmethod),它首先基于输入参数和(/etc/nova.conf中的选
    项)设置配置,然后创建一个Service对象并返回给调用者
    """
    server = service.Service.create(binary='nova-compute',
                                    topic=CONF.compute_topic,
                                    db_allowed=CONF.conductor.use_local)
    """调用server方法启动服务并调用wait方法等待服务启动完成,serve方法创
    建Launcher服务启动实例对象(这里是ServiceLauncher)来启动服务,
    但最终会调用server.start方法启动服务。
    """
    service.serve(server)
    service.wait()
Beispiel #24
0
def run():

    # This is a fix to allow the --hide-elapsed flag while accepting
    # arbitrary nosetest flags as well

    argv = [x for x in sys.argv if x != '--hide-elapsed']
    hide_elapsed = argv != sys.argv
    logging.setup("healthnmon")

    # If any argument looks like a test name but doesn't have "nova.tests" in
    # front of it, automatically add that so we don't have to type as much

    for (i, arg) in enumerate(argv):
        if arg.startswith('test_'):
            argv[i] = 'healthnmon.tests.%s' % arg

    # testdir = os.path.abspath(os.path.join("healthnmon", "tests"))

    testdir = os.path.abspath('healthnmon')
    c = config.Config(stream=sys.stdout,
                      env=os.environ,
                      verbosity=3,
                      workingDir=testdir,
                      plugins=core.DefaultPluginManager())

    runner = HealthnmonTestRunner(stream=c.stream,
                                  verbosity=c.verbosity,
                                  config=c,
                                  show_elapsed=not hide_elapsed)
    sys.exit(not core.run(config=c, testRunner=runner, argv=argv))
Beispiel #25
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.WSGIService('osapi_compute')
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #26
0
def main():
    """Parse environment and arguments and call the appropriate action."""
    try:
        config_file = os.environ['CONFIG_FILE']
    except KeyError:
        config_file = os.environ['FLAGFILE']

    config.parse_args(sys.argv,
        default_config_files=jsonutils.loads(config_file))

    logging.setup("nova")
    global LOG
    LOG = logging.getLogger('nova.dhcpbridge')

    if CONF.action.name in ['add', 'del', 'old']:
        msg = (_("Called '%(action)s' for mac '%(mac)s' with ip '%(ip)s'") %
               {"action": CONF.action.name,
                "mac": CONF.action.mac,
                "ip": CONF.action.ip})
        LOG.debug(msg)
        CONF.action.func(CONF.action.mac, CONF.action.ip)
    else:
        try:
            network_id = int(os.environ.get('NETWORK_ID'))
        except TypeError:
            LOG.error(_("Environment variable 'NETWORK_ID' must be set."))
            return(1)

        print init_leases(network_id)

    rpc.cleanup()
Beispiel #27
0
def main():
    """Parse options and call the appropriate class/method."""
    CONF.register_cli_opt(category_opt)
    try:
        config.parse_args(sys.argv)
        logging.setup("nova")
    except cfg.ConfigFilesNotFoundError:
        cfgfile = CONF.config_file[-1] if CONF.config_file else None
        if cfgfile and not os.access(cfgfile, os.R_OK):
            st = os.stat(cfgfile)
            print(_("Could not read %s. Re-running with sudo") % cfgfile)
            try:
                os.execvp("sudo", ["sudo", "-u", "#%s" % st.st_uid] + sys.argv)
            except Exception:
                print(_("sudo failed, continuing as if nothing happened"))

        print(_("Please re-run nova-manage as root."))
        return 2

    objects.register_all()

    if CONF.category.name == "version":
        print(version.version_string_with_package())
        return 0

    if CONF.category.name == "bash-completion":
        if not CONF.category.query_category:
            print(" ".join(CATEGORIES.keys()))
        elif CONF.category.query_category in CATEGORIES:
            fn = CATEGORIES[CONF.category.query_category]
            command_object = fn()
            actions = methods_of(command_object)
            print(" ".join([k for (k, v) in actions]))
        return 0

    fn = CONF.category.action_fn
    fn_args = [arg.decode("utf-8") for arg in CONF.category.action_args]
    fn_kwargs = {}
    for k in CONF.category.action_kwargs:
        v = getattr(CONF.category, "action_kwarg_" + k)
        if v is None:
            continue
        if isinstance(v, six.string_types):
            v = v.decode("utf-8")
        fn_kwargs[k] = v

    # call the action with the remaining arguments
    # check arguments
    try:
        cliutils.validate_args(fn, *fn_args, **fn_kwargs)
    except cliutils.MissingArgs as e:
        print(fn.__doc__)
        print(e)
        return 1
    try:
        fn(*fn_args, **fn_kwargs)
        return 0
    except Exception:
        print(_("Command failed, please check log for more info"))
        raise
Beispiel #28
0
def main():
    # Setup flags
    CONF.set_default('web', '/usr/share/novnc')
    config.parse_args(sys.argv)
    logging.setup("nova")

    if CONF.ssl_only and not os.path.exists(CONF.cert):
        print("SSL only and %s not found" % CONF.cert)
        return (-1)

    # Check to see if novnc html/js/css files are present
    if not os.path.exists(CONF.web):
        print("Can not find novnc html/js/css files at %s." % CONF.web)
        return (-1)

    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    # Create and start the NovaWebSockets proxy
    server = websocketproxy.NovaWebSocketProxy(
        listen_host=CONF.novncproxy_host,
        listen_port=CONF.novncproxy_port,
        source_is_ipv6=CONF.source_is_ipv6,
        verbose=CONF.verbose,
        cert=CONF.cert,
        key=CONF.key,
        ssl_only=CONF.ssl_only,
        daemon=CONF.daemon,
        record=CONF.record,
        traffic=CONF.verbose and not CONF.daemon,
        web=CONF.web,
        file_only=True,
        RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
    server.start_server()
Beispiel #29
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = s3server.get_wsgi_server()
    service.serve(server)
    service.wait()
Beispiel #30
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    server = service.Service.create(binary='nova-consoleauth',
                                    topic=CONF.consoleauth_topic)
    service.serve(server)
    service.wait()
def main():
    objects.register_all()
    config.parse_args(sys.argv)
    logging.setup("service_monitor")
    utils.monkey_patch()
    LOG = logging.getLogger('service_monitor')
    monitor = ServiceMonitor();
    monitor.monitor(True)
Beispiel #32
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    should_use_ssl = 'osapi_compute' in CONF.enabled_ssl_apis
    server = service.WSGIService('osapi_compute', use_ssl=should_use_ssl)
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #33
0
def main():
    objects.register_all()
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.Service.create(binary="nova-conductor", topic=CONF.conductor.topic, manager=CONF.conductor.manager)
    service.serve(server, workers=CONF.conductor.workers)
    service.wait()
Beispiel #34
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    should_use_ssl = 'osapi_compute' in CONF.enabled_ssl_apis
    server = service.WSGIService('osapi_compute', use_ssl=should_use_ssl)
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #35
0
def main():
    config.parse_args(sys.argv)
    logging.setup("gantt")
    utils.monkey_patch()
    server = service.Service.create(binary='gantt-sched',
                                    topic=CONF.sched_topic)
    service.serve(server)
    service.wait()
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    global LOG
    LOG = logging.getLogger('nova.virt.baremetal.deploy_helper')
    app = BareMetalDeploy()
    srv = simple_server.make_server('', 10000, app)
    srv.serve_forever()
Beispiel #37
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    global LOG
    LOG = logging.getLogger("nova.virt.baremetal.deploy_helper")
    objects.register_all()
    app = BareMetalDeploy()
    srv = simple_server.make_server("", 10000, app)
    srv.serve_forever()
Beispiel #38
0
def main():
    config.parse_args(sys.argv)
    logging.setup('nova')
    utils.monkey_patch()
    server = service.Service.create(binary='nova-cells',
                                    topic=CONF.cells.topic,
                                    manager=CONF.cells.manager)
    service.serve(server)
    service.wait()
def main():
    cfg.CONF(args=sys.argv, project='mlnx_daemon')
    logging.setup('mlnx_daemon')
    try:
        daemon = MlxEswitchDaemon()
        daemon.start()
    except Exception,e:
        LOG.error("Failed to start EswitchDaemon - Daemon terminated! %s",e)
        sys.exit(1)
Beispiel #40
0
    def __init__(self, args):
        win32serviceutil.ServiceFramework.__init__(self, args)
        config.parse_args(sys.argv)
        logging.setup('nova')
        utils.monkey_patch()

        if not CONF.conductor.use_local:
            block_db_access()
        self.isAlive = True
    def __init__(self,args):
        win32serviceutil.ServiceFramework.__init__(self,args)
        config.parse_args(sys.argv)
        logging.setup('nova')
        utils.monkey_patch()

        if not CONF.conductor.use_local:
            block_db_access()
        self.isAlive = True
Beispiel #42
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    wsgi_server = xvp_proxy.get_wsgi_server()
    service.serve(wsgi_server)
    service.wait()
Beispiel #43
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    wsgi_server = xvp_proxy.get_wsgi_server()
    service.serve(wsgi_server)
    service.wait()
Beispiel #44
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    should_use_ssl = 'ec2' in CONF.enabled_ssl_apis
    server = service.WSGIService('ec2', use_ssl=should_use_ssl,
                                 max_url_len=16384)
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #45
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()

    gmr.TextGuruMeditation.setup_autorun(version)

    server = s3server.get_wsgi_server()
    service.serve(server)
    service.wait()
Beispiel #46
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    server = service.Service.create(binary='nova-console',
                                    topic=CONF.console_topic)
    service.serve(server)
    service.wait()
Beispiel #47
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()

    gmr.TextGuruMeditation.setup_autorun(version)

    server = service.Service.create(binary='nova-cert', topic=CONF.cert_topic)
    service.serve(server)
    service.wait()
Beispiel #48
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    should_use_ssl = 'ec2' in CONF.enabled_ssl_apis
    server = service.WSGIService('ec2',
                                 use_ssl=should_use_ssl,
                                 max_url_len=16384)
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #49
0
def main():
    config.parse_args(sys.argv)
    logging.setup('nova')
    utils.monkey_patch()

    gmr.TextGuruMeditation.setup_autorun(version)

    server = service.Service.create(binary='nova-kvmha', topic=CONF.kvmha_topic)
    service.serve(server)
    service.wait()
Beispiel #50
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")

    gmr.TextGuruMeditation.setup_autorun(version)

    server = service.Service.create(binary='nova-console',
                                    topic=CONF.console_topic)
    service.serve(server)
    service.wait()
Beispiel #51
0
def main():
    objects.register_all()
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.Service.create(binary='nova-conductor',
                                    topic=CONF.conductor.topic,
                                    manager=CONF.conductor.manager)
    service.serve(server, workers=CONF.conductor.workers)
    service.wait()
Beispiel #52
0
def main():
    objects.register_all()
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    server = service.Service.create(binary='nova-sample',
                                    topic='sample',
                                    manager='nova.sample.manager.SampleManager')
    service.serve(server, workers=CONF.conductor.workers)
    service.wait()
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    objects.register_all()

    gmr.TextGuruMeditation.setup_autorun(version)

    server = service.Service.create(binary='nova-loadbalancer')
    service.serve(server)
    service.wait()
Beispiel #54
0
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()
    objects.register_all()

    gmr.TextGuruMeditation.setup_autorun(version)

    should_use_ssl = 'osapi_compute' in CONF.enabled_ssl_apis
    server = service.WSGIService('osapi_compute', use_ssl=should_use_ssl)
    service.serve(server, workers=server.workers)
    service.wait()
Beispiel #55
0
def main():
    config.parse_args(sys.argv)
    logging.setup('nova')
    utils.monkey_patch()

    if not CONF.conductor.use_local:
        block_db_access()

    server = service.Service.create(binary='nova-compute',
                                    topic=CONF.compute_topic,
                                    db_allowed=False)
    service.serve(server)
    service.wait()
Beispiel #56
0
def main():
    config.parse_args(sys.argv)
    logging.setup('nova')
    utils.monkey_patch()
    objects.register_all()

    gmr.TextGuruMeditation.setup_autorun(version)

    server = service.Service.create(binary='nova-cells',
                                    topic=CONF.cells.topic,
                                    manager=CONF.cells.manager)
    service.serve(server)
    service.wait()
def main():
    config.parse_args(sys.argv)
    logging.setup("nova")
    utils.monkey_patch()

    if not CONF.conductor.use_local:
        objects_base.NovaObject.indirection_api = \
            conductor_rpcapi.ConductorAPI()

    should_use_ssl = 'metadata' in CONF.enabled_ssl_apis
    server = service.WSGIService('metadata', use_ssl=should_use_ssl)
    service.serve(server, workers=server.workers)
    service.wait()