bug 11072: icky icky icky

This commit is contained in:
Chiradeep Vittal 2011-08-10 20:39:37 -07:00
parent 25407543b0
commit 375da4da1a
2 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import com.cloud.agent.api.to.LoadBalancerTO;
*/
public class LoadBalancerConfigCommand extends NetworkElementCommand {
LoadBalancerTO[] loadBalancers;
public String lbStatsVisibility;
public String lbStatsVisibility = "guest-network";
public String lbStatsIp; /* load balancer listen on this ip for stats */
public String lbStatsPort = "8081"; /*load balancer listen on this port for stats */
public String lbStatsSrcCidrs = "0/0" ; /* TODO : currently there is no filtering based on the source ip */

View File

@ -293,6 +293,12 @@ public class ElasticLoadBalancerManagerImpl implements
elbVm.getPrivateIpAddress());
cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,
elbVm.getInstanceName());
//FIXME: why are we setting attributes directly? Ick!! There should be accessors and
//the constructor should set defaults.
cmd.lbStatsVisibility = _configDao.getValue(Config.NetworkLBHaproxyStatsVisbility.key());
cmd.lbStatsUri = _configDao.getValue(Config.NetworkLBHaproxyStatsUri.key());
cmd.lbStatsAuth = _configDao.getValue(Config.NetworkLBHaproxyStatsAuth.key());
cmd.lbStatsPort = _configDao.getValue(Config.NetworkLBHaproxyStatsPort.key());
cmds.addCommand(cmd);
}