def iterate_interfaces(interface, network):
    """
    Returns true if the interface uses the given network
    Otherwise returns false
    """
    if interface.getAttribute('type') != 'network':
        return False
    interfaceNodes = interface.childNodes
    for node in interfaceNodes:
        if node.nodeName != 'source':
            continue
        if 'network' not in list(node.attributes.keys()):
            return False
        if node.attributes['network'].nodeValue == network:
            return True
        return False
