def _setup_ovs_dns(nets): net_attrs = _lookup_default_route_net(nets) if not net_attrs: return if net_attrs.get('bootproto') == 'dhcp' or net_attrs.get('dhcpv6'): # TODO Support for scenario when DHCP client overwrittes our # static configuration. # That would mean to add support for custom dhclient config to place # our DNS settings over dhclient return nameservers = net_attrs.get('nameservers') if nameservers: dns.add_host_nameservers(nameservers)