mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-21 21:13:53 +01:00
got rid of monitor
This commit is contained in:
parent
7843b30ff2
commit
03128cadf6
@ -38,7 +38,6 @@ public class VirtualMachineTO {
|
||||
String bootArgs;
|
||||
String[] bootupScripts;
|
||||
boolean rebootOnCrash;
|
||||
Monitor monitor;
|
||||
|
||||
VolumeTO[] disks;
|
||||
NicTO[] nics;
|
||||
@ -70,14 +69,6 @@ public class VirtualMachineTO {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Monitor getMonitor() {
|
||||
return monitor;
|
||||
}
|
||||
|
||||
public void setMonitor(Monitor monitor) {
|
||||
this.monitor = monitor;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@ -187,26 +178,4 @@ public class VirtualMachineTO {
|
||||
public void setNics(NicTO[] nics) {
|
||||
this.nics = nics;
|
||||
}
|
||||
|
||||
public static interface Monitor {
|
||||
|
||||
}
|
||||
|
||||
public static class SshMonitor implements Monitor {
|
||||
String ip;
|
||||
int port;
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public int getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public SshMonitor(String ip, int port) {
|
||||
this.ip = ip;
|
||||
this.port = port;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,8 +148,6 @@ import com.cloud.agent.api.to.NicTO;
|
||||
import com.cloud.agent.api.to.PortForwardingRuleTO;
|
||||
import com.cloud.agent.api.to.StorageFilerTO;
|
||||
import com.cloud.agent.api.to.VirtualMachineTO;
|
||||
import com.cloud.agent.api.to.VirtualMachineTO.Monitor;
|
||||
import com.cloud.agent.api.to.VirtualMachineTO.SshMonitor;
|
||||
import com.cloud.agent.api.to.VolumeTO;
|
||||
import com.cloud.dc.Vlan;
|
||||
import com.cloud.exception.InternalErrorException;
|
||||
@ -829,25 +827,6 @@ public abstract class CitrixResourceBase implements ServerResource {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Monitor monitor = vmSpec.getMonitor();
|
||||
if (monitor != null && monitor instanceof SshMonitor) {
|
||||
SshMonitor sshMon = (SshMonitor)monitor;
|
||||
String privateIp = sshMon.getIp();
|
||||
int cmdPort = sshMon.getPort();
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Ping command port, " + privateIp + ":" + cmdPort);
|
||||
}
|
||||
|
||||
String result = connect(conn, vmName, privateIp, cmdPort);
|
||||
if (result != null) {
|
||||
throw new CloudRuntimeException("Can not ping System vm " + vmName + "due to:" + result);
|
||||
}
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Ping command port succeeded for vm " + vmName);
|
||||
}
|
||||
}
|
||||
|
||||
state = State.Running;
|
||||
return new StartAnswer(cmd);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user