DaanHoogland commented on code in PR #8621:
URL: https://github.com/apache/cloudstack/pull/8621#discussion_r1481730971


##########
server/src/main/java/com/cloud/network/NetworkModelImpl.java:
##########
@@ -2723,6 +2733,12 @@ public Pair<String, String> getNetworkIp6Dns(final 
Network network, final DataCe
         if (StringUtils.isNotBlank(network.getIp6Dns1())) {
             return new Pair<>(network.getIp6Dns1(), network.getIp6Dns2());
         }
+        if (network.getVpcId() != null) {
+            Vpc vpc = vpcDao.findById(network.getVpcId());
+            if (vpc != null && StringUtils.isNotBlank(vpc.getIp6Dns1())) {
+                return new Pair<>(vpc.getIp6Dns1(), vpc.getIp6Dns2());
+            }
+        }

Review Comment:
   this block is implemented twice. can you extract to a method?



-- 
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]

Reply via email to