summaryrefslogtreecommitdiffstats
path: root/lib/python
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-06-10 09:30:54 -0400
committerTim Rozet <trozet@redhat.com>2016-06-10 10:16:09 -0400
commit8f555df81406f548988f0c898a6408bc80ac9f0a (patch)
treeb7217a347db7cd88fa32c84d77a459300a00c1e6 /lib/python
parent5d889e95dbcab85e6d073b7b6d29e3ea5b47f87d (diff)
Defaults dns server netenv settings
Change-Id: I3936eae693ab8bea8de3826653aad6081ddc8d96 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/python')
-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