use of com.cloud.host.Status in project cloudstack by apache.
the class CheckOnHostCommandTest method testGetState.
@Test
public void testGetState() {
Status s = host.getState();
assertTrue(s == Status.Up);
}
use of com.cloud.host.Status in project cloudstack by apache.
the class CheckOnHostCommandTest method testGetStatus.
@Test
public void testGetStatus() {
Status s = host.getStatus();
assertTrue(s == Status.Up);
}
use of com.cloud.host.Status in project cloudstack by apache.
the class HighAvailabilityManagerImpl method investigate.
@Override
public Status investigate(final long hostId) {
final HostVO host = _hostDao.findById(hostId);
if (host == null) {
return Status.Alert;
}
Status hostState = null;
for (Investigator investigator : investigators) {
hostState = investigator.isAgentAlive(host);
if (hostState != null) {
if (s_logger.isDebugEnabled()) {
s_logger.debug(investigator.getName() + " was able to determine host " + hostId + " is in " + hostState.toString());
}
return hostState;
}
if (s_logger.isDebugEnabled()) {
s_logger.debug(investigator.getName() + " unable to determine the state of the host. Moving on.");
}
}
return hostState;
}
Aggregations