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()
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()
def prepare_service(argv=[]): rpc.set_defaults(control_exchange='sysinv') cfg.set_defaults(log.log_opts, default_log_levels=[ 'amqplib=WARN', 'qpid.messaging=INFO', 'sqlalchemy=WARN', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARN' ]) cfg.CONF(argv[1:], project='sysinv') log.setup('sysinv')
import copy import fixtures import mock import os import shutil import sys import testtools import eventlet eventlet.monkey_patch(os=False) import sysinv.helm.utils CONF = cfg.CONF _DB_CACHE = None logging.setup('sysinv') sys.modules['fm_core'] = mock.Mock() sys.modules['rpm'] = mock.Mock() class Database(fixtures.Fixture): def __init__(self, engine, db_migrate, sql_connection, sqlite_db, sqlite_clean_db): self.sql_connection = sql_connection self.sqlite_db = sqlite_db self.sqlite_clean_db = sqlite_clean_db self.engine = engine self.engine.dispose() conn = self.engine.connect()