aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
authorPatrik Hrnciar <phrnciar@cisco.com>2016-06-10 08:09:56 +0200
committerDave Wallace <dwallacelf@gmail.com>2016-06-30 19:09:11 +0000
commit7d2ae8ca0427b2646327ba42bffdebaac21cd9bc (patch)
tree5db80e723df61c1d0522192c8331d37b4f18926a /resources/libraries/python/InterfaceUtil.py
parent83d5183aba7a35777ee4363b989bb22e22e8a2ef (diff)
CSIT-24 Proxy ARP test
Change-Id: Ia41af7e29dcb8c41d58c07134a385428ac1b285c Signed-off-by: Patrik Hrnciar <phrnciar@cisco.com>
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 7bf0584697..ace4453e54 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -748,3 +748,22 @@ class InterfaceUtil(object):
return {}
return vxlan_gpe_data[0]
+
+ @staticmethod
+ def vpp_proxy_arp_interface_enable(node, interface):
+ """Enable proxy ARP on interface.
+
+ :param node: VPP node to enable proxy ARP on interface.
+ :param interface: Interface to enable proxy ARP.
+ :type node: dict
+ :type interface: str or int
+ """
+ if isinstance(interface, basestring):
+ sw_if_index = InterfaceUtil.get_sw_if_index(node, interface)
+ else:
+ sw_if_index = interface
+
+ with VatTerminal(node) as vat:
+ vat.vat_terminal_exec_cmd_from_template(
+ "proxy_arp_intfc_enable.vat",
+ sw_if_index=sw_if_index)