

def _construct_update(self, path):
    new_pathattr = [attr for attr in path.pathattr_map.values()]
    if path.is_withdraw:
        if isinstance(attr, Ipv4Path):
            return BGPUpdate(withdrawn_routes=[path.nlri], path_attributes=new_pathattr)
        else:
            mpunreach_attr = BGPPathAttributeMpUnreachNLRI(path.route_family.afi, path.route_family.safi, [path.nlri])
            new_pathattr.append(mpunreach_attr)
    elif isinstance(path, Ipv4Path):
        return BGPUpdate(nlri=[path.nlri], path_attributes=new_pathattr)
    return BGPUpdate(path_attributes=new_pathattr)

dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/bmp.py BMPClient._construct_update/VarMisuse@38/49 `path`->`attr`