On 08/19/2014 10:41 PM, Royce Lv wrote:
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(a)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.
Easy enough! Please see and review (and provide translations for!)
[PATCH 0/2] Warn before Power Off non-persistent VM
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>
Thanks!
- Christy