def get_l2xc_target_interfaces(yaml):
    """Returns a list of all interfaces that are the target of an L2 CrossConnect"""
    ret = []
    if "interfaces" in yaml:
        for _ifname, iface in yaml["interfaces"].items():
            if "l2xc" in iface:
                ret.append(iface["l2xc"])
            if "sub-interfaces" in iface:
                for _subid, sub_iface in iface["sub-interfaces"].items():
                    if "l2xc" in sub_iface:
                        ret.append(sub_iface["l2xc"])

    return ret