Usage of this method is similar to using config. You need to
specify device, value of mtu and optionally persistency.
Eg. host.set_mtu("testiface", 8000, persistency=True)
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Controller/Task.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index 034dc5f..e78edee 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -173,6 +173,10 @@ class HostAPI(object):
return self._ctl._run_command(cmd)
+ def set_mtu(self, device, mtu, persistent=False):
+ path = "/sys/class/net/%s/mtu" % self.get_devname(device)
+ self.config(path, mtu, persistent)
+
def run(self, what, **kwargs):
"""
Configure an option in /sys or /proc on the host.
--
2.1.0