def is_host_name_unique(yaml, hostname):
    """Returns True if there is at most one occurence of the given ifname amonst all host-names of TAPs."""
    if not "taps" in yaml:
        return True
    host_names = []
    for _tap_ifname, tap_iface in yaml["taps"].items():
        host_names.append(tap_iface["host"]["name"])
    return host_names.count(hostname) < 2