From 28cfc2b85207721ad89317d8113e336cc4c3bc07 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 16 Jun 2016 14:54:26 -0400 Subject: Fixes setting dns server for undercloud JIRA: APEX-177 Change-Id: I6ee95a3c525fb58699fb3af795a66639f217214c Signed-off-by: Tim Rozet --- lib/python/apex/network_settings.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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) -- cgit 1.2.3-korg