From 88f2808ac8c52d82775e9ee38765fcc8892c9c63 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 19 Oct 2022 11:58:54 +0200 Subject: [PATCH] Added utilised network device info to local interface connectivity stats --- sbapp/services/sidebandservice.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sbapp/services/sidebandservice.py b/sbapp/services/sidebandservice.py index 87b0cdc..826ffe7 100644 --- a/sbapp/services/sidebandservice.py +++ b/sbapp/services/sidebandservice.py @@ -199,13 +199,22 @@ class SidebandService(): stat = "[size=22dp][b]Connectivity Status[/b][/size]\n\n" if self.sideband.interface_local != None: + netdevs = self.sideband.interface_local.adopted_interfaces + if len(netdevs) > 0: + ds = "Using " + for netdev in netdevs: + ds += "[i]"+str(netdev)+"[/i], " + ds = ds[:-2] + else: + ds = "No usable network devices" + np = len(self.sideband.interface_local.peers) if np == 1: ws = "1 reachable peer" else: ws = str(np)+" reachable peers" - stat += "[b]Local[/b]\n{ws}\n\n".format(ws=ws) + stat += "[b]Local[/b]\n{ds}\n{ws}\n\n".format(ds=ds, ws=ws) if self.sideband.interface_rnode != None: if self.sideband.interface_rnode.online: