Cleanup libvirt driver for BIOS emulator
- changed to create namedtuple class at module level - changed to use list when defining namedtuple attributes - fixed docstring param 'update' name Followup to I3b9e7683934e4448bedf3933f1a2fe222d70c208 Change-Id: I73bfc62568d36eefd8dcef2c85f15dd55b55ed04
This commit is contained in:
parent
cdaab6772c
commit
fecfe5ecc6
|
@ -21,6 +21,11 @@ from sushy_tools.error import FishyError
|
|||
|
||||
import libvirt
|
||||
|
||||
BiosProcessResult = namedtuple('BiosProcessResult',
|
||||
['tree',
|
||||
'attributes_written',
|
||||
'bios_attributes'])
|
||||
|
||||
|
||||
class libvirt_open(object):
|
||||
|
||||
|
@ -396,9 +401,6 @@ class LibvirtDriver(AbstractDriver):
|
|||
bios_attributes = {atr.attrib['name']: atr.attrib['value']
|
||||
for atr in tree.find('.//sushy:attributes', ns)}
|
||||
|
||||
BiosProcessResult = namedtuple('BiosProcessResult',
|
||||
'tree, attributes_written,'
|
||||
'bios_attributes')
|
||||
return BiosProcessResult(tree, attributes_written, bios_attributes)
|
||||
|
||||
def _process_bios(self, identity,
|
||||
|
@ -409,7 +411,7 @@ class LibvirtDriver(AbstractDriver):
|
|||
:param identity: libvirt domain name or ID
|
||||
:param bios_attributes: Full list of BIOS attributes to use if
|
||||
they are missing or update necessary
|
||||
:param update: Update existing BIOS attributes
|
||||
:param update_existing_attributes: Update existing BIOS attributes
|
||||
|
||||
:returns: New or existing dict of BIOS attributes
|
||||
|
||||
|
|
Loading…
Reference in New Issue