GutoVeronezi commented on code in PR #6357:
URL: https://github.com/apache/cloudstack/pull/6357#discussion_r870653194
##########
server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java:
##########
@@ -2231,11 +2235,21 @@ public Pair<List<? extends UserVm>, List<String>>
listLoadBalancerInstances(List
continue;
}
+ String userVmAsString =
ReflectionToStringBuilderUtils.reflectOnlySelectedFields(userVm, "uuid",
"name");
Review Comment:
As `UserVmVO` extends `VMInstanceVO` and `VMInstanceVO` has an
implementation of `toString`, we could use it instead of the
`ReflectionToStringBuilderUtils.reflectOnlySelectedFields`.
##########
server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java:
##########
@@ -2189,13 +2190,16 @@ public Pair<List<? extends UserVm>, List<String>>
listLoadBalancerInstances(List
Boolean applied = cmd.isApplied();
if (applied == null) {
+ s_logger.debug(String.format("The [%s] parameter was not passed.
Using the default value [%s].", ApiConstants.APPLIED, Boolean.TRUE));
applied = Boolean.TRUE;
}
LoadBalancerVO loadBalancer = _lbDao.findById(loadBalancerId);
if (loadBalancer == null) {
+ s_logger.warn(String.format("Unable to find the load balancer with
ID [%s].", cmd.getId()));
return null;
}
+ String loadBalancerAsString =
ReflectionToStringBuilderUtils.reflectOnlySelectedFields(loadBalancer, "uuid",
"name");
Review Comment:
We could implement `toString` of `LoadBalancerVO`. This way we can call
`toString` instead of repeating the same code wherever it is used.
--
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]