def hosts(hostnames, zone='net'):
    addresses = [gethostbyname(name) for name in hostnames]
    return "%s:%s" % (zone, ','.join(addresses))
Builds a host list suitable for use in a firewall rule.
dataset/ETHPy150Open ronnix/fabtools/fabtools/shorewall.py/hosts