mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
xmlbuilder: Use shared clear() function
This commit is contained in:
parent
e0190f7b5e
commit
058100cdf8
@ -52,10 +52,6 @@ class CPUFeature(XMLBuilder):
|
||||
make_getter_xpath_cb=_policy_xpath,
|
||||
make_setter_xpath_cb=_policy_xpath)
|
||||
|
||||
def clear(self):
|
||||
self.policy = None
|
||||
self._xmlname = None
|
||||
|
||||
|
||||
class CPU(XMLBuilder):
|
||||
"""
|
||||
@ -99,15 +95,6 @@ class CPU(XMLBuilder):
|
||||
return self._features[:]
|
||||
features = property(_get_features)
|
||||
|
||||
def clear_attrs(self):
|
||||
self.match = None
|
||||
self.mode = None
|
||||
self.vendor = None
|
||||
self.model = None
|
||||
|
||||
for feature in self.features:
|
||||
self.remove_feature(feature)
|
||||
|
||||
def copy_host_cpu(self):
|
||||
"""
|
||||
Enact the equivalent of qemu -cpu host, pulling all info
|
||||
|
@ -159,17 +159,6 @@ class VirtualDeviceAddress(XMLBuilder):
|
||||
"format of '%s'") % addrstr)
|
||||
|
||||
|
||||
def clear(self):
|
||||
self.type = None
|
||||
self.bus = None
|
||||
self.domain = None
|
||||
self.slot = None
|
||||
self.function = None
|
||||
self.controller = None
|
||||
self.unit = None
|
||||
self.port = None
|
||||
|
||||
|
||||
type = XMLProperty(xpath="./address/@type")
|
||||
domain = XMLProperty(xpath="./address/@domain", is_int=True)
|
||||
bus = XMLProperty(xpath="./address/@bus", is_int=True)
|
||||
|
Loading…
Reference in New Issue
Block a user