def create_scheduler(work_dir): config_filename = work_dir + "/rem.cfg" with open(config_filename, "w") as conf: produce_config(conf, work_dir, hostname='foobar') import rem.context ctx = rem.context.Context(config_filename, "start") rem_server._init_fork_locking(ctx) #import json #print json.dumps(ctx.__dict__, indent=3) with open(work_dir + '/cloud_tags.masks', 'w') as out: print >>out, '_cloud_.*' with open(work_dir + '/network_topology.cfg', 'w') as out: print >>out, '[servers]' print >>out, 'foobar = http://localhost:8884, http://localhost:8885' return rem_server.CreateScheduler(ctx)
def create_scheduler(ctx): rem_server._init_fork_locking(ctx) rem_server.init_logging(ctx) return rem_server.create_scheduler(ctx)