Fixed listAutoScaleVmGroups: used to return incorrect value in lbruleid field (wrong parameter was used when search in firewall_rules table - profileId instead of lbRuleId)

This commit is contained in:
Alena Prokharchyk 2014-01-30 15:40:32 -08:00
parent e8438f1b6d
commit 48361d8a8b
1 changed files with 2 additions and 3 deletions

View File

@ -30,8 +30,6 @@ import java.util.TimeZone;
import javax.inject.Inject;
import org.apache.log4j.Logger;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.acl.ControlledEntity.ACLType;
import org.apache.cloudstack.affinity.AffinityGroup;
@ -147,6 +145,7 @@ import org.apache.cloudstack.region.Region;
import org.apache.cloudstack.usage.Usage;
import org.apache.cloudstack.usage.UsageService;
import org.apache.cloudstack.usage.UsageTypes;
import org.apache.log4j.Logger;
import com.cloud.api.query.ViewResponseHelper;
import com.cloud.api.query.vo.AccountJoinVO;
@ -2968,7 +2967,7 @@ public class ApiResponseHelper implements ResponseGenerator {
if (profile != null) {
response.setProfileId(profile.getUuid());
}
FirewallRuleVO fw = ApiDBUtils.findFirewallRuleById(vmGroup.getProfileId());
FirewallRuleVO fw = ApiDBUtils.findFirewallRuleById(vmGroup.getLoadBalancerId());
if (fw != null) {
response.setLoadBalancerId(fw.getUuid());
}