Skip to content

Commit a44fb11

Browse files
authored
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.
1 parent 1913c68 commit a44fb11

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

server/src/main/java/com/cloud/api/query/QueryManagerImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2820,7 +2820,9 @@ private Pair<List<ServiceOfferingJoinVO>, Integer> searchForServiceOfferingsInte
28202820
_accountMgr.checkAccess(caller, null, true, vmInstance);
28212821

28222822
currentVmOffering = _srvOfferingDao.findByIdIncludingRemoved(vmInstance.getId(), vmInstance.getServiceOfferingId());
2823-
sc.addAnd("id", SearchCriteria.Op.NEQ, currentVmOffering.getId());
2823+
if (! currentVmOffering.isDynamic()) {
2824+
sc.addAnd("id", SearchCriteria.Op.NEQ, currentVmOffering.getId());
2825+
}
28242826

28252827
// 1. Only return offerings with the same storage type
28262828
sc.addAnd("useLocalStorage", SearchCriteria.Op.EQ, currentVmOffering.isUseLocalStorage());

0 commit comments

Comments
 (0)