From: Ondrej Lichtner olichtne@redhat.com
Returns the bus info (pci address) of the specific Device as reported by ethtool.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Devices/Device.py | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/lnst/Devices/Device.py b/lnst/Devices/Device.py index 80abdcf..20cddcf 100644 --- a/lnst/Devices/Device.py +++ b/lnst/Devices/Device.py @@ -469,6 +469,14 @@ class Device(object): """ return self._nl_msg.get_attr("IFLA_STATS64")
+ @property + def bus_info(self): + try: + return ethtool.get_businfo(self.name) + except IOError as e: + log_exc_traceback() + return "" + def _clear_ips(self): self._ip_addrs = []