Get the list of network interfaces. Will return all datalinks on SmartOS.
Get the IPv4 address assigned to an interface.
Example:
import fabtools # Print all configured IP addresses for interface in fabtools.network.interfaces(): print(fabtools.network.address(interface))
Get the list of nameserver addresses.
import fabtools # Check that all name servers are reachable for ip in fabtools.network.nameservers(): run('ping -c1 %s' % ip)