Beispiel #1
0
 def testGetIfaceByIP(self):
     for dev in ethtool.get_interfaces_info(ethtool.get_active_devices()):
         ipaddrs = map(
             lambda etherinfo_ipv6addr: etherinfo_ipv6addr.address,
             dev.get_ipv6_addresses())
         ipaddrs.append(dev.ipv4_address)
         for ip in ipaddrs:
             self.assertEqual(dev.device, netinfo.getIfaceByIP(ip))
Beispiel #2
0
 def testGetIfaceByIP(self):
     for dev in ethtool.get_interfaces_info(ethtool.get_active_devices()):
         ipaddrs = map(
             lambda etherinfo_ipv6addr: etherinfo_ipv6addr.address,
             dev.get_ipv6_addresses())
         ipaddrs.append(dev.ipv4_address)
         for ip in ipaddrs:
             self.assertEqual(dev.device, netinfo.getIfaceByIP(ip))
 def getServerInfo(self):
     """
     Return the IP address and last client information
     """
     last = self.server.lastClient
     lastserver = self.server.lastServerIP
     return {'management_ip': self.serverIP,
             'lastClient': last,
             'lastClientIface': getIfaceByIP(lastserver)}
Beispiel #4
0
 def getServerInfo(self):
     """
     Return the IP address and last client information
     """
     last = self.server.lastClient
     lastserver = self.server.lastServerIP
     return {
         'management_ip': self.serverIP,
         'lastClient': last,
         'lastClientIface': getIfaceByIP(lastserver)
     }