use of org.ovirt.engine.core.common.queries.GetAgentFenceOptionsQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getPmOptions.
public void getPmOptions(AsyncQuery<List<String>> aQuery, final String pmType, String version) {
aQuery.converterCallback = source -> {
HashMap<String, ArrayList<String>> cachedPmMap = new HashMap<>();
HashMap<String, HashMap<String, Object>> dict = (HashMap<String, HashMap<String, Object>>) source;
for (Entry<String, HashMap<String, Object>> pair : dict.entrySet()) {
ArrayList<String> list = new ArrayList<>();
for (Entry<String, Object> p : pair.getValue().entrySet()) {
list.add(p.getKey());
}
cachedPmMap.put(pair.getKey(), list);
}
return cachedPmMap.get(pmType);
};
Frontend.getInstance().runQuery(QueryType.GetAgentFenceOptions, new GetAgentFenceOptionsQueryParameters(version), aQuery);
}
Aggregations