def is_valid_netmask(name, ip_addr, **kwargs):
    if isinstance(ip_addr, list):
        return all([
            is_valid_netmask(name, item, **kwargs) for item in ip_addr
        ])
    if not is_valid_ip(ip_addr):
        return False
    ip = netaddr.IPAddress(ip_addr)
    if ip.is_netmask():
        return True
    logging.debug('%s invalid netmask %s', name, ip_addr)
    return False
Handle a single HTTP GET request.
dataset/ETHPy150Open openstack/compass-core/compass/db/validator.py/is_valid_netmask--crossover with--dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/xmlrpc/server.py/CGIXMLRPCRequestHandler.handle_get