weizhouapache commented on a change in pull request #4141:
URL: https://github.com/apache/cloudstack/pull/4141#discussion_r668882005



##########
File path: server/src/main/java/com/cloud/api/ApiResponseHelper.java
##########
@@ -1040,6 +1043,78 @@ public LoadBalancerResponse 
createLoadBalancerResponse(LoadBalancer loadBalancer
         return lbResponse;
     }
 
+    @Override
+    public LoadBalancerConfigResponse 
createLoadBalancerConfigResponse(LoadBalancerConfig config) {
+        Network network = null;
+        Vpc vpc = null;
+        LoadBalancer lb = null;
+        if (config.getNetworkId() != null) {
+            network = ApiDBUtils.findNetworkById(config.getNetworkId());
+        }
+        if (config.getVpcId() != null) {
+            vpc = ApiDBUtils.findVpcById(config.getVpcId());
+        }
+        if (config.getLoadBalancerId() != null) {
+            lb = ApiDBUtils.findLoadBalancerById(config.getLoadBalancerId());
+        }
+        return setLoadBalancerConfigResponse(network, vpc, lb, config);
+    }
+
+    @Override
+    public List<LoadBalancerConfigResponse> 
createLoadBalancerConfigResponse(List<? extends LoadBalancerConfig> configs) {
+        List<LoadBalancerConfigResponse> lbConfigResponses = new 
ArrayList<LoadBalancerConfigResponse>();
+        if (configs == null || configs.size() == 0) {

Review comment:
       @soreana use CollectionUtils, not ArrayUtils




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