Commit 98804a5e authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

Print eui64 too while printing clients

Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 83c760b0
......@@ -550,11 +550,13 @@ class VMNetProxy(object): # pylint: disable=R0902
if b.is_valid():
if self.mac_indexed_clients:
self.clients[b.mac] = b
k = b.mac
else:
self.clients[ifindex] = b
logging.debug(" - Added client:")
logging.debug(" + %5s: %10s %20s %7s %15s",
ifindex, b.hostname, b.mac, b.tap, b.ip)
k = ifindex
logging.info(" - Added client:")
logging.info(" + %10s | %20s %20s %10s %20s %40s",
k, b.hostname, b.mac, b.tap, b.ip, b.eui64)
def remove_tap(self, tap):
""" Cleanup clients on a removed interface
......@@ -565,8 +567,8 @@ class VMNetProxy(object): # pylint: disable=R0902
if cl.tap == tap:
logging.info("Removing client %s and closing socket on %s",
cl.hostname, cl.tap)
logging.debug(" - %10s | %10s %20s %10s %20s",
k, cl.hostname, cl.mac, cl.tap, cl.ip)
logging.info(" - %10s | %20s %20s %10s %20s %40s",
k, cl.hostname, cl.mac, cl.tap, cl.ip, cl.eui64)
cl.socket.close()
del self.clients[k]
except:
......@@ -1044,11 +1046,11 @@ class VMNetProxy(object): # pylint: disable=R0902
timeout = self.ra_period - (time.time() - start)
def print_clients(self):
logging.info("%10s %20s %20s %10s %20s",
'Key', 'Client', 'MAC', 'TAP', 'IP')
logging.info("%10s %20s %20s %10s %20s %40s",
'Key', 'Client', 'MAC', 'TAP', 'IP', 'IPv6')
for k, cl in self.clients.items():
logging.info("%10s | %20s %20s %10s %20s",
k, cl.hostname, cl.mac, cl.tap, cl.ip)
logging.info("%10s | %20s %20s %10s %20s %40s",
k, cl.hostname, cl.mac, cl.tap, cl.ip, cl.eui64)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment