Change bootstrap Ubuntu mirror updater according to the new format

Change-Id: I92cf29b21e889223c9159e431708c80a77de7f4c
Depends-on: I6792848088259fcf4ca38bc1da16341cd485d792
Closes-bug: #1521558
This commit is contained in:
Dmitry Kalashnik 2015-12-01 17:54:17 +03:00
parent ca25386326
commit 776cb78b98
2 changed files with 5 additions and 23 deletions

View File

@ -269,9 +269,11 @@ class AdminActions(BaseActions):
fuel_settings['NTP1'] = router
if MIRROR_UBUNTU:
fuel_settings['BOOTSTRAP']['MIRROR_DISTRO'] = \
replace_repos.replace_ubuntu_repo_url(
fuel_settings['BOOTSTRAP']['MIRROR_DISTRO'],
fuel_settings['BOOTSTRAP']['ubuntu_repos'] = \
replace_repos.replace_ubuntu_repos(
{
'value': fuel_settings['BOOTSTRAP']['ubuntu_repos']
},
upstream_host='archive.ubuntu.com')
logger.info("Replace default Ubuntu mirror URL for "
"bootstrap image in Fuel settings")

View File

@ -18,26 +18,6 @@ from fuelweb_test import logger
import fuelweb_test.settings as help_data
def replace_ubuntu_repo_url(repo_url, upstream_host):
repos_attr = {
"value": [
{
"name": "ubuntu-bootstrap",
"uri": repo_url,
"type": "deb",
"section": None,
"suite": None
}
]
}
repos = replace_ubuntu_repos(repos_attr, upstream_host)
new_repo_url = repos[0]['uri']
if new_repo_url != repo_url:
logger.debug("Ubuntu repository url changed from '{0}' to '{1}'"
.format(repo_url, new_repo_url))
return new_repo_url
def replace_ubuntu_repos(repos_attr, upstream_host):
# Walk thru repos_attr and replace/add extra Ubuntu mirrors
if help_data.MIRROR_UBUNTU: