guest: Don't exclude redirected devices

Don't exclude redirected devices since they're also bootable. They
won't clutter the UI of virt-manager as we're excluding them
explicitly for the UI in the `get_bootable_devices` method defined in
virtManager/domain.py.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
This commit is contained in:
Marc Hartmayer 2019-02-06 10:55:42 +01:00 committed by Cole Robinson
parent 12e8456da2
commit 1369549aab

View File

@ -354,7 +354,7 @@ class Guest(XMLBuilder):
def _get_device_boot_order(self):
order = []
for dev in self.get_bootable_devices(exclude_redirdev=True):
for dev in self.get_bootable_devices():
if not dev.boot.order:
continue
order.append((dev.get_xml_id(), dev.boot.order))
@ -382,7 +382,7 @@ class Guest(XMLBuilder):
dev.boot.order = None
dev_map = dict((dev.get_xml_id(), dev) for dev in
self.get_bootable_devices(exclude_redirdev=True))
self.get_bootable_devices())
for boot_idx, dev_xml_id in enumerate(boot_order, 1):
try:
dev_map[dev_xml_id].boot.order = boot_idx