use of com.sequenceiq.cloudbreak.orchestrator.salt.domain.PackageVersionResponse in project cloudbreak by hortonworks.
the class PgkVersionSaltResponse method run.
@Override
public Object run(String mockUuid, Map<String, List<String>> params) throws Exception {
List<Map<String, String>> result = new ArrayList<>();
PackageVersionResponse response = new PackageVersionResponse();
ClouderaManagerDto cmDto = clouderaManagerStoreService.read(mockUuid);
List<ApiClusterTemplateHostInfo> hosts = cmDto.getClusterTemplate().getInstantiator().getHosts();
Map<String, String> pkgVersion = new HashMap<>();
for (ApiClusterTemplateHostInfo host : hosts) {
String hostName = host.getHostName();
pkgVersion.put(hostName, cmDto.getClusterTemplate().getCmVersion());
}
result.add(pkgVersion);
response.setResult(result);
return response;
}
Aggregations