daemon: updates to support configuring and tracking mtu, along with over refactoring
This commit is contained in:
parent
0b531d7fd8
commit
871b1ae2af
7 changed files with 93 additions and 151 deletions
|
@ -95,14 +95,14 @@ class LinuxNetClient:
|
|||
"""
|
||||
return self.run(f"cat /sys/class/net/{device}/address")
|
||||
|
||||
def get_ifindex(self, device: str) -> str:
|
||||
def get_ifindex(self, device: str) -> int:
|
||||
"""
|
||||
Retrieve ifindex for a given device.
|
||||
|
||||
:param device: device to get ifindex for
|
||||
:return: ifindex
|
||||
"""
|
||||
return self.run(f"cat /sys/class/net/{device}/ifindex")
|
||||
return int(self.run(f"cat /sys/class/net/{device}/ifindex"))
|
||||
|
||||
def device_ns(self, device: str, namespace: str) -> None:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue