Pearl1594 commented on code in PR #10834:
URL: https://github.com/apache/cloudstack/pull/10834#discussion_r2079515628
##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -7594,6 +7595,11 @@ protected void
executeStepsToChangeOwnershipOfVm(AssignVMCmd cmd, Account caller
try {
updateVmNetwork(cmd, caller, vm, newAccount, template);
} catch (InsufficientCapacityException | ResourceAllocationException
e) {
+ List<NetworkVO> networkVOS =
_networkDao.listByAccountIdNetworkName(newAccountId,
newAccount.getAccountName() + "-network");
+ if (networkVOS.size() == 1) {
+ _networkDao.remove(networkVOS.get(0).getId());
+ }
Review Comment:
It's not ready for review - stil working on a way to see if the network was
created during the assignVM operation and only then remove it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]