add a public.ip option in console-proxy agent.properties

This commit is contained in:
edison 2010-08-28 13:29:03 -07:00
parent 9db2925b77
commit cb1bbd49e4
2 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
String _localgw;
String _eth1ip;
String _eth1mask;
String _pubIp;
@Override
public Answer executeRequest(final Command cmd) {
@ -158,6 +159,8 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
fillNetworkInformation(cmd);
cmd.setProxyPort(_proxyPort);
cmd.setProxyVmId(_proxyVmId);
if(_pubIp != null)
cmd.setPublicIpAddress(_pubIp);
return new StartupCommand[] {cmd};
}
@ -222,6 +225,8 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
}
}
_pubIp = (String)params.get("public.ip");
if(s_logger.isInfoEnabled())
s_logger.info("Receive proxyVmId in ConsoleProxyResource configuration as " + _proxyVmId);

View File

@ -2,6 +2,7 @@
instance=ConsoleProxy
consoleproxy.httpListenPort=8002
public.ip=65.19.181.3
#resource= the java class, which agent load to execute
resource=com.cloud.agent.resource.consoleproxy.ConsoleProxyResource