Node/Dns
The DNS resolvers of each interface of the host
Drop the DNS resolvers osapi set on an interface
Removes the interface's netplan file and applies what is left. An interface osapi set nothing on does not change.
Get the DNS resolvers of an interface
Reads the servers and the search domains of the interface: resolvectl on Linux, with resolv.conf on a host that has no resolvers per interface, such as a container, and scutil on macOS.
Set the DNS resolvers of an interface
Writes a netplan file of the interface's own, such as /etc/netplan/osapi-dns-eth0.yaml for eth0, under the netplan definition that matches the interface, and applies it. A definition that matches several interfaces, such as cloud-init's all for en*, gives each of them the resolvers. An empty list keeps the interface's servers or domains, and an interface with no resolvers yet starts from none. override_dhcp drops the servers DHCP gives. It runs on the Debian family, and elsewhere, and in a container, reports skipped.