def testWithNodeInfo(self):
   info = testutils.ReadTestData("xen-xm-info-4.0.1.txt")
   result = hv_xen._GetNodeInfo(info, self._FakeXmList)
   self.assertEqual(result, {
     "cpu_nodes": 1,
     "cpu_sockets": 2,
     "cpu_total": 4,
     "dom0_cpus": 7,
     "hv_version": (4, 0),
     "memory_dom0": 4096,
     "memory_free": 8004,
     "memory_hv": 2230,
     "memory_total": 16378,
     })
Example #2
0
 def testWithNodeInfo(self):
   info = testutils.ReadTestData("xen-xm-info-4.0.1.txt")
   instance_list = self._FakeXmList(True)
   result = hv_xen._GetNodeInfo(info, instance_list)
   self.assertEqual(result, {
     "cpu_nodes": 1,
     "cpu_sockets": 2,
     "cpu_total": 4,
     "cpu_dom0": 7,
     "hv_version": (4, 0),
     "memory_dom0": 4096,
     "memory_free": 8004,
     "memory_hv": 2230,
     "memory_total": 16378,
     })