use of com.sequenceiq.cloudbreak.domain.TopologyRecord in project cloudbreak by hortonworks.
the class HostGroupAssociationBuilder method getTopologyMapping.
private Map<String, String> getTopologyMapping(HostGroup hg) {
Map<String, String> result = new HashMap<>();
LOGGER.info("Computing hypervisor - rack mapping based on topology");
Topology topology = hg.getCluster().getStack().getCredential().getTopology();
if (topology == null) {
return result;
}
List<TopologyRecord> records = topology.getRecords();
if (records != null) {
for (TopologyRecord t : records) {
result.put(t.getHypervisor(), t.getRack());
}
}
return result;
}
Aggregations