Skip to content

Commit cb1bbd4

Browse files
committed
add a public.ip option in console-proxy agent.properties
1 parent 9db2925 commit cb1bbd4

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
8282
String _localgw;
8383
String _eth1ip;
8484
String _eth1mask;
85+
String _pubIp;
8586

8687
@Override
8788
public Answer executeRequest(final Command cmd) {
@@ -158,6 +159,8 @@ public Type getType() {
158159
fillNetworkInformation(cmd);
159160
cmd.setProxyPort(_proxyPort);
160161
cmd.setProxyVmId(_proxyVmId);
162+
if(_pubIp != null)
163+
cmd.setPublicIpAddress(_pubIp);
161164
return new StartupCommand[] {cmd};
162165
}
163166

@@ -222,6 +225,8 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
222225
}
223226
}
224227

228+
_pubIp = (String)params.get("public.ip");
229+
225230
if(s_logger.isInfoEnabled())
226231
s_logger.info("Receive proxyVmId in ConsoleProxyResource configuration as " + _proxyVmId);
227232

‎console-proxy/conf.dom0/agent.properties.in‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
instance=ConsoleProxy
44
consoleproxy.httpListenPort=8002
5+
public.ip=65.19.181.3
56

67
#resource= the java class, which agent load to execute
78
resource=com.cloud.agent.resource.consoleproxy.ConsoleProxyResource

0 commit comments

Comments
 (0)