From 40b21111208259cb32e35f191bad13d2ee694a9d Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Thu, 1 Dec 2016 17:31:19 +0300 Subject: [PATCH] Updated bootstrap repos after fuel-bootstrap-cli reinstall Default fuel-bootstrap-cli conf file which is provided by the package does not contain repos. We need to update repos from astute.yaml before being able to build bootstrap image. Change-Id: I30ed1c372e7b2107f810e784c1d56807d3412527 Closes-Bug: #1644411 (cherry picked from commit bd45d96f3954afa5a4368b989bf969c7e81eb5f0) --- gates_tests/helpers/utils.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/gates_tests/helpers/utils.py b/gates_tests/helpers/utils.py index 3bf389f33..ca69cf340 100644 --- a/gates_tests/helpers/utils.py +++ b/gates_tests/helpers/utils.py @@ -514,9 +514,18 @@ def check_package_version_injected_in_bootstraps( def update_bootstrap_cli_yaml(): actions = BaseActions() path = "/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml" - new_repo = {'name': 'auxiliary', 'priority': "1200", - 'section': 'main restricted', - 'suite': 'auxiliary', 'type': 'deb', - 'uri': 'http://127.0.0.1:8080/ubuntu/auxiliary/'} + astute_yaml_path = "/etc/fuel/astute.yaml" + + with YamlEditor(astute_yaml_path, ip=actions.admin_ip) as editor: + repos = editor.content["BOOTSTRAP"]["repos"] + + repos.append({ + 'name': 'auxiliary', + 'priority': "1200", + 'section': 'main restricted', + 'suite': 'auxiliary', + 'type': 'deb', + 'uri': 'http://127.0.0.1:8080/ubuntu/auxiliary/'}) + with YamlEditor(path, ip=actions.admin_ip) as editor: - editor.content['repos'].append(new_repo) + editor.content['repos'] = repos