Merge "Change bootstrap Ubuntu mirror updater according to the new format"

This commit is contained in:
Jenkins 2015-12-09 16:17:38 +00:00 committed by Gerrit Code Review
commit 920ecaf9b9
2 changed files with 5 additions and 23 deletions

View File

@ -270,9 +270,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: