[virt-manager PATCH] controller: don't set default controller index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Libvirt is able to figure this out and it will make usage of the CLI
options more user-friendly.

For example if users wants to add a new pcie-root-port to existing VM
they have to figure out the latest controller index and call it like
this:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port,index=$nextIndex \
        $VM

After this change it will be simply:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port \
        $VM

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 virtinst/devices/controller.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/virtinst/devices/controller.py b/virtinst/devices/controller.py
index 114d8b39..22e1311f 100644
--- a/virtinst/devices/controller.py
+++ b/virtinst/devices/controller.py
@@ -77,12 +77,3 @@ class DeviceController(Device):
     driver_queues = XMLProperty("./driver/@queues", is_int=True)
 
     master_startport = XMLProperty("./master/@startport", is_int=True)
-
-
-    ##################
-    # Default config #
-    ##################
-
-    def set_defaults(self, _guest):
-        if self.index is None:
-            self.index = 0
-- 
2.23.0

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux