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


##########
server/src/main/java/com/cloud/network/IpAddressManagerImpl.java:
##########
@@ -810,6 +800,10 @@ public PublicIp fetchNewPublicIp(final long dcId, final 
Long podId, final List<L
                     throws InsufficientAddressCapacityException {
         List<IPAddressVO> addrs = listAvailablePublicIps(dcId, podId, 
vlanDbIds, owner, vlanUse, guestNetworkId, sourceNat, assign, allocate, 
requestedIp, requestedGateway, isSystem, vpcId, displayIp, forSystemVms, true);
         IPAddressVO addr = addrs.get(0);
+        if (assign) {
+            addr = assignAndAllocateIpAddressEntry(owner, vlanUse, 
guestNetworkId, sourceNat, allocate,
+                    isSystem,vpcId, displayIp, addrs);
+        }

Review Comment:
   can be extracted



##########
server/src/main/java/com/cloud/network/IpAddressManagerImpl.java:
##########
@@ -821,128 +815,99 @@ public PublicIp fetchNewPublicIp(final long dcId, final 
Long podId, final List<L
     public List<IPAddressVO> listAvailablePublicIps(final long dcId, final 
Long podId, final List<Long> vlanDbIds, final Account owner, final VlanType 
vlanUse, final Long guestNetworkId,

Review Comment:
   this method is more than a hundred lines. I think we must modularize it a 
bit more.



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