예제 #1
0
파일: cnc.py 프로젝트: F3DS/f3ds
def process_config(config_path):
    """
    Run most or all of an experiment from a config file.
    """
    config = loadConfig(config_path)
    # TODO: add config for control operations
    section_function_map = [
        ('database', initdb),
        ('launch', launch),
        ('updates', updates),
        ('start', start),
        ('sclient', beginclient),
        ('stop', checker),
        ('retrieve', retrieve),
        ('destroy', destroy),
    ]
    for section, operation in section_function_map:
        try:
            config_section = eval('config.' + section)
            if config_section:
                operation(config)
        except:
            pass
    return config.general.run_main == 'True'
예제 #2
0
파일: test_cnc_table.py 프로젝트: F3DS/f3ds
 def setUp(self):
     'Load configuration'
     self.config = loadConfig(path.join(projectdir, 'cnc', 'experiment.example.config'))
     amis = tablev2.amis
     for k, v in amis.items():
         self.reverse_amis[v] = k