sudo87 commented on code in PR #13325:
URL: https://github.com/apache/cloudstack/pull/13325#discussion_r4376856093


##########
server/src/main/java/com/cloud/api/ApiResponseHelper.java:
##########
@@ -3610,6 +3621,9 @@ public VpcResponse createVpcResponse(ResponseView view, 
Vpc vpc) {
             response.setVpcOfferingName(voff.getName());
             response.setVpcOfferingConserveMode(voff.isConserveMode());
         }
+        VpcDetailVO publicNetworkRateDetail = 
vpcDetailsDao.findDetail(vpc.getId(), ApiConstants.PUBLIC_NETWORK_RATE);
+        Integer publicNetworkRate = publicNetworkRateDetail != null ? 
NumberUtils.toInt(publicNetworkRateDetail.getValue(), -1) : null;
+        response.setPublicNetworkRate((publicNetworkRate == null || 
publicNetworkRate <= 0) ? -1 : publicNetworkRate);

Review Comment:
   Same point as the network one. It’s a single indexed lookup per VPC, like 
the other per-row lookups here. Batching belongs in a separate refactor.



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