DaanHoogland commented on a change in pull request #3680: [WIP: DO NOT MERGE] 
CloudStack Kubernetes Service
URL: https://github.com/apache/cloudstack/pull/3680#discussion_r365791009
 
 

 ##########
 File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
 ##########
 @@ -694,9 +694,23 @@ public PublicIp assignPublicIpAddressFromVlans(long dcId, 
Long podId, Account ow
         return fetchNewPublicIp(dcId, podId, vlanDbIds, owner, type, 
networkId, false, true, requestedIp, isSystem, null, null, false);
     }
 
+    @Override
+    public PublicIp getAvailablePublicIpAddressFromVlans(long dcId, Long 
podId, Account owner, VlanType type, List<Long> vlanDbIds, Long networkId, 
String requestedIp, boolean isSystem)
+            throws InsufficientAddressCapacityException {
+        return fetchNewPublicIp(dcId, podId, vlanDbIds, owner, type, 
networkId, false, false, false, requestedIp, isSystem, null, null, false);
+    }
+
+    @DB
+    public PublicIp fetchNewPublicIp(final long dcId, final Long podId, final 
List<Long> vlanDbIds, final Account owner, final VlanType vlanUse, final Long 
guestNetworkId,
+                                     final boolean sourceNat, final boolean 
allocate, final String requestedIp, final boolean isSystem, final Long vpcId, 
final Boolean displayIp, final boolean forSystemVms)
+            throws InsufficientAddressCapacityException {
+        return fetchNewPublicIp(dcId, podId, vlanDbIds, owner, vlanUse, 
guestNetworkId,
+                sourceNat, true, allocate, requestedIp, isSystem, vpcId, 
displayIp, forSystemVms);
+    }
+
     @DB
     public PublicIp fetchNewPublicIp(final long dcId, final Long podId, final 
List<Long> vlanDbIds, final Account owner, final VlanType vlanUse, final Long 
guestNetworkId,
 
 Review comment:
   the old fetchNewPublicIp(...) was from 697 to 877
   the new fetchNewPublicIp(...) is from 711 to 895
   Can you please factor out the pieces that you addressed and put them in 
methods with clear names, so not even comment on what you do is needed? 
relevant changes are between 824 and 885, sugest you turn it into multiple 
calls.

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

Reply via email to