Esempio n. 1
0
 def testUnknownInput(self):
     data = "\n".join([
         "foo bar",
         "something else goes",
         "here",
     ])
     self.assertEqual(hv_xen._ParseNodeInfo(data), {})
 def testUnknownInput(self):
   data = "\n".join([
     "foo bar",
     "something else goes",
     "here",
     ])
   self.assertEqual(hv_xen._ParseNodeInfo(data), {})
Esempio n. 3
0
 def testBasicInfo(self):
   data = testutils.ReadTestData("xen-xm-info-4.0.1.txt")
   result = hv_xen._ParseNodeInfo(data)
   self.assertEqual(result, {
     "cpu_nodes": 1,
     "cpu_sockets": 2,
     "cpu_total": 4,
     "hv_version": (4, 0),
     "memory_free": 8004,
     "memory_total": 16378,
     })
Esempio n. 4
0
 def testEmpty(self):
     self.assertEqual(hv_xen._ParseNodeInfo(""), {})
 def testEmpty(self):
   self.assertEqual(hv_xen._ParseNodeInfo(""), {})