Esempio n. 1
0
File: cnc.py Progetto: 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'
Esempio n. 2
0
 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