Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say it is cleaner to move this to line 1545 as

Suggested change
throw new InvalidParameterValueException("UpdateVmNicIpCmd is not supported in L2 network");
if(! Network.GuestType.Isolated.equals(network.getGuestType()) {
throw new InvalidParameterValueException("UpdateVmNicIpCmd is only supported in GUEST networks");
}

#nitpicking

}

s_logger.debug("Updating IPv4 address of NIC " + nicVO + " to " + ipaddr + "/" + nicVO.getIPv4Netmask() + " with gateway " + nicVO.getIPv4Gateway());
Expand Down