Esempio n. 1
0
    def setUpClass(self):
        cfg = RZ_Config.init_from_file('res/etc/rhizi-server.conf')
        self.db_ctl = dbc.DB_Controller(cfg.db_base_url)
        rz_api.db_ctl = self.db_ctl

        # TODO extract to superclass
        log = logging.getLogger('rhizi')
        log.setLevel(logging.DEBUG)
        log_handler_c = logging.StreamHandler()
        log.addHandler(log_handler_c)
Esempio n. 2
0
File: rz.py Progetto: yuvadm/rhizi
 def __init__(self, config_dir):
     cfg = init_config(config_dir)
     kernel = RZ_Kernel()
     db_ctl = dbc.DB_Controller(cfg.db_base_url)
     kernel.db_ctl = db_ctl
     user_db = Fake_User_DB()
     webapp = init_webapp(cfg, kernel)
     webapp.user_db = user_db
     kernel.db_op_factory = webapp  # assist kernel with DB initialization
     kernel.start()
     time.sleep(0.1)
     self.kernel = kernel
Esempio n. 3
0
    def setUpClass(self):
        cfg = RZ_Config.init_from_file('res/etc/rhizi-server.conf')
        self.db_ctl = db_controller.DB_Controller(cfg.db_base_url)
        self.log = logging.getLogger('rhizi')
        self.log.addHandler(logging.StreamHandler())

        # bootstrap kernel
        kernel = RZ_Kernel()
        kernel.db_ctl = self.db_ctl
        kernel.db_op_factory = DBO_factory__default()
        kernel.start()

        self.kernel = kernel

        while not self.kernel.is_DB_status__ok(
        ):  # wait for kernel to initialize...
            time.sleep(0.3)
Esempio n. 4
0
def init_test_db_controller(cfg):
    ret = dbc.DB_Controller(cfg.db_base_url)
    return ret
Esempio n. 5
0
 def setUpClass(self):
     cfg = Config.init_from_file('res/etc/rhizi-server.conf')
     self.db_ctl = dbc.DB_Controller(cfg.db_base_url)
     self.log = logging.getLogger('rhizi')
     self.log.addHandler(logging.StreamHandler())