Fix boot parameters for Fuel 8 29/8529/3
authorPeter Barabas <peter.barabas@ericsson.com>
Tue, 26 Jan 2016 13:23:36 +0000 (14:23 +0100)
committerStefan Berg <sfb@consultron.com>
Fri, 29 Jan 2016 13:35:30 +0000 (14:35 +0100)
Change-Id: I21a70728810571482ca2cc2264733dbca89058d6
(cherry picked from commit 4214600456bf87ca339805407a904d229ad29dc6)

deploy/deploy.py

index 7635ced..393523b 100755 (executable)
@@ -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)