Beispiel #1
0
 def testMultiple(self):
     self.assertEqual(hv_xen._CreateConfigCpus("0-2,4,5-5:3:all"),
                      ("cpus = [ \"0,1,2,4,5\", \"3\", \"%s\" ]" %
                       constants.CPU_PINNING_ALL_XEN))
Beispiel #2
0
 def testAll(self):
     self.assertEqual(hv_xen._CreateConfigCpus(constants.CPU_PINNING_ALL),
                      None)
Beispiel #3
0
 def testOne(self):
     self.assertEqual(hv_xen._CreateConfigCpus("9"), "cpu = \"9\"")
Beispiel #4
0
 def testEmpty(self):
     for cpu_mask in [None, ""]:
         self.assertEqual(hv_xen._CreateConfigCpus(cpu_mask), "cpus = [  ]")
 def testMultiple(self):
   self.assertEqual(hv_xen._CreateConfigCpus("0-2,4,5-5:3:all"),
                    ("cpus = [ \"0,1,2,4,5\", \"3\", \"%s\" ]" %
                     constants.CPU_PINNING_ALL_XEN))
 def testOne(self):
   self.assertEqual(hv_xen._CreateConfigCpus("9"), "cpu = \"9\"")
 def testAll(self):
   self.assertEqual(hv_xen._CreateConfigCpus(constants.CPU_PINNING_ALL),
                    None)
 def testEmpty(self):
   for cpu_mask in [None, ""]:
     self.assertEqual(hv_xen._CreateConfigCpus(cpu_mask),
                      "cpus = [  ]")