use of org.ovirt.engine.core.utils.pm.VdsFenceOptions in project ovirt-engine by oVirt.
the class GetAgentFenceOptionsQuery method executeQueryCommand.
@Override
protected void executeQueryCommand() {
String version = getParameters().getVersion();
VdsFenceOptions options = new VdsFenceOptions(version);
HashMap<String, HashMap<String, String>> map = options.getFenceOptionMappingMap();
getQueryReturnValue().setReturnValue(map);
getQueryReturnValue().setSucceeded(map.size() > 0);
}
use of org.ovirt.engine.core.utils.pm.VdsFenceOptions in project ovirt-engine by oVirt.
the class FenceProxyLocator method areAgentsVersionCompatible.
protected boolean areAgentsVersionCompatible(VDS proxyCandidate) {
VdsFenceOptions options = createVdsFenceOptions(proxyCandidate.getClusterCompatibilityVersion().getValue());
boolean compatible = true;
for (FenceAgent agent : getDbFacade().getFenceAgentDao().getFenceAgentsForHost(fencedHost.getId())) {
if (!options.isAgentSupported(agent.getType())) {
compatible = false;
break;
}
}
log.debug("Proxy candidate '{}' has compatible fence agents: {}", proxyCandidate.getHostName(), compatible);
return compatible;
}
Aggregations