Re: [PATCH] Change target value of disk when defining it

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

 



On 02/01/2012 12:13 AM, Cole Robinson wrote:
On 01/30/2012 09:58 PM, Guannan Ren wrote:
---
  src/virtManager/domain.py |    8 +++++++-
  1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index c27e0b5..f16036e 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -584,7 +584,13 @@ class vmmDomain(vmmLibvirtObject):
              if editdev.bus != newval:
                  # Old<address>  probably isn't applicable for new bus value
                  editdev.address.clear()
-                # XXX: Need to change target value as well?
+                used = []
+                disks = (self.get_disk_devices() +
+                         self.get_disk_devices(inactive=True))
+                for d in disks:
+                    used.append(d.target)
+
+                editdev.generate_target(used)

              editdev.bus = newval
          return self._redefine_device(change, devobj)
Thanks for the patch, but as similar change is upstream as of a few days ago:

http://git.fedorahosted.org/git/?p=virt-manager.git;a=commit;h=18f68bb5817aa62d12868e0c3991f0c531ddccbf

Thanks,
Cole

    Saw your patch, better than mine.
    Thanks for the review.

    Guannan Ren


[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