- if count > 100:
- gateway = kwargs.get(u"gateway", '')
- interface = kwargs.get(u"interface", '')
- vrf = kwargs.get(u"vrf", None)
- multipath = kwargs.get(u"multipath", False)
-
- with VatTerminal(node, json_param=False) as vat:
-
- vat.vat_terminal_exec_cmd_from_template(
- u"vpp_route_add.vat",
- network=network,
- prefix_length=prefix_len,
- via=f"via {gateway}" if gateway else u"",
- sw_if_index=f"sw_if_index "
- f"{InterfaceUtil.get_interface_index(node, interface)}"
- if interface else u"",
- vrf=f"vrf {vrf}" if vrf else u"",
- count=f"count {count}" if count else u"",
- multipath=u"multipath" if multipath else u""
- )
- return
-
- net_addr = ip_address(network)