Use the newly introduced method `reorder_boot_order` for setting
the boot index of a device. This ensures that all other boot order
values of domain guest definition are adjusted accordingly.

Signed-off-by: Marc Hartmayer <[email protected]>
Reviewed-by: Boris Fiuczynski <[email protected]>
---
 virtinst/cli.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtinst/cli.py b/virtinst/cli.py
index e483905524b4..739c486b9011 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -2212,7 +2212,7 @@ def _add_device_boot_order_arg(cls):
         if not 
guest.conn.check_support(support.SUPPORT_CONN_DEVICE_BOOT_ORDER):
             raise NotImplementedError('Device boot order isn\'t supported by 
the connection')
 
-        inst.boot.order = val
+        guest.reorder_boot_order(inst, val)
     cls.set_boot_order_cb = set_boot_order_cb
     cls.add_arg("boot.order", "boot_order", cb=cls.set_boot_order_cb)
 
-- 
2.17.0

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to