Exemplo n.º 1
0
def main():
    config.parse_args(sys.argv)
    logging.setup("rack")
    utils.monkey_patch()

    server = service.Service.create(binary="rack-resourceoperator", topic=CONF.resourceoperator_topic)
    service.serve(server)
    service.wait()
Exemplo n.º 2
0
def main():
    config.parse_args(sys.argv)
    logging.setup("rack")
    utils.monkey_patch()

    launcher = service.process_launcher()
    server = service.WSGIService('rackapi')
    launcher.launch_service(server, workers=server.workers or 1)
    launcher.wait()
Exemplo n.º 3
0
def main():
    config.parse_args(sys.argv)
    logging.setup("rack")
    utils.monkey_patch()

    launcher = service.process_launcher()
    server = service.WSGIService('rackapi')
    launcher.launch_service(server, workers=server.workers or 1)
    launcher.wait()
Exemplo n.º 4
0
Arquivo: test.py Projeto: yanyuge/rack
test_opts = [
    cfg.StrOpt('sqlite_clean_db',
               default='clean.sqlite',
               help='File name of clean sqlite db'),
]

CONF = cfg.CONF
CONF.register_opts(test_opts)
CONF.import_opt('connection',
                'rack.openstack.common.db.options',
                group='database')
CONF.import_opt('sqlite_db', 'rack.openstack.common.db.options',
                group='database')
CONF.set_override('use_stderr', False)

oslo_logging.setup('rack')

_DB_CACHE = None
_TRUE_VALUES = ('True', 'true', '1', 'yes')


class Database(fixtures.Fixture):

    def __init__(self, db_session, 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 = db_session.get_engine()
        self.engine.dispose()
Exemplo n.º 5
0
test_opts = [
    cfg.StrOpt('sqlite_clean_db',
               default='clean.sqlite',
               help='File name of clean sqlite db'),
]

CONF = cfg.CONF
CONF.register_opts(test_opts)
CONF.import_opt('connection',
                'rack.openstack.common.db.options',
                group='database')
CONF.import_opt('sqlite_db', 'rack.openstack.common.db.options',
                group='database')
CONF.set_override('use_stderr', False)

oslo_logging.setup('rack')

_DB_CACHE = None
_TRUE_VALUES = ('True', 'true', '1', 'yes')


class Database(fixtures.Fixture):

    def __init__(self, db_session, 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 = db_session.get_engine()
        self.engine.dispose()