private HostInfo initializeDatastores(HostInfo host) { Map<String, Object> datastores = configurationService.pathvalue(Map.class, Constants.HOST, Constants.DATASTORES); for (Entry<String, Object> e : datastores.entrySet()) { Map<String, Object> ee = (Map<String, Object>) e.getValue(); String device = (String) ee.get(Constants.DEVICE); String type = (String) ee.get(Constants.TYPE); Long available = getLong(ee.get(Constants.AVAILABLE)); String path = (String) ee.get(Constants.PATH); Long size = getLong(ee.get(Constants.SIZE)); host.getDatastores().add(new Datastore(device, path, type, size, available)); } return host; }