def phase_1(site_level_configuration_file):
    # fetch repo and get default_values.yaml
    repo_processor.get_base_files(constants.BASE_REPO_URL,
                                  constants.BASE_REPO_REVISION)
    main_default_values_file = repo_processor.get_repo_file(
        constants.BASE_REPO_URL,
        "site_level_configuration_defaults.yaml",
        "site_level_defaults",
        branch=constants.BASE_REPO_REVISION)
    repo_urls = lexemes.get_repo_list(site_level_configuration_file)
    print(repo_urls)
    file_names_repository_default = [main_default_values_file]
    file_names_repository_meta = []
    for url in repo_urls:
        file_names_repository_default.append(
            repo_processor.get_repo_file(url['url'],
                                         'default-data.yaml',
                                         "defaults",
                                         branch=url['revision']))
        file_names_repository_meta.append(
            repo_processor.get_repo_file(
                url['url'],
                "meta-info.yaml",
                "meta_info",
                branch=url['revision'],
                post_func=repo_processor.augment_meta_info))
    all_includes = file_names_repository_meta + file_names_repository_default
    includes_yaml_file = yaml_augmentation.add_include_statements(
        all_includes, site_level_configuration_file)
    return includes_yaml_file, repo_urls
    def test(self):

        with open("./tests/resources/complete_config.yaml", "r") as f:
            self.assertEqual(get_repo_list(f), [
                "https://github.com/WLCG-Lightweight-Sites/wlcg_lightweight_site_ce_cream",
                "https://github.com/WLCG-Lightweight-Sites/wlcg_lightweight_site_wn_pbs"
            ])
Пример #3
0
def phase_1(site_level_configuration_file, main_default_values_file):
    # fetch repo and get default_values.yaml
    repo_urls = lexemes.get_repo_list(site_level_configuration_file)
    print(repo_urls)
    file_names_repository_default = [main_default_values_file]
    for url in repo_urls:
        file_names_repository_default.append(
            repo_processor.get_default_values(url))

    default_includes_yaml_file = yaml_augmentation.add_include_statements_for_default_files(
        file_names_repository_default, site_level_configuration_file)
    return default_includes_yaml_file, repo_urls
Пример #4
0
def phase_1(site_level_configuration_file):
    # fetch repo and get default_values.yaml
    main_default_values_file = repo_processor.get_default_values(
        "https://github.com/WLCG-Lightweight-Sites/simple_grid_site_defaults",
        "site_level_configuration_defaults.yaml")
    repo_urls = lexemes.get_repo_list(site_level_configuration_file)
    print(repo_urls)
    file_names_repository_default = [main_default_values_file]
    for url in repo_urls:
        file_names_repository_default.append(
            repo_processor.get_default_values(url, 'default-data.yaml'))

    default_includes_yaml_file = yaml_augmentation.add_include_statements_for_default_files(
        file_names_repository_default, site_level_configuration_file)
    return default_includes_yaml_file, repo_urls
Пример #5
0
def phase_1(site_level_configuration_file):
    # fetch repo and get default_values.yaml
    repo_processor.get_base_files(constants.BASE_REPO_URL)
    main_default_values_file = repo_processor.get_repo_file(
        "https://github.com/WLCG-Lightweight-Sites/simple_grid_site_defaults",
        "site_level_configuration_defaults.yaml", "defaults")
    repo_urls = lexemes.get_repo_list(site_level_configuration_file)
    print(repo_urls)
    file_names_repository_default = [main_default_values_file]
    file_names_repository_meta = []
    for url in repo_urls:
        file_names_repository_default.append(
            repo_processor.get_repo_file(url, 'default-data.yaml', "defaults"))
        file_names_repository_meta.append(
            repo_processor.get_repo_file(url, "meta-info.yaml", "meta_info",
                                         repo_processor.augment_meta_info))
    all_includes = file_names_repository_meta + file_names_repository_default
    includes_yaml_file = yaml_augmentation.add_include_statements(
        all_includes, site_level_configuration_file)
    return includes_yaml_file, repo_urls
Пример #6
0
 def test_get_repo_list(self):
     input = open('./tests/data/lexemes_test', "r")
     self.assertEqual(get_repo_list(input), [
         "https://github.com/WLCG-Lightweight-Sites/wlcg_lightweight_site_ce_cream"
     ])