Ejemplo n.º 1
0
 def test_get_interfaces(self):
     inst = model.Model('test:///default', objstore_loc=self.tmp_store)
     expected_ifaces = netinfo.all_favored_interfaces()
     ifaces = inst.interfaces_get_list()
     self.assertEquals(len(expected_ifaces), len(ifaces))
     for name in expected_ifaces:
         iface = inst.interface_lookup(name)
         self.assertEquals(iface['name'], name)
         self.assertIn('type', iface)
         self.assertIn('status', iface)
         self.assertIn('ipaddr', iface)
         self.assertIn('netmask', iface)
Ejemplo n.º 2
0
 def test_get_interfaces(self):
     inst = model.Model('test:///default',
                        objstore_loc=self.tmp_store)
     expected_ifaces = netinfo.all_favored_interfaces()
     ifaces = inst.interfaces_get_list()
     self.assertEquals(len(expected_ifaces), len(ifaces))
     for name in expected_ifaces:
         iface = inst.interface_lookup(name)
         self.assertEquals(iface['name'], name)
         self.assertIn('type', iface)
         self.assertIn('status', iface)
         self.assertIn('ipaddr', iface)
         self.assertIn('netmask', iface)
Ejemplo n.º 3
0
 def get_list(self):
     return list(
         set(netinfo.all_favored_interfaces()) -
         set(self.networks.get_all_networks_interfaces()))
Ejemplo n.º 4
0
 def get_list(self):
     return list(set(netinfo.all_favored_interfaces()) -
                 set(self.networks.get_all_networks_interfaces()))