summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-06-10 21:33:08 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-10 21:33:08 +0000
commitad81386dc5417dea8ffe85185109ce69f3379866 (patch)
tree2ba80170b9bbb467b7aee3d5927409c6ac1c5db4 /lib
parentce4770e46df1792f80d27a279d7c6cef2d9af5e0 (diff)
parent8f555df81406f548988f0c898a6408bc80ac9f0a (diff)
Merge "Defaults dns server netenv settings"
Diffstat (limited to 'lib')
-rw-r--r--lib/python/apex/common/constants.py1
-rw-r--r--lib/python/apex/network_settings.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/python/apex/common/constants.py b/lib/python/apex/common/constants.py
index 506b7b2b..8ed49ff7 100644
--- a/lib/python/apex/common/constants.py
+++ b/lib/python/apex/common/constants.py
@@ -14,3 +14,4 @@ STORAGE_NETWORK = 'storage_network'
API_NETWORK = 'api_network'
OPNFV_NETWORK_TYPES = [ADMIN_NETWORK, PRIVATE_NETWORK, PUBLIC_NETWORK,
STORAGE_NETWORK, API_NETWORK]
+DNS_SERVERS = ["8.8.8.8", "8.8.4.4"]
diff --git a/lib/python/apex/network_settings.py b/lib/python/apex/network_settings.py
index ea7f4ca9..1ddf4620 100644
--- a/lib/python/apex/network_settings.py
+++ b/lib/python/apex/network_settings.py
@@ -70,6 +70,9 @@ class NetworkSettings:
logging.info("{} is not in specified, will collapse with "
"admin_network".format(network))
+ self.settings_obj['dns_servers'] = self.settings_obj.get(
+ 'dns_servers', constants.DNS_SERVERS)
+
def _config_required_settings(self, network):
"""
Configures either CIDR or bridged_interface setting