Пример #1
0
def mpls_to_mpls_route(
        label: int, nexthops: List[network_types.NextHopThrift]
) -> network_types.UnicastRoute:
    """
    :param label: MPLS label
    :param nexthops: List of nexthops
    """

    return network_types.MplsRoute(topLabel=label, nextHops=nexthops)
Пример #2
0
def mpls_to_mpls_route(
        label: int, nexthops: List[network_types.NextHopThrift]
) -> network_types.UnicastRoute:
    """
    :param label: MPLS label
    :param nexthops: List of nexthops
    """

    # pyre-fixme[7]: Expected `UnicastRoute` but got `MplsRoute`.
    return network_types.MplsRoute(topLabel=label, nextHops=nexthops)