[virt-tools-list] [PATCH] virt-manager:Valid address type change in network device

Qing Lin qinglbj at linux.vnet.ibm.com
Wed May 23 08:05:17 UTC 2012


Function set_address(addr) will only change the value of
VirtualDeviceAddress._type,doesn't map change in xml.So,
it will cause change lost problem.Using assignment statements
will not only change the value of VirtualDeviceAddress._type
but also change the xml.

Signed-off-by: Qing Lin <qinglbj at linux.vnet.ibm.com>
Signed-off-by: Li Zhang <zhlcindy at linux.vnet.ibm.com>
---
 src/virtManager/domain.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index b547f91..893c5df 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -626,7 +626,7 @@ class vmmDomain(vmmLibvirtObject):
         def change(editdev):
             if editdev.model != newmodel:
                 editdev.address.clear()
-                editdev.set_address(addr)
+                editdev.address.type = addr
             editdev.model = newmodel
         return self._redefine_device(change, devobj)
 
-- 
1.7.4.1




More information about the virt-tools-list mailing list