S2S VPN: Fix CheckS2SVpnConnectionsCommand on VMware

This commit is contained in:
Sheng Yang 2012-08-23 18:30:31 -07:00
parent a08ae8e42c
commit 1289b947f9
1 changed files with 6 additions and 2 deletions

View File

@ -1602,8 +1602,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
try {
VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
String controlIp = getRouterSshControlIp(cmd);
result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null,
"/opt/cloud/bin/checkbatchs2svpn.sh ");
String cmdline = "/opt/cloud/bin/checkbatchs2svpn.sh ";
for (String ip : cmd.getVpnIps()) {
cmdline += " " + ip;
}
result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, cmdline);
if (!result.first()) {
s_logger.error("check site-to-site vpn connections command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second());