Fixed building base_repo_url from ip-address of fuel-server
Added parameter FUEL_SERVER_IP to base_url option value as template argument Change-Id: I712f5e2722c40f903392392f02963c8a057b756b Closes-Bug: #1523233
This commit is contained in:
parent
6534117233
commit
c66309976d
@ -3,9 +3,9 @@ ignore_errors_num: 2
|
||||
retries_num: 3
|
||||
target_dir: "/var/www/nailgun/mirrors"
|
||||
pattern_dir: "/usr/share/fuel-mirror"
|
||||
base_url: "http://{FUEL_SERVER_IP}:8080/mirrors/"
|
||||
|
||||
# uncomment if need
|
||||
# http_proxy: null
|
||||
# https_proxy: null
|
||||
# fuel_server: 10.20.0.2
|
||||
# base_url: http://10.20.0.2:8080
|
||||
|
@ -24,9 +24,6 @@ from fuel_mirror.common import accessors
|
||||
from fuel_mirror.common import utils
|
||||
|
||||
|
||||
_FUEL_DEFAULT_HTTP_PORT = 8080
|
||||
|
||||
|
||||
class Application(app.App):
|
||||
"""Main cliff application class.
|
||||
|
||||
@ -89,11 +86,8 @@ class Application(app.App):
|
||||
self.options.fuel_password,
|
||||
fuel_default["password"]
|
||||
)
|
||||
self.config.setdefault(
|
||||
"base_url", "http://{0}:{1}".format(
|
||||
fuel_server.split(":", 1)[0],
|
||||
_FUEL_DEFAULT_HTTP_PORT
|
||||
)
|
||||
self.config["base_url"] = self.config["base_url"].format(
|
||||
FUEL_SERVER_IP=fuel_server.split(":", 1)[0]
|
||||
)
|
||||
self.fuel = accessors.get_fuel_api_accessor(
|
||||
fuel_server,
|
||||
|
@ -3,4 +3,5 @@ ignore_errors_num: 2
|
||||
retries_num: 3
|
||||
http_proxy: "http://localhost"
|
||||
https_proxy: "https://localhost"
|
||||
target_dir: "/var/www/"
|
||||
target_dir: "/var/www/"
|
||||
base_url: "http://{FUEL_SERVER_IP}:8080/"
|
||||
|
Loading…
Reference in New Issue
Block a user