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
|
retries_num: 3
|
||||||
target_dir: "/var/www/nailgun/mirrors"
|
target_dir: "/var/www/nailgun/mirrors"
|
||||||
pattern_dir: "/usr/share/fuel-mirror"
|
pattern_dir: "/usr/share/fuel-mirror"
|
||||||
|
base_url: "http://{FUEL_SERVER_IP}:8080/mirrors/"
|
||||||
|
|
||||||
# uncomment if need
|
# uncomment if need
|
||||||
# http_proxy: null
|
# http_proxy: null
|
||||||
# https_proxy: null
|
# https_proxy: null
|
||||||
# fuel_server: 10.20.0.2
|
# 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
|
from fuel_mirror.common import utils
|
||||||
|
|
||||||
|
|
||||||
_FUEL_DEFAULT_HTTP_PORT = 8080
|
|
||||||
|
|
||||||
|
|
||||||
class Application(app.App):
|
class Application(app.App):
|
||||||
"""Main cliff application class.
|
"""Main cliff application class.
|
||||||
|
|
||||||
@ -89,11 +86,8 @@ class Application(app.App):
|
|||||||
self.options.fuel_password,
|
self.options.fuel_password,
|
||||||
fuel_default["password"]
|
fuel_default["password"]
|
||||||
)
|
)
|
||||||
self.config.setdefault(
|
self.config["base_url"] = self.config["base_url"].format(
|
||||||
"base_url", "http://{0}:{1}".format(
|
FUEL_SERVER_IP=fuel_server.split(":", 1)[0]
|
||||||
fuel_server.split(":", 1)[0],
|
|
||||||
_FUEL_DEFAULT_HTTP_PORT
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
self.fuel = accessors.get_fuel_api_accessor(
|
self.fuel = accessors.get_fuel_api_accessor(
|
||||||
fuel_server,
|
fuel_server,
|
||||||
|
@ -3,4 +3,5 @@ ignore_errors_num: 2
|
|||||||
retries_num: 3
|
retries_num: 3
|
||||||
http_proxy: "http://localhost"
|
http_proxy: "http://localhost"
|
||||||
https_proxy: "https://localhost"
|
https_proxy: "https://localhost"
|
||||||
target_dir: "/var/www/"
|
target_dir: "/var/www/"
|
||||||
|
base_url: "http://{FUEL_SERVER_IP}:8080/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user