Defaults dns server netenv settings 73/15373/2
authorTim Rozet <trozet@redhat.com>
Fri, 10 Jun 2016 13:30:54 +0000 (09:30 -0400)
committerTim Rozet <trozet@redhat.com>
Fri, 10 Jun 2016 14:16:09 +0000 (10:16 -0400)
Change-Id: I3936eae693ab8bea8de3826653aad6081ddc8d96
Signed-off-by: Tim Rozet <trozet@redhat.com>
lib/python/apex/common/constants.py
lib/python/apex/network_settings.py

index 506b7b2..8ed49ff 100644 (file)
@@ -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"]
index ea7f4ca..1ddf462 100644 (file)
@@ -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