mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: add possibility to scale vm to current customer offerings (#4622)
We can use cloudmonkey to scale a vm with dynamic offering, to same offering but with different cpunumber or memory. Enable it on UI to improve user experience.
This commit is contained in:
parent
1913c6854e
commit
a44fb11a02
@ -2820,7 +2820,9 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
|
||||
_accountMgr.checkAccess(caller, null, true, vmInstance);
|
||||
|
||||
currentVmOffering = _srvOfferingDao.findByIdIncludingRemoved(vmInstance.getId(), vmInstance.getServiceOfferingId());
|
||||
sc.addAnd("id", SearchCriteria.Op.NEQ, currentVmOffering.getId());
|
||||
if (! currentVmOffering.isDynamic()) {
|
||||
sc.addAnd("id", SearchCriteria.Op.NEQ, currentVmOffering.getId());
|
||||
}
|
||||
|
||||
// 1. Only return offerings with the same storage type
|
||||
sc.addAnd("useLocalStorage", SearchCriteria.Op.EQ, currentVmOffering.isUseLocalStorage());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user