[virt-tools-list] [virt-manager PATCH v2 3/3] addhardware: enable setting model when adding controller
Cole Robinson
crobinso at redhat.com
Mon May 5 17:00:51 UTC 2014
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 at cn.fujitsu.com>
>>> ---
>>> 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
More information about the virt-tools-list
mailing list