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

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

 



On 05/23/2012 04:05 AM, Qing Lin wrote:
> 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@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>
> ---
>  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)
>  

Sorry for being slow to respond, I'll be quicker going forward.

Can you give an example of where the current code is failing, and what case
this fixes for you? Before and after XML would help.

Thanks,
Cole


[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