sureshanaparti commented on code in PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#discussion_r1553605762
##########
server/src/main/java/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java:
##########
@@ -522,12 +528,32 @@ public boolean finalizeCommandsOnStart(final Commands
cmds, final VirtualMachine
cmds.addCommand(finishCmd);
}
+ createApplyLoadBalancingRulesCommandsForVpc(cmds, domainRouterVO,
provider, guestNics);
+
// Add network usage commands
cmds.addCommands(usageCmds);
}
return true;
}
+ private void createApplyLoadBalancingRulesCommandsForVpc(final Commands
cmds, DomainRouterVO domainRouterVO, Provider provider,
+ List<Pair<Nic,
Network>> guestNics) {
+ final List<LoadBalancerVO> lbs =
loadBalancerDao.listByVpcIdAndScheme(domainRouterVO.getVpcId(), Scheme.Public);
+ final List<LoadBalancingRule> lbRules = new ArrayList<>();
+ createLoadBalancingRulesList(lbRules, lbs);
+ s_logger.debug("Found " + lbRules.size() + " load balancing rule(s) to
apply as a part of VPC VR " + domainRouterVO + " start.");
+ if (!lbRules.isEmpty()) {
Review Comment:
```suggestion
if (lbRules.isEmpty()) {
return;
}
```
--
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]