summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2014-03-12 12:36:17 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2014-03-13 16:50:37 +0100
commit143a68959277e01f8fb90f09e2ba9e9d4b0fd9d1 (patch)
tree48e1156bf29540a2ac9d5a3dba8fa1dd913c0db5
parent4f7f1adc47d0a9524d677ae635fc94f1374e1bb8 (diff)
downloadvirt-manager-143a68959277e01f8fb90f09e2ba9e9d4b0fd9d1.tar.gz
virtinst: drop cpu_map parsing of arch features
This information is not used anywhere and there is no way to read it directly from libvirt without parsing the cpu_map.xml file. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--tests/capabilities.py21
-rw-r--r--virtinst/capabilities.py6
2 files changed, 5 insertions, 22 deletions
diff --git a/tests/capabilities.py b/tests/capabilities.py
index b712f8d1..b718dc1c 100644
--- a/tests/capabilities.py
+++ b/tests/capabilities.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013, 2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -225,14 +225,12 @@ class TestCapabilities(unittest.TestCase):
cpu_32 = caps.get_cpu_values("i486")
cpu_random = caps.get_cpu_values("mips")
- def test_cpu_map(cpumap, vendors, features, cpus):
+ def test_cpu_map(cpumap, vendors, cpus):
cpunames = sorted([c.model for c in cpumap.cpus],
key=str.lower)
for v in vendors:
self.assertTrue(v in cpumap.vendors)
- for f in features:
- self.assertTrue(f in cpumap.features)
for c in cpus:
self.assertTrue(c in cpunames)
@@ -244,25 +242,14 @@ class TestCapabilities(unittest.TestCase):
self.assertEquals(cpu_64, cpu_32)
x86_vendors = ["AMD", "Intel"]
- x86_features = [
- '3dnow', '3dnowext', '3dnowprefetch', 'abm', 'acpi', 'apic',
- 'cid', 'clflush', 'cmov', 'cmp_legacy', 'cr8legacy', 'cx16',
- 'cx8', 'dca', 'de', 'ds', 'ds_cpl', 'est', 'extapic', 'fpu',
- 'fxsr', 'fxsr_opt', 'ht', 'hypervisor', 'ia64', 'lahf_lm', 'lm',
- 'mca', 'mce', 'misalignsse', 'mmx', 'mmxext', 'monitor', 'msr',
- 'mtrr', 'nx', 'osvw', 'pae', 'pat', 'pbe', 'pdpe1gb', 'pge', 'pn',
- 'pni', 'popcnt', 'pse', 'pse36', 'rdtscp', 'sep', 'skinit', 'ss',
- 'sse', 'sse2', 'sse4.1', 'sse4.2', 'sse4a', 'ssse3', 'svm',
- 'syscall', 'tm', 'tm2', 'tsc', 'vme', 'vmx', 'wdt', 'x2apic',
- 'xtpr']
x86_cpunames = [
'486', 'athlon', 'Conroe', 'core2duo', 'coreduo', 'n270',
'Nehalem', 'Opteron_G1', 'Opteron_G2', 'Opteron_G3', 'Penryn',
'pentium', 'pentium2', 'pentium3', 'pentiumpro', 'phenom',
'qemu32', 'qemu64']
- test_cpu_map(cpu_64, x86_vendors, x86_features, x86_cpunames)
- test_cpu_map(cpu_random, [], [], [])
+ test_cpu_map(cpu_64, x86_vendors, x86_cpunames)
+ test_cpu_map(cpu_random, [], [])
athlon_features = [
'3dnow', '3dnowext', 'apic', 'cmov', 'cx8', 'de', 'fpu', 'fxsr',
diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py
index b8d33303..2fe2c0a9 100644
--- a/virtinst/capabilities.py
+++ b/virtinst/capabilities.py
@@ -1,7 +1,7 @@
#
# Some code for parsing libvirt's capabilities XML
#
-# Copyright 2007, 2012-2013 Red Hat, Inc.
+# Copyright 2007, 2012-2014 Red Hat, Inc.
# Mark McLoughlin <markmc@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
@@ -75,7 +75,6 @@ class CPUValuesArch(object):
self.arch = arch
self.vendors = []
self.cpus = []
- self.features = []
if node:
self._parseXML(node)
@@ -85,8 +84,6 @@ class CPUValuesArch(object):
while child:
if child.name == "vendor":
self.vendors.append(child.prop("name"))
- if child.name == "feature":
- self.features.append(child.prop("name"))
if child.name == "model":
newcpu = CPUValuesModel(child)
if newcpu.parent:
@@ -98,7 +95,6 @@ class CPUValuesArch(object):
child = child.next
self.vendors.sort()
- self.features.sort()
def get_cpu(self, model):
for c in self.cpus: