sureshanaparti commented on a change in pull request #4503:
URL: https://github.com/apache/cloudstack/pull/4503#discussion_r531530078
##########
File path:
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
##########
@@ -640,6 +640,19 @@ protected NetworkOrchestrator() {
setStateMachine();
}
+ private void updateNetworkDetails(NetworkVO networkPersisted, Network
network) {
+ NetworkDetailVO networkDetailVO = null;
+ if (isNotBlank(network.getRouterIp())) {
+ networkDetailVO = new NetworkDetailVO(networkPersisted.getId(),
ApiConstants.ROUTER_IP, network.getRouterIp().toString(), true);
+ }
+ if (isNotBlank(network.getRouterIpv6())) {
+ networkDetailVO = new NetworkDetailVO(networkPersisted.getId(),
ApiConstants.ROUTER_IPV6, network.getRouterIpv6().toString(), true);
Review comment:
this will override the above _networkDetailVO_ , as per the code when
both are not blank and always the latest one is persisted. Either keep if-else
for IPv4 & IPv6, or move the network details persist to respective if block.
----------------------------------------------------------------
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]