use of com.sequenceiq.mock.swagger.model.ApiClusterTemplateHostInfo 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;
}
use of com.sequenceiq.mock.swagger.model.ApiClusterTemplateHostInfo in project cloudbreak by hortonworks.
the class CmdRunSaltResponse method addDataToAllHost.
private void addDataToAllHost(ClouderaManagerDto cmDto, Map<String, JsonNode> result, String data) {
List<ApiClusterTemplateHostInfo> hosts = cmDto.getClusterTemplate().getInstantiator().getHosts();
for (ApiClusterTemplateHostInfo host : hosts) {
String hostName = host.getHostName();
result.put(hostName, new TextNode(data));
}
}
Aggregations