示例#1
0
 def test_getAllCpuModels(self):
     result = machinetype.cpu_models(capfile=self.CPU_MAP_FILE,
                                     arch=cpuarch.X86_64)
     expected = {
         'qemu32': None,
         'Haswell': 'Intel',
         'cpu64-rhel6': None,
         'cpu64-rhel5': None,
         'Broadwell': 'Intel',
         'pentium2': None,
         'pentiumpro': None,
         'athlon': 'AMD',
         'Nehalem': 'Intel',
         'Conroe': 'Intel',
         'kvm32': None,
         'pentium': None,
         'Opteron_G3': 'AMD',
         'coreduo': 'Intel',
         'Opteron_G1': 'AMD',
         'Opteron_G5': 'AMD',
         'Opteron_G4': 'AMD',
         'core2duo': 'Intel',
         'Penryn': 'Intel',
         'qemu64': None,
         'phenom': 'AMD',
         'Opteron_G2': 'AMD',
         '486': None,
         'Westmere': 'Intel',
         'pentium3': None,
         'n270': 'Intel',
         'SandyBridge': 'Intel',
         'kvm64': None
     }
     self.assertEqual(expected, result)
示例#2
0
 def test_getAllCpuModels(self):
     result = machinetype.cpu_models(capfile=self.CPU_MAP_FILE,
                                     arch=cpuarch.X86_64)
     expected = {
         'qemu32': None,
         'Haswell': 'Intel',
         'cpu64-rhel6': None,
         'cpu64-rhel5': None,
         'Broadwell': 'Intel',
         'pentium2': None,
         'pentiumpro': None,
         'athlon': 'AMD',
         'Nehalem': 'Intel',
         'Conroe': 'Intel',
         'kvm32': None,
         'pentium': None,
         'Opteron_G3': 'AMD',
         'coreduo': 'Intel',
         'Opteron_G1': 'AMD',
         'Opteron_G5': 'AMD',
         'Opteron_G4': 'AMD',
         'core2duo': 'Intel',
         'Penryn': 'Intel',
         'qemu64': None,
         'phenom': 'AMD',
         'Opteron_G2': 'AMD',
         '486': None,
         'Westmere': 'Intel',
         'pentium3': None,
         'n270': 'Intel',
         'SandyBridge': 'Intel',
         'kvm64': None
         }
     self.assertEqual(expected, result)
示例#3
0
 def test_getAllCpuModels_noArch(self):
     result = machinetype.cpu_models(capfile=self.CPU_MAP_FILE,
                                     arch='non_existent_arch')
     self.assertEqual(dict(), result)
示例#4
0
 def test_getAllCpuModels_noArch(self):
     result = machinetype.cpu_models(capfile=self.CPU_MAP_FILE,
                                     arch='non_existent_arch')
     self.assertEqual(dict(), result)