summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-06-22 08:34:42 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-22 08:34:42 +0000
commit78d76ace2d2137609ada26cc3eda1405a2294f01 (patch)
treef364fd83a36afdbd9d32104958d321f4d6ba7399 /lib
parenta1fe1a29a0e9f794395e4b31306a32cd7ec8cb44 (diff)
parent28cfc2b85207721ad89317d8113e336cc4c3bc07 (diff)
Merge "Fixes setting dns server for undercloud"
Diffstat (limited to 'lib')
-rw-r--r--lib/python/apex/network_settings.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/python/apex/network_settings.py b/lib/python/apex/network_settings.py
index 1ddf4620..9df8a1de 100644
--- a/lib/python/apex/network_settings.py
+++ b/lib/python/apex/network_settings.py
@@ -223,6 +223,11 @@ class NetworkSettings:
bash_str += "enabled_network_list='{}'\n" \
.format(' '.join(self.enabled_network_list))
bash_str += "ip_addr_family={}\n".format(self.get_ip_addr_family())
+ dns_list = ""
+ for dns_server in self.settings_obj['dns_servers']:
+ dns_list = dns_list + "{} ".format(dns_server)
+ dns_list = dns_list.strip()
+ bash_str += "dns_servers=\'{}\'\n".format(dns_list)
if path:
with open(path, 'w') as file:
file.write(bash_str)