use of org.ovirt.engine.core.vdsbroker.VdsManager in project ovirt-engine by oVirt.
the class CertificationValidityChecker method checkHostCertificateValidity.
private void checkHostCertificateValidity(VDS host) {
VdsManager hostManager = resourceManager.getVdsManager(host.getId());
List<Certificate> peerCertificates = hostManager.getVdsProxy().getPeerCertificates();
if (peerCertificates == null || peerCertificates.isEmpty()) {
log.error("Failed to retrieve peer certifications for host '{}'", host.getName());
} else {
checkCertificate((X509Certificate) peerCertificates.get(0), AuditLogType.HOST_CERTIFICATION_HAS_EXPIRED, AuditLogType.HOST_CERTIFICATION_IS_ABOUT_TO_EXPIRE_ALERT, AuditLogType.HOST_CERTIFICATION_IS_ABOUT_TO_EXPIRE, host);
}
}
Aggregations