test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework/tester: disable tester ports LLDP
@ 2019-12-09 23:37 Xinfeng Zhao
  0 siblings, 0 replies; only message in thread
From: Xinfeng Zhao @ 2019-12-09 23:37 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 framework/tester.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/framework/tester.py b/framework/tester.py
index d7e74d4..8585a11 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -174,6 +174,27 @@ class Tester(Crb):
         self.restore_interfaces()
         self.scan_ports()
 
+        self.disable_lldp()
+
+    def disable_lldp(self):
+        """
+        Disable tester ports LLDP.
+        """
+        self.logger.info("Disable tester ports LLDP")
+        result = self.send_expect("lldpad -d",  "# ")
+        if result:
+            self.logger.error(result.strip())
+
+        for port in self.ports_info:
+            eth = port["intf"]
+            out = self.send_expect("ethtool --show-priv-flags %s"
+                    % eth, "# ", alt_session=True)
+            if "disable-fw-lldp" in out:
+                self.send_expect("ethtool --set-priv-flags %s disable-fw-lldp on"
+                        % eth, "# ", alt_session=True)
+            self.send_expect("lldptool set-lldp -i %s adminStatus=disabled"
+                    % eth, "# ", alt_session=True)
+
     def get_local_port(self, remotePort):
         """
         Return tester local port connect to specified dut port.
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-10  8:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 23:37 [dts] [PATCH V1] framework/tester: disable tester ports LLDP Xinfeng Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).