You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/01/29 14:09:26 UTC
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4625: server: throw exception when update vm nic on L2 network
DaanHoogland commented on a change in pull request #4625:
URL: https://github.com/apache/cloudstack/pull/4625#discussion_r566845488
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -1648,8 +1648,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
return null;
}
} else {
- s_logger.error("UpdateVmNicIpCmd is not supported in this network...");
- return null;
+ throw new InvalidParameterValueException("UpdateVmNicIpCmd is not supported in L2 network");
Review comment:
I'd say it is cleaner to move this to line 1545 as
```suggestion
if(! Network.GuestType.Isolated.equals(network.getGuestType()) {
throw new InvalidParameterValueException("UpdateVmNicIpCmd is only supported in GUEST networks");
}
```
#nitpicking
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org