Change-Id: Ia393e49e8c5881af26665d861240639775d781bc
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2842
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
... | ... |
@@ -9,7 +9,8 @@ def execute(name, ks_config, config, root): |
9 | 9 |
|
10 | 10 |
if ks_config: |
11 | 11 |
if "hostname" in ks_config: |
12 |
- config['hostname'] = ks_config["hostname"].strip(" ") |
|
12 |
+ evalhostname = os.popen('printf ' + ks_config["hostname"].strip(" ")).readlines() |
|
13 |
+ config['hostname'] = evalhostname[0] |
|
13 | 14 |
if "hostname" not in config or config['hostname'] == "": |
14 | 15 |
random_id = '%12x' % random.randrange(16**12) |
15 | 16 |
config['hostname'] = "photon-" + random_id.strip() |