From 8f555df81406f548988f0c898a6408bc80ac9f0a Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Fri, 10 Jun 2016 09:30:54 -0400 Subject: Defaults dns server netenv settings Change-Id: I3936eae693ab8bea8de3826653aad6081ddc8d96 Signed-off-by: Tim Rozet --- lib/python/apex/common/constants.py | 1 + lib/python/apex/network_settings.py | 3 +++ 2 files changed, 4 insertions(+) (limited to 'lib/python') 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 -- cgit 1.2.3-korg