def vni_unique(yaml, vni):
    """Return True if the VNI is unique amongst all VXLANs"""
    if not "vxlan_tunnels" in yaml:
        return True

    ncount = 0
    for _ifname, iface in yaml["vxlan_tunnels"].items():
        if iface["vni"] == vni:
            ncount = ncount + 1

    return ncount < 2