示例#1
0
def nebula_mission_config():
    from oslo.config import cfg
    from nebula.core import config

    CONF = cfg.CONF
    CONF.import_group('missions', 'nebula.mission_control.options')
    config.set_defaults(args=[], prog='nebula-missions')
    config.setup_logging()

    return CONF
示例#2
0
# -*- coding: utf-8 -*-


def systeminfo(key, default="default"):
    return default


if __name__ == '__main__':
    from nebula.core import config
    config.set_defaults(args=[], prog='blah')
    print(systeminfo("system_copyright"))
    print(systeminfo("system_cht"))
示例#3
0
def get_session():
    from nebula.core import config
    config.set_defaults(args=[], prog='blah')
    engine = create_engine(cfg.CONF.database.connection)
    session_maker = sessionmaker(bind=engine)
    return session_maker()
示例#4
0
# -*- coding: utf-8 -*-
from invoke import Collection

from nebula.core import config

from . import db
from . import data
from . import test
from . import doc
from . import server
from . import i18n

config.set_defaults(args=[])
config.setup_logging()

ns = Collection()
ns.add_collection(Collection.from_module(server))
ns.add_collection(Collection.from_module(data))
ns.add_collection(Collection.from_module(db))
示例#5
0
文件: app.py 项目: shenwei0329/nebula
def _setup_opts():
    # Setup configuration
    config.set_defaults(prog='nebula-portal')
    config.setup_logging()

    CONF.portal.using_scope = True