예제 #1
0
def setUpModule():
    """Create database and tables."""
    global compmgr, userscomp, liccomp, attcomp, syscomp, projcomp, wikicomp, \
           tckcomp, revcomp, xicomp, cachemgr

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)

    info = "   Creating models (module-level) ... "
    log.info(info)
    print info
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    compmgr = config['compmgr']
    userscomp = config['userscomp']
    liccomp = LicenseComponent(compmgr)
    syscomp = SystemComponent(compmgr)
    attcomp = AttachComponent(compmgr)
    projcomp = ProjectComponent(compmgr)
    wikicomp = WikiComponent(compmgr)
    tckcomp = TicketComponent(compmgr)
    revcomp = ReviewComponent(compmgr)
    xicomp = XInterfaceComponent(compmgr)

    # Populate DataBase with sample entries
    print "   Populating permissions ..."
    pop_permissions(seed=seed)
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user(no_of_users, no_of_relations, seed=seed)
    print "   Populating licenses ( no_of_tags=%s, no_of_attachs=%s ) ..." % \
                ( no_of_tags, no_of_attachs )
    pop_licenses(no_of_tags, no_of_attachs, seed=seed)
    print "   Populating projects ( no_of_projects=%s ) ..." % no_of_projects
    pop_projects(no_of_projects, no_of_tags, no_of_attachs, seed=seed)
    print "   Populating tickets ( no_of_tickets=%s ) ..." % no_of_tickets
    pop_tickets(no_of_tickets, no_of_tags, no_of_attachs, seed=seed)
    print "   Populating vcs ( no_of_vcs=%s ) ..." % no_of_vcs
    pop_vcs(no_of_vcs=no_of_vcs, seed=seed)
    print "   Populating wikis ( no_of_wikis=%s ) ..." % no_of_wikis
    pop_wikipages(no_of_tags, no_of_attachs, seed=seed)
    print "   Populating reviews ( no_of_reviews=%s ) ..." % no_of_reviews
    pop_reviews(no_of_reviews, no_of_tags, no_of_attachs, seed=seed)
    print ( "   no_of_users=%s, no_of_relations=%s, no_of_tags=%s, " + \
            "no_of_attach=%s, no_of_projects=%s, no_of_reviews=%s" ) % \
          ( no_of_users, no_of_relations, no_of_tags, no_of_attachs,
            no_of_projects, no_of_reviews )

    # Setup cache manager
    isdir(cachedir) or os.makedirs(cachedir)
    cachemgr = cachemod.cachemanager(cachedir)
    config['cachemgr'] = cachemgr
예제 #2
0
def setUpModule():
    global compmgr, userscomp, projcomp, tagcomp, seed, cachemgr

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)

    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)

    compmgr = config['compmgr']
    userscomp = config['userscomp']
    projcomp = ProjectComponent(compmgr)
    tagcomp = TagComponent(compmgr)

    # Setup cache manager
    isdir(cachedir) or os.makedirs(cachedir)
    cachemgr = cachemod.cachemanager(cachedir)
    config['cachemgr'] = cachemgr
예제 #3
0
def setUpModule():
    """Create database and tables."""
    global compmgr, userscomp, seed, cachemgr

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)
    info = "   Creating models (module-level) ... "
    log.info(info)
    print info
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    userscomp = config['userscomp']
    compmgr = config['compmgr']
    print "   Populating permissions ..."
    pop_permissions(seed=seed)

    # Setup cache manager
    isdir(cachedir) or os.makedirs(cachedir)
    cachemgr = cachemod.cachemanager(cachedir)
    config['cachemgr'] = cachemgr
예제 #4
0
def setUpModule():
    """Create database and tables."""
    global compmgr, userscomp, syscomp, wikicomp, seed, ref_swikis, cachemgr

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)

    info = "   Creating models (module-level) ... "
    log.info(info)
    print info
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    compmgr = config['compmgr']
    userscomp = config['userscomp']
    syscomp = SystemComponent(compmgr)
    wikicomp = WikiComponent(compmgr)
    # Populate DataBase with sample entries
    print "   Populating permissions ..."
    pop_permissions(seed=seed)
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user(no_of_users, no_of_relations, seed=seed)

    ref_swikis = surf_dir(pjoin(sampledata_dir, 'wikipages'))
예제 #5
0
def setUpModule() :
    """Create database and tables."""
    global compmgr, userscomp, tagcomp, attachcomp, projcomp, wikicomp, wikidata, \
           votcomp, zwparser, seed, cachemgr

    testdir  = os.path.basename( os.path.dirname( __file__ ))
    testfile = os.path.basename( __file__ )
    seed     = config['seed'] and int(config['seed']) or genseed()
    log_mheader( log, testdir, testfile, seed )
    random.seed( seed )
    info = "   Creating models (module-level) ... "
    log.info( info )
    print info
    # Setup SQLAlchemy database engine
    engine  = engine_from_config( config, 'sqlalchemy.' )
    # init_model( engine )
    create_models( engine, config, sysentries_cfg=meta.sysentries_cfg, 
                   permissions=permissions )
    compmgr    = config['compmgr']
    userscomp  = config['userscomp']
    tagcomp    = TagComponent( compmgr )
    attachcomp = AttachComponent( compmgr )
    projcomp   = ProjectComponent( compmgr )
    wikicomp   = WikiComponent( compmgr )
    votcomp    = VoteComponent( compmgr )
    # Populate DataBase with sample entries
    print "   Populating permissions ..."
    pop_permissions( seed=seed )
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user( no_of_users, no_of_relations, seed=seed )
    print "   Populating licenses ( no_of_tags=%s, no_of_attachs=%s ) ..." % \
                ( no_of_tags, no_of_attachs )
    pop_licenses( no_of_tags, no_of_attachs, seed=seed )
    print "   Populating projects ( no_of_projects=%s ) ..." % no_of_projects
    pop_projects( no_of_projects, no_of_tags, no_of_attachs, seed=seed )
    print "   Populating tickets ( no_of_tickets=%s ) ..." % no_of_tickets
    pop_tickets( no_of_tickets, no_of_tags, no_of_attachs, seed=seed )
    print "   Populating vcs ( no_of_vcs=%s ) ..." % no_of_vcs
    pop_vcs( no_of_vcs=no_of_vcs, seed=seed )
    print "   Populating reviews ( no_of_reviews=%s ) ..." % no_of_reviews
    pop_reviews( no_of_reviews, no_of_tags, no_of_attachs, seed=seed )
    # Collect the expected database objects.
    wikidata = gen_wiki( no_of_tags, no_of_attachs, seed=seed )
    print ( "   no_of_users=%s, no_of_relations=%s, no_of_tags=%s, " + \
            "no_of_attach=%s, no_of_projects=%s, no_of_wikis=%s" )   % \
          ( no_of_users, no_of_relations, no_of_tags, no_of_attachs,
            no_of_projects, no_of_wikis )

    zwparser = ZWParser( lex_optimize=True, yacc_debug=True,
                         yacc_optimize=False )

    # Setup cache manager
    isdir( cachedir ) or os.makedirs( cachedir )
    cachemgr = cachemod.cachemanager( cachedir )
    config['cachemgr'] = cachemgr
예제 #6
0
def setUpModule() :
    """Create database and tables."""
    global taglist, fnamelist, lines, compmgr, userscomp, filenames, \
           attachcomp, liccomp, projcomp, tckcomp, revcomp, wikicomp, \
           tagcomp, seed, cachemgr
    testdir  = os.path.basename( os.path.dirname( __file__ ))
    testfile = os.path.basename( __file__ )
    seed     = config['seed'] and int(config['seed']) or genseed()
    log_mheader( log, testdir, testfile, seed )
    random.seed( seed )
    info = "   Creating models (module-level) ... "
    log.info( info )
    print info

    # Setup SQLAlchemy database engine
    engine = engine_from_config( config, 'sqlalchemy.' )
    # init_model( engine )
    create_models( engine, config, sysentries_cfg=meta.sysentries_cfg, 
                   permissions=permissions )
    # prepare data for testing
    taglist   = [ unicode(h.randomname( randint(0,LEN_TAGNAME), alphanum))
                                for i in range(randint(0,500)) ]
    fnamelist = [ h.randomname( randint(1,128) ) + choice( extnames ) 
                                for i in range(1000) ]
    lines     = [ ''.join([ choice( alphanum )
                                for i in range(80) ]) for i in range(50) ]
    compmgr   = config['compmgr']
    userscomp = config['userscomp']
    attachcomp= AttachComponent( compmgr )
    tagcomp   = TagComponent( config['compmgr'] )
    liccomp   = LicenseComponent( compmgr )
    projcomp  = ProjectComponent( compmgr )
    tckcomp   = TicketComponent( compmgr )
    revcomp   = ReviewComponent( compmgr )
    wikicomp  = WikiComponent( compmgr )

    print "   Creating `%s` directory for generating attachments ..." % tmp_dir
    not os.path.isdir( tmp_dir ) and os.makedirs( tmp_dir )
    filenames = gen_localfiles(
                    tmp_dir,
                    [ fnamelist.pop( fnamelist.index(choice(fnamelist)) )
                                    for i in range( no_of_attach ) ]
                )
    # Populate DataBase with sample entries
    print "   Populating permissions ..."
    pop_permissions( seed=seed )
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user( no_of_users, no_of_relations, seed=seed )
    print "   no_of_users=%s, no_of_relations=%s, no_of_attach=%s" % \
          (no_of_users, no_of_relations, no_of_attach)

    # Setup cache manager
    isdir( cachedir ) or os.makedirs( cachedir )
    cachemgr = cachemod.cachemanager( cachedir )
    config['cachemgr'] = cachemgr
예제 #7
0
파일: test_gviz.py 프로젝트: prataprc/zeta
def setUpModule():
    """Create database and tables."""
    global compmgr, userscomp, attachcomp, tagcomp, projcomp, tckcomp, taglist,\
           seed, cachemgr

    isdir(dotdir) or os.makedirs(dotdir)

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)
    info = "   Creating models (module-level) ... "
    log.info(info)
    print info
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    compmgr = config['compmgr']
    userscomp = config['userscomp']
    attachcomp = AttachComponent(compmgr)
    tagcomp = TagComponent(compmgr)
    liccomp = LicenseComponent(compmgr)
    projcomp = ProjectComponent(compmgr)
    tckcomp = TicketComponent(compmgr)
    taglist = [
        unicode(h.randomname(randint(1, LEN_TAGNAME), tagchars))
        for i in range(randint(1, no_of_tags))
    ]
    # Populate DataBase with sample entries
    print "   Populating permissions ..."
    pop_permissions(seed=seed)
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user(no_of_users, no_of_relations, seed=seed)
    print "   Populating licenses ( no_of_tags=%s, no_of_attachs=%s ) ..." % \
                ( no_of_tags, no_of_attachs )
    pop_licenses(no_of_tags, no_of_attachs, seed=seed)
    print "   Populating projects ( no_of_projects=%s ) ..." % no_of_projects
    pop_projects(no_of_projects, no_of_tags, no_of_attachs, seed=seed)
    print "   Populating tickets ( no_of_tickets=%s ) ..." % no_of_tickets
    pop_tickets(no_of_tickets, no_of_tags, no_of_attachs, seed=seed)
    print ( "   no_of_users=%s, no_of_relations=%s, no_of_tags=%s, " + \
            "no_of_attach=%s, no_of_projects=%s, no_of_tickets=%s" ) % \
          ( no_of_users, no_of_relations, no_of_tags, no_of_attachs,
            no_of_projects, no_of_tickets )

    # Setup cache manager
    isdir(cachedir) or os.makedirs(cachedir)
    cachemgr = cachemod.cachemanager(cachedir)
    config['cachemgr'] = cachemgr
예제 #8
0
def setup_models(config, userscomp):
    """Initialize and setup database tables"""
    # Gotcha : Workaround to load 'userscomp'.
    config['userscomp'] = userscomp

    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    init_model(engine)
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permmod.permissions)
    return config
예제 #9
0
def setUpModule():
    global compmgr, syscomp, userscomp, projcomp, permission_data, seed, cachemgr

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)
    info = "   Creating models ..."
    log.info(info)
    print info

    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    print "   Generating data ..."
    permission_data = gen_pgroups(seed=seed)
    compmgr = config['compmgr']
    userscomp = config['userscomp']
    projcomp = ProjectComponent(compmgr)
    syscomp = SystemComponent(compmgr)
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user(no_of_users, no_of_relations, seed=seed)
    print "   Populating licenses ( no_of_tags=%s, no_of_attachs=%s ) ..." % \
                ( no_of_tags, no_of_attachs )
    pop_licenses(no_of_tags, no_of_attachs, seed=seed)
    print "   Populating projects ( no_of_projects=%s ) ..." % no_of_projects
    pop_projects(no_of_projects, no_of_tags, no_of_attachs, seed=seed)

    # initialize the PMS system
    mapmod = eval_import(config['zeta.pmap.module'])
    permmod.init_pms = eval_import(config['zeta.pmap.mapfunc'])
    permmod.pms_root = permmod.init_pms(ctxt=ctxt)
    permmod.default_siteperms = mapmod.default_siteperms
    permmod.default_projperms = mapmod.default_projperms

    # Setup cache manager
    isdir(cachedir) or os.makedirs(cachedir)
    cachemgr = cachemod.cachemanager(cachedir)
    config['cachemgr'] = cachemgr
예제 #10
0
def setUpModule():
    global compmgr, vcscomp, seed, cachemgr

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)

    info = "   Creating models (module-level) ... "
    log.info(info)
    print info
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    compmgr = config['compmgr']
    userscomp = config['userscomp']
    vcscomp = VcsComponent(compmgr)
    # Populate DataBase with sample entries
    print "   Populating permissions ..."
    pop_permissions(seed=seed)
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user(no_of_users, no_of_relations, seed=seed)
    print "   Populating licenses ( no_of_tags=%s, no_of_attachs=%s ) ..." % \
                ( no_of_tags, no_of_attachs )
    pop_licenses(no_of_tags, no_of_attachs, seed=seed)
    print "   Populating projects ( no_of_projects=%s ) ..." % no_of_projects
    pop_projects(no_of_projects, no_of_tags, no_of_attachs, seed=seed)
    print "   Populating Vcs ( no_of_vcs=%s ) ..." % no_of_vcs
    pop_vcs(no_of_vcs, seed=seed)

    # Setup cache manager
    isdir(cachedir) or os.makedirs(cachedir)
    cachemgr = cachemod.cachemanager(cachedir)
    config['cachemgr'] = cachemgr
    pylons.config = config
예제 #11
0
def setUpModule() :
    global userdata, userreldata, compmgr, userscomp, seed, cachemgr

    testdir  = os.path.basename( os.path.dirname( __file__ ))
    testfile = os.path.basename( __file__ )
    seed     = config['seed'] and int(config['seed']) or genseed()
    log_mheader( log, testdir, testfile, seed )
    random.seed( seed )
    info = "   Creating models (module-level) ... "
    log.info( info )
    print info
    # Setup SQLAlchemy database engine
    engine = engine_from_config( config, 'sqlalchemy.' )
    # init_model( engine )
    create_models( engine, config, sysentries_cfg=meta.sysentries_cfg, 
                   permissions=permissions )

    compmgr     = config['compmgr']
    userscomp   = config['userscomp']
    userreltypes= userscomp.reltypes
    userdata    = gen_usercontent( no_of_users=no_of_users, seed=seed )
    userreldata = gen_userrelations( userdata.keys(),
                                     userreltypes,
                                     no_of_relations=no_of_relations,
                                     seed=seed
                                   )
    for username in userdata :
        userdata[username]['userrels'] = userreldata[username]

    # initialize the PMS system
    mapmod = eval_import( config['zeta.pmap.module'] )
    permmod.init_pms = eval_import( config['zeta.pmap.mapfunc'] )
    permmod.pms_root = permmod.init_pms( ctxt=ctxt )
    permmod.default_siteperms = mapmod.default_siteperms
    permmod.default_projperms = mapmod.default_projperms

    # Setup cache manager
    isdir( cachedir ) or os.makedirs( cachedir )
    cachemgr = cachemod.cachemanager( cachedir )
    config['cachemgr'] = cachemgr
예제 #12
0
def setUpModule():
    """Create database and tables."""
    global compmgr, userscomp, syscomp, attachcomp, seed, cachemgr

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = config['seed'] and int(config['seed']) or genseed()
    log_mheader(log, testdir, testfile, seed)
    random.seed(seed)
    info = "   Creating models (module-level) ... "
    log.info(info)
    print info
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    # init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    userscomp = config['userscomp']
    compmgr = config['compmgr']
    syscomp = SystemComponent(compmgr)
    attachcomp = AttachComponent(compmgr)
    print "   Populating permissions ..."
    pop_permissions(seed=seed)
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user(no_of_users, no_of_relations, seed=seed)

    # initialize the PMS system
    mapmod = eval_import(config['zeta.pmap.module'])
    permmod.init_pms = eval_import(config['zeta.pmap.mapfunc'])
    permmod.pms_root = permmod.init_pms(ctxt=ctxt)
    permmod.default_siteperms = mapmod.default_siteperms
    permmod.default_projperms = mapmod.default_projperms

    # Setup cache manager
    isdir(cachedir) or os.makedirs(cachedir)
    cachemgr = cachemod.cachemanager(cachedir)
    config['cachemgr'] = cachemgr
예제 #13
0
파일: sampledb.py 프로젝트: prataprc/zeta
def setUpModule():
    global seed
    seed = config['seed'] and int(config['seed']) or genseed()
    random.seed(seed)
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    #init_model( engine )
    create_models(engine,
                  config,
                  sysentries_cfg=meta.sysentries_cfg,
                  permissions=permissions)
    config['userscomp'] = meta.userscomp
    # Populate DataBase with sample entries
    try:
        print "Populating permissions ..."
        pop_permissions(seed=seed)
        print "Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
               ( no_of_users, no_of_relations )
        pop_user(no_of_users, no_of_relations, seed=seed)
        print "Populating license ..."
        pop_licenses(no_of_tags, no_of_attachs, seed=seed)
        print "Populating projects ( no_of_projects=%s ) ..." % no_of_projects
        pop_projects(no_of_projects, no_of_tags, no_of_attachs, seed=seed)
        print "Populating tickets ( no_of_tickets=%s ) ..." % no_of_tickets
        pop_tickets(no_of_tickets, no_of_tags, no_of_attachs, seed=seed)
        print "Populating vcs ( no_of_vcs=%s ) ..." % no_of_vcs
        pop_vcs(no_of_vcs=no_of_vcs, seed=seed)
        print "Populating wikis ( no_of_wikis=%s ) ..." % no_of_wikis
        pop_wikipages(no_of_tags, no_of_attachs, seed=seed)
        print "Populating reviews ( no_of_reviews=%s ) ..." % no_of_reviews
        pop_reviews(no_of_reviews, no_of_tags, no_of_attachs, seed=seed)
        # Fix due_dates
        print "Fixing milestone due_date(s) ..."
        fix_mstn_duedate(seed=seed)
        print "Fixing tickets status due_date(s) ..."
        fix_ts_duedate(seed=seed)
    except:
        print "Deleting models ... and Reraising the exception"
        delete_models(meta.engine)
        raise
예제 #14
0
def setUpModule() :
    """Create database and tables."""
    global compmgr, liccomp, userscomp, attachcomp, licdata, zwparser, seed, \
           cachemgr

    testdir  = os.path.basename( os.path.dirname( __file__ ))
    testfile = os.path.basename( __file__ )
    seed     = config['seed'] and int(config['seed']) or genseed()
    log_mheader( log, testdir, testfile, seed )
    random.seed( seed )
    info = "   Creating models (module-level) ... "
    log.info( info )
    print info
    # Setup SQLAlchemy database engine
    engine  = engine_from_config( config, 'sqlalchemy.' )
    # init_model( engine )
    create_models( engine, config, sysentries_cfg=meta.sysentries_cfg, 
                   permissions=permissions )
    compmgr    = config['compmgr']
    userscomp  = config['userscomp']
    liccomp    = LicenseComponent( compmgr )
    attachcomp = AttachComponent( compmgr )
    # Populate DataBase with sample entries
    print "   Populating permissions ..."
    pop_permissions( seed=seed )
    print "   Populating users ( no_of_users=%s, no_of_relations=%s ) ..." % \
                ( no_of_users, no_of_relations )
    pop_user( no_of_users, no_of_relations, seed=seed )
    licdata    = gen_licenses( no_of_tags=no_of_tags, no_of_attachs=no_of_attachs )
    print "   no_of_users=%s, no_of_relations=%s, no_of_tags=%s, no_of_attach=%s" % \
          ( no_of_users, no_of_relations, no_of_tags, no_of_attachs )

    zwparser = ZWParser( lex_optimize=True, yacc_debug=True, yacc_optimize=False )

    # Setup cache manager
    isdir( cachedir ) or os.makedirs( cachedir )
    cachemgr = cachemod.cachemanager( cachedir )
    config['cachemgr'] = cachemgr