use of com.cloud.agent.api.PingNuageVspCommand in project cloudstack by apache.
the class NuageVspResource method getCurrentStatus.
@Override
public PingCommand getCurrentStatus(long id) {
if (Strings.isNullOrEmpty(_vspHost.getRestRelativePath())) {
s_logger.error("Refusing to ping Nuage VSD because the resource configuration is missing the relative path information");
_shouldAudit = true;
return null;
}
if (Strings.isNullOrEmpty(_vspHost.getCmsUserLogin()) || Strings.isNullOrEmpty(_vspHost.getCmsUserPassword())) {
s_logger.error("Refusing to ping Nuage VSD because the resource configuration is missing the CMS user information");
_shouldAudit = true;
return null;
}
try {
login();
} catch (ExecutionException | ConfigurationException e) {
s_logger.error("Failed to ping to Nuage VSD on " + _name + " as user " + _vspHost.getCmsUserLogin(), e);
_shouldAudit = true;
return null;
}
PingNuageVspCommand pingNuageVspCommand = new PingNuageVspCommand(Host.Type.L2Networking, id, _shouldAudit);
_shouldAudit = false;
return pingNuageVspCommand;
}
Aggregations