aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/common.py2
-rwxr-xr-xdeploy/deploy.py14
2 files changed, 15 insertions, 1 deletions
diff --git a/deploy/common.py b/deploy/common.py
index 4b0561cd4..cc418b59b 100644
--- a/deploy/common.py
+++ b/deploy/common.py
@@ -19,7 +19,7 @@ import errno
N = {'id': 0, 'status': 1, 'name': 2, 'cluster': 3, 'ip': 4, 'mac': 5,
'roles': 6, 'pending_roles': 7, 'online': 8, 'group_id': 9}
-E = {'id': 0, 'status': 1, 'name': 2, 'release_id': 3, 'pending_release_id': 5}
+E = {'id': 0, 'status': 1, 'name': 2, 'release_id': 3, 'pending_release_id': 4}
R = {'id': 0, 'name': 1, 'state': 2, 'operating_system': 3, 'version': 4}
RO = {'name': 0, 'conflicts': 1}
CWD = os.getcwd()
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)