Re: [virt-manager PATCH v2 3/3] addhardware: enable setting model when adding controller

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

 




> -----Original Message-----
> From: Cole Robinson [mailto:crobinso@xxxxxxxxxx]
> Sent: Tuesday, May 06, 2014 1:01 AM
> To: Chen Hanxiao; Chen, Hanxiao/陈 晗霄; virt-tools-list@xxxxxxxxxx
> Subject: Re:  [virt-manager PATCH v2 3/3] addhardware: enable
> setting model when adding controller
> 
> On 05/05/2014 11:17 AM, Chen Hanxiao wrote:
> >
> > On 04/24/2014 11:26 PM, Cole Robinson wrote:
> >> On 04/23/2014 06:23 AM, Chen Hanxiao wrote:
> >>> If no USB controller, we could add a new one;
> >>> if had, disable 'create-finish' button and
> >>> add a tooltip beside type combo.
> >>>
> >>> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
> >>> ---
> >>>   ui/addhardware.ui          | 22 ++++++++++++++++++---
> >>>   virtManager/addhardware.py | 48
> >>> +++++++++++++++++++++++++++++++++++-----------
> >>>   2 files changed, 56 insertions(+), 14 deletions(-)
> >>>
> >> Calling add_device during validation is not okay, since this will actually
> >> attempt to alter the VM. We need to make self._dev a list in this case
> >> containing all the devices we want to add, and only then do it during
> >> add_device. We also need to avoid hotplug in that case since we can't hotplug
> >> multiple devices at once.
> > Do we really need to support adding multiple devices in add_device?
> > Or something like:
> > for dev in self._dev:
> >     add_device()
> >
> > In this USB controller case, we could just modify the USB controller model
> > of 'none' to some other type, then our existed codes could do the rest things.
> >
> 
> My suggestion isn't the only way to implement it for sure. But the point is
> that we can't make any VM changes until the user hits 'finish'. That's the
> important point.
> 
> - Cole

Thanks, I'll take those changing VM code out of validate function and try.

-Chen

_______________________________________________
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