aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2023-01-16 12:46:14 +0100
committerVratko Polak <vrpolak@cisco.com>2023-01-16 12:46:14 +0100
commita63b5bbbbfa418c7140d9006f0257bc614a0cd3b (patch)
tree043053e9bdbddb4eb0434628054cde1f8f4632b8 /resources
parent5302eeabb757ccf710568a66b8f6435c1894cd4d (diff)
feat(papi): switch ip from vat to async papi
Change-Id: I3ecad09d2659124a6c07d642a453845ed1779258 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/IPUtil.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/resources/libraries/python/IPUtil.py b/resources/libraries/python/IPUtil.py
index 359bd1dce9..dd3d21f740 100644
--- a/resources/libraries/python/IPUtil.py
+++ b/resources/libraries/python/IPUtil.py
@@ -28,7 +28,6 @@ from resources.libraries.python.IPAddress import IPAddress
from resources.libraries.python.PapiExecutor import PapiSocketExecutor
from resources.libraries.python.ssh import exec_cmd_no_error, exec_cmd
from resources.libraries.python.topology import Topology
-from resources.libraries.python.VatExecutor import VatExecutor
from resources.libraries.python.Namespaces import Namespaces
@@ -738,52 +737,6 @@ class IPUtil:
"""
count = kwargs.get(u"count", 1)
- if count > 100:
- if not kwargs.get(u"multipath", True):
- raise RuntimeError(u"VAT exec supports only multipath behavior")
- gateway = kwargs.get(u"gateway", u"")
- interface = kwargs.get(u"interface", u"")
- local = kwargs.get(u"local", u"")
- if interface:
- interface = InterfaceUtil.vpp_get_interface_name(
- node, InterfaceUtil.get_interface_index(
- node, interface
- )
- )
- vrf = kwargs.get(u"vrf", None)
- trailers = list()
- if vrf:
- trailers.append(f"table {vrf}")
- if gateway:
- trailers.append(f"via {gateway}")
- if interface:
- trailers.append(interface)
- elif interface:
- trailers.append(f"via {interface}")
- if local:
- if gateway or interface:
- raise RuntimeError(u"Unsupported combination with local.")
- trailers.append(u"local")
- trailer = u" ".join(trailers)
- command_parts = [u"exec ip route add", u"network goes here"]
- if trailer:
- command_parts.append(trailer)
- netiter = NetworkIncrement(
- ip_network(f"{network}/{prefix_len}", strict=strict),
- format=u"slash"
- )
- tmp_filename = u"/tmp/routes.config"
- with open(tmp_filename, u"w") as tmp_file:
- for _ in range(count):
- command_parts[1] = netiter.inc_fmt()
- print(u" ".join(command_parts), file=tmp_file)
- VatExecutor().execute_script(
- tmp_filename, node, timeout=1800, json_out=False,
- copy_on_execute=True, history=False
- )
- os.remove(tmp_filename)
- return
-
cmd = u"ip_route_add_del"
args = dict(
is_add=True,