DaanHoogland commented on a change in pull request #3847: VR: Fix Redundant
VRouter guest network on wrong interface
URL: https://github.com/apache/cloudstack/pull/3847#discussion_r372329467
##########
File path:
server/src/main/java/com/cloud/network/router/CommandSetupHelper.java
##########
@@ -670,7 +670,20 @@ public void createVpcAssociatePublicIPCommands(final
VirtualRouter router, final
vlanIpMap.put(vlanTag, ipList);
}
+ Long guestNetworkId = null;
+ final List<NicVO> nics = _nicDao.listByVmId(router.getId());
+ for (final NicVO nic : nics) {
+ final NetworkVO nw = _networkDao.findById(nic.getNetworkId());
+ if (nw.getTrafficType() == TrafficType.Guest) {
+ guestNetworkId = nw.getId();
+ break;
+ }
+ }
+
+ Map<String, Boolean> vlanLastIp = getVlanLastIpMap(router.getVpcId(),
guestNetworkId);
+
Review comment:
could this be a aeparate method? getVlanLastIpMapForGuestNetwork();?
and than later
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services