aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/xena/XenaDriver.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-01-24 07:56:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-24 07:56:48 +0000
commit14c3ad198f680fb1477f59af79fccc72e1ad8389 (patch)
tree2d5835242d09a4d622328d0c44840c250c09d535 /tools/pkt_gen/xena/XenaDriver.py
parent76ac721519246949968b7b6fadcdd8642021e5b0 (diff)
parent3aa4a6fab319a1e532eb8bb963a4632bc37797ef (diff)
Merge "xena_cont_learning: Adds learning preemption to continuous traffic"
Diffstat (limited to 'tools/pkt_gen/xena/XenaDriver.py')
-rw-r--r--tools/pkt_gen/xena/XenaDriver.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/pkt_gen/xena/XenaDriver.py b/tools/pkt_gen/xena/XenaDriver.py
index 04a99e9d..e144514f 100644
--- a/tools/pkt_gen/xena/XenaDriver.py
+++ b/tools/pkt_gen/xena/XenaDriver.py
@@ -57,6 +57,7 @@ CMD_LOGOFF = 'c_logoff'
CMD_OWNER = 'c_owner'
CMD_PORT = ';Port:'
CMD_PORT_IP = 'p_ipaddress'
+CMD_PORT_LEARNING = 'p_autotrain'
CMD_RESERVE = 'p_reservation reserve'
CMD_RELEASE = 'p_reservation release'
CMD_RELINQUISH = 'p_reservation relinquish'
@@ -560,6 +561,14 @@ class XenaPort(object):
"on" if on else "off"), self)
return self._manager.driver.ask_verify(command)
+ def set_port_learning(self, interval):
+ """Start port learning with the interval in seconds specified. 0 disables port learning
+ :param: interval as int
+ :return: Boolean True if response OK, False if error.
+ """
+ command = make_port_command('{} {}'.format(CMD_PORT_LEARNING, interval), 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