[Kimchi-devel] [PATCH 1/2] Add Power-Off warning for non-persistent guests

Royce Lv lvroyce at linux.vnet.ibm.com
Wed Aug 20 03:41:07 UTC 2014


On 2014年08月20日 02:54, Crístian Viana wrote:
> On 19-08-2014 15:32, Christy Perez wrote:
>> If a user is managing guests created outside kimchi, and tries
>> to Power Off a guest that is non-persistent, the guest will be deleted.
>> Kimchi calls destroy for Power Off, which is destructive for
>> non-persistent guests. This warning message makes users aware
>> of that.
>>
>> Signed-off-by: Christy Perez <christy at linux.vnet.ibm.com>
>
> Even though this requires a little more coding, IMO it would be better 
> to display that message only if the guest being stopped is actually 
> non-persistent.
>
> Something like:
>
> if (dom.isPersistent()) {
> alert("Stopping this non-persistent guest will destroy it. Do you want 
> to continue?")
> } else {
> alert("This action may produce undesirable results. Do you want to 
> continue?")
> }
>
> I didn't find a way to read a guest's persistent state using the 
> current Kimchi REST API, so maybe we'd need to add that field to the 
> "/vms/<vm-name>" result.
>
> I mean, that popup dialog is making the user think whether the guest 
> is persistent or not, but the system itself can tell that.
Good point! I agree with adding a field to track if dom is persistent as 
we did for network.
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list