[Kimchi-devel] [PATCH 1/2] Add Power-Off warning for non-persistent guests
Crístian Viana
vianac at linux.vnet.ibm.com
Tue Aug 19 18:54:44 UTC 2014
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.
More information about the Kimchi-devel
mailing list