From: Ondrej Lichtner olichtne@redhat.com
This adds a list of RTM_NEWADDR netlink messages to the interface scan results, carrying information about the NICs ip addresses.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Common/NetUtils.py | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/lnst/Common/NetUtils.py b/lnst/Common/NetUtils.py index 150746c..9fd4732 100644 --- a/lnst/Common/NetUtils.py +++ b/lnst/Common/NetUtils.py @@ -40,6 +40,9 @@ def scan_netdevs(): else: new_link["hwaddr"] = None
+ addrs = ipr.get_addr(index=new_link["index"]) + new_link["ip_addrs"] = addrs + scan.append(new_link) except: raise