use of org.ovirt.engine.core.bll.attestationbroker.AttestThread in project ovirt-engine by oVirt.
the class Backend method initAttestation.
private void initAttestation() {
List<Cluster> clusters = clusterDao.getTrustedClusters();
List<VDS> trustedVdsList = new ArrayList<>();
List<String> trustedVdsNames = new ArrayList<>();
if (clusters == null || clusters.size() == 0) {
return;
}
for (Cluster cluster : clusters) {
List<VDS> hostsInCluster = vdsDao.getAllForClusterWithStatus(cluster.getId(), VDSStatus.Up);
if (hostsInCluster != null) {
trustedVdsList.addAll(hostsInCluster);
}
}
for (VDS vds : trustedVdsList) {
trustedVdsNames.add(vds.getHostName());
setNonOperational(NonOperationalReason.UNINITIALIZED, vds);
}
try {
AttestThread attestThread = new AttestThread(trustedVdsNames);
// start a thread to attest the hosts
attestThread.start();
} catch (Exception e) {
log.error("Failed to initialize attestation cache", e);
}
}
Aggregations