def test_bad_map(self, *args, **keywargs):
     driver = LibvirtNodeDriver("")
     arp_table = driver._parse_ip_table_neigh(self.bad_output_str)
     # we should at least get the correctly formatted lines
     self.assertEqual(len(arp_table), 2)
     arp_table = driver._parse_ip_table_neigh(self.arp_output_str)
     # nothing should match if the wrong output is sent
     self.assertEqual(len(arp_table), 0)
 def test_list_nodes(self, *args, **keywargs):
     driver = LibvirtNodeDriver("")
     nodes = driver.list_nodes()
     self.assertEqual(type([]), type(nodes))
     self.assertEqual(len(nodes), 0)
 def test_ip_map(self, *args, **keywargs):
     driver = LibvirtNodeDriver("")
     arp_table = driver._parse_ip_table_neigh(self.ip_output_str)
     self._assert_arp_table(arp_table)
Beispiel #4
0
 def nova_shutdown(self,vm,*args,**kwargs):
     vm.shutdown()
     # vm._uuid=vm.id
     if LibvirtNodeDriver('qemu:///system',key='root',secret='000000').ex_shutdown_node(vm):