aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Barabas <peter.barabas@ericsson.com>2016-01-26 14:23:36 +0100
committerPeter Barabas <peter.barabas@ericsson.com>2016-01-26 14:23:36 +0100
commit4214600456bf87ca339805407a904d229ad29dc6 (patch)
treee1849cc4418c3aa2fd6d4561ea4b727567786a77
parent4b87e1e902e44971740ca020b164327d463d12c8 (diff)
Fix boot parameters for Fuel 8
Change-Id: I21a70728810571482ca2cc2264733dbca89058d6
-rwxr-xr-xdeploy/deploy.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/deploy/deploy.py b/deploy/deploy.py
index 7635cedba..393523bf9 100755
--- a/deploy/deploy.py
+++ b/deploy/deploy.py
@@ -161,10 +161,24 @@ class AutoDeploy(object):
with io.open(file) as f:
data = f.read()
for key, val in self.fuel_conf.iteritems():
+ # skip replacing these keys, as the format is custom
+ if key in ['ip', 'gw', 'netmask', 'hostname']:
+ continue
+
pattern = r'%s=[^ ]\S+' % key
replace = '%s=%s' % (key, val)
data = re.sub(pattern, replace, data)
+ # process networking parameters
+ ip = ':'.join([self.fuel_conf['ip'],
+ '',
+ self.fuel_conf['gw'],
+ self.fuel_conf['netmask'],
+ self.fuel_conf['hostname'],
+ 'eth0:off:::'])
+
+ data = re.sub(r'ip=[^ ]\S+', 'ip=%s' % ip, data)
+
netmask = self.fuel_conf['netmask']
data = self.append_kernel_param(data, 'netmask=%s' % netmask)