Exemple #1
0
def generate(configuration,
             inputs_override=None,
             manager_blueprint_override=None,
             reset=False):
    """Generate a configuration."""
    conf = Configuration(configuration)
    suites_yaml = settings.load_suites_yaml()
    conf.handler_configuration = _generate_configuration(
        cmd_inputs_override=inputs_override,
        cmd_blueprint_override=manager_blueprint_override,
        conf_obj=conf,
        conf_key='handler_configurations',
        conf_name=configuration,
        conf_additional={'install_manager_blueprint_dependencies': False},
        conf_blueprint_key='manager_blueprint',
        blueprint_dir_name='manager-blueprint',
        blueprint_override_key='manager_blueprint_override',
        blueprint_override_template_key='manager_blueprint_override_templates',
        blueprint_path=conf.manager_blueprint_path,
        reset=reset,
        properties=None,
        user_yaml=suites_yaml)
    with settings.configurations:
        if os.path.exists(CURRENT_CONFIGURATION):
            os.remove(CURRENT_CONFIGURATION)
        os.symlink(configuration, CURRENT_CONFIGURATION)
Exemple #2
0
def generate(configuration,
             inputs_override=None,
             manager_blueprint_override=None,
             reset=False):
    """Generate a configuration."""
    conf = Configuration(configuration)
    suites_yaml = settings.load_suites_yaml()
    conf.handler_configuration = _generate_configuration(
        cmd_inputs_override=inputs_override,
        cmd_blueprint_override=manager_blueprint_override,
        conf_obj=conf,
        conf_key='handler_configurations',
        conf_name=configuration,
        conf_additional={'install_manager_blueprint_dependencies': False},
        conf_blueprint_key='manager_blueprint',
        blueprint_dir_name='manager-blueprint',
        blueprint_override_key='manager_blueprint_override',
        blueprint_override_template_key='manager_blueprint_override_templates',
        blueprint_path=conf.manager_blueprint_path,
        reset=reset,
        properties=None,
        user_yaml=suites_yaml)
    with settings.configurations:
        if os.path.exists(CURRENT_CONFIGURATION):
            os.remove(CURRENT_CONFIGURATION)
        os.symlink(configuration, CURRENT_CONFIGURATION)
Exemple #3
0
 def _manager_blueprint_override_templates():
     return settings.load_suites_yaml(variables=False)[
         'manager_blueprint_override_templates']
Exemple #4
0
 def _inputs_override_templates():
     return settings.load_suites_yaml(variables=False)[
         'inputs_override_templates']
Exemple #5
0
 def _configurations():
     return settings.load_suites_yaml(variables=False)[
         'handler_configurations'].keys()
Exemple #6
0
 def _manager_blueprint_override_templates():
     return settings.load_suites_yaml(
         variables=False)['manager_blueprint_override_templates']
Exemple #7
0
 def _inputs_override_templates():
     return settings.load_suites_yaml(
         variables=False)['inputs_override_templates']
Exemple #8
0
 def _configurations():
     return settings.load_suites_yaml(
         variables=False)['handler_configurations'].keys()