MitchDrage commented on code in PR #14249:
URL: https://github.com/apache/cloudstack/pull/14249#discussion_r4176235916
##########
server/src/main/java/com/cloud/api/ApiResponseHelper.java:
##########
@@ -1235,9 +1235,9 @@ private void setVpcIdInResponse(Long vpcId,
Consumer<String> vpcUuidSetter, Cons
}
}
- private void showVmInfoForSharedNetworks(boolean forVirtualNetworks,
IpAddress ipAddr, IPAddressResponse ipResponse) {
+ protected void showVmInfoForSharedNetworks(boolean forVirtualNetworks,
IpAddress ipAddr, IPAddressResponse ipResponse) {
if (!forVirtualNetworks) {
- NicVO nic =
ApiDBUtils.findByIp4AddressAndNetworkId(ipAddr.getAddress().toString(),
ipAddr.getNetworkId());
+ NicVO nic =
ApiDBUtils.findNonPlaceHolderByIp4AddressAndNetworkId(ipAddr.getAddress().toString(),
ipAddr.getNetworkId());
Review Comment:
Good pickup. Yes, that was a miss on my part.
I've reverted the lines that you highlighted and handled that case in the
router branch, with a test for when only the placeholder is left.
Also added some comments for posterity, as the DB lookup can return either
the router's NIC or its placeholder.
--
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]