mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-4428: UI > volume > take snapshot action, recurring snapshot action > for volumes whose hypervisor is KVM and whose VM is not Running, always show the 2 actions regardless value of "kvm.snapshot.enabled".
This commit is contained in:
parent
2145505d30
commit
8ce6d5271c
@ -1896,14 +1896,15 @@
|
||||
|
||||
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
|
||||
if (jsonObj.hypervisor == 'KVM') {
|
||||
if (g_KVMsnapshotenabled == true) {
|
||||
if (json.vmstate == 'Running') {
|
||||
if (g_KVMsnapshotenabled == true) { //"kvm.snapshot.enabled" flag should be taken to account only when snapshot is being created for Running vm (CLOUDSTACK-4428)
|
||||
allowedActions.push("takeSnapshot");
|
||||
allowedActions.push("recurringSnapshot");
|
||||
}
|
||||
} else {
|
||||
allowedActions.push("takeSnapshot");
|
||||
allowedActions.push("recurringSnapshot");
|
||||
} else {
|
||||
if(jsonObj.vmstate == 'Stopped' || jsonObj.virtualmachineid == undefined) { //volume of stopped VM, or detached volume
|
||||
allowedActions.push("takeSnapshot");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
allowedActions.push("takeSnapshot");
|
||||
allowedActions.push("recurringSnapshot");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user