aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/xena/XenaDriver.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-11-23 09:19:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-23 09:19:21 +0000
commitefdc282f4b08e96f3e09d43f94ba0508e4f26090 (patch)
tree3911cb1d8a9d8ab2774959e86a73dcc921d794f1 /tools/pkt_gen/xena/XenaDriver.py
parente0497a533007012318e4392aeab56f3010921bd2 (diff)
parent04a0e5c51eb28e11c3337fc3b85fc16167c4af95 (diff)
Merge "Xena_cont_accuracy: Modify continuous from duration to packet limit"
Diffstat (limited to 'tools/pkt_gen/xena/XenaDriver.py')
-rw-r--r--tools/pkt_gen/xena/XenaDriver.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/pkt_gen/xena/XenaDriver.py b/tools/pkt_gen/xena/XenaDriver.py
index d3862312..04a99e9d 100644
--- a/tools/pkt_gen/xena/XenaDriver.py
+++ b/tools/pkt_gen/xena/XenaDriver.py
@@ -61,6 +61,10 @@ CMD_RESERVE = 'p_reservation reserve'
CMD_RELEASE = 'p_reservation release'
CMD_RELINQUISH = 'p_reservation relinquish'
CMD_RESET = 'p_reset'
+CMD_SET_PORT_ARP_REPLY = 'p_arpreply'
+CMD_SET_PORT_ARP_V6_REPLY = 'p_arpv6reply'
+CMD_SET_PORT_PING_REPLY = 'p_pingreply'
+CMD_SET_PORT_PING_V6_REPLY = 'p_pingv6reply'
CMD_SET_PORT_TIME_LIMIT = 'p_txtimelimit'
CMD_SET_STREAM_HEADER_PROTOCOL = 'ps_headerprotocol'
CMD_SET_STREAM_ON_OFF = 'ps_enable'
@@ -532,6 +536,30 @@ class XenaPort(object):
command = make_port_command(CMD_RESET, self)
return self._manager.driver.ask_verify(command)
+ def set_port_arp_reply(self, on=True, v6=False):
+ """
+ Set the port arpreply value
+ :param on: Enable or disable the arp reply on the port
+ :param v6: set the value on the ip v6, disabled will set at ip v4
+ :return: Boolean True if response OK, False if error
+ """
+ command = make_port_command('{} {}'.format(
+ CMD_SET_PORT_ARP_V6_REPLY if v6 else CMD_SET_PORT_ARP_REPLY,
+ "on" if on else "off"), self)
+ return self._manager.driver.ask_verify(command)
+
+ def set_port_ping_reply(self, on=True, v6=False):
+ """
+ Set the port ping reply value
+ :param on: Enable or disable the ping reply on the port
+ :param v6: set the value on the ip v6, disabled will set at ip v4
+ :return: Boolean True if response OK, False if error
+ """
+ command = make_port_command('{} {}'.format(
+ CMD_SET_PORT_PING_V6_REPLY if v6 else CMD_SET_PORT_PING_REPLY,
+ "on" if on else "off"), self)
+ return self._manager.driver.ask_verify(command)
+
def set_port_ip(self, ip_addr, cidr, gateway, wild='255'):
"""
Set the port ip address of the specific port