Beispiel #1
0
def validate(config_path):
    try:
        config = Configuration.configure(config_path)
    except ConfigurationError as ce:
        logger.exception(ce)
    try:
        with open('config.schema.yaml', 'r') as f:
            schema = yaml.load(f)
    except:
        
    schema = yaml.load('')
    v = DEConfigValidator
        options.predefined_config = "hdl_unit_sim.bridge.defconfig"

if __name__ == '__main__':
    msg.ok_msg_blue("--------> WELCOME to IBM OpenCAPI Acceleration Framework")
    question_and_answer = qa.QuestionAndAnswer(options)

    question_and_answer.ask(qa.ask_clean_str)
    if options.clean:
        env_clean(ocaccel_workflow_log)

    cfg = Configuration(options)
    cfg.log = ocaccel_workflow_log
    question_and_answer.cfg = cfg
    question_and_answer.ask(qa.ask_configure_str)
    if not options.no_configure:
        cfg.configure()

    # In unit sim mode, all configurations are handled automatically, no need to update the cfg
    if not options.unit_sim:
        cfg.update_cfg()

    if not options.no_env_check:
        env_check(options)

    question_and_answer.ask(qa.ask_make_model_str)
    if not options.no_make_model and options.simulator.lower() != "nosim":
        make_model(ocaccel_workflow_make_model_log, options.make_timeout)
        # TODO: need to remove the following line if
        # 'make model` stops touching ocaccel_env.sh
        cfg.setup_ocaccel_env()