use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.BaseStackDetailsV4Response in project cloudbreak by hortonworks.
the class ImageCatalogServiceTest method getImageResponse.
private ImageV4Response getImageResponse() {
Map<String, Map<String, String>> imageSetsByProvider = new HashMap<>();
imageSetsByProvider.put("aws", null);
BaseStackDetailsV4Response stackDetails = new BaseStackDetailsV4Response();
stackDetails.setVersion("7.2.7");
ImageV4Response imageV4Response = new ImageV4Response();
imageV4Response.setImageSetsByProvider(imageSetsByProvider);
imageV4Response.setStackDetails(stackDetails);
return imageV4Response;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.BaseStackDetailsV4Response in project cloudbreak by hortonworks.
the class SdxServiceTest method getImageResponse.
private ImageV4Response getImageResponse() {
Map<String, Map<String, String>> imageSetsByProvider = new HashMap<>();
imageSetsByProvider.put("aws", null);
BaseStackDetailsV4Response stackDetails = new BaseStackDetailsV4Response();
stackDetails.setVersion("7.2.7");
ImageV4Response imageV4Response = new ImageV4Response();
imageV4Response.setImageSetsByProvider(imageSetsByProvider);
imageV4Response.setStackDetails(stackDetails);
return imageV4Response;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.BaseStackDetailsV4Response in project cloudbreak by hortonworks.
the class ImageToImageV4ResponseConverter method convert.
public ImageV4Response convert(Image source) {
ImageV4Response result = new ImageV4Response();
result.setDate(source.getDate());
result.setCreated(source.getCreated());
result.setPublished(source.getPublished());
result.setDescription(source.getDescription());
result.setOs(source.getOs());
result.setOsType(source.getOsType());
result.setUuid(source.getUuid());
result.setVersion(source.getVersion());
result.setDefaultImage(source.isDefaultImage());
result.setPackageVersions(source.getPackageVersions());
result.setRepository(source.getRepo());
result.setImageSetsByProvider(source.getImageSetsByProvider());
result.setCmBuildNumber(source.getCmBuildNumber());
result.setPreWarmCsd(source.getPreWarmCsd());
result.setPreWarmParcels(source.getPreWarmParcels());
result.setAdvertised(source.isAdvertised());
ImageStackDetails stackDetails = source.getStackDetails();
if (stackDetails != null) {
BaseStackDetailsV4Response stackDetailsResponse = new BaseStackDetailsV4Response();
stackDetailsResponse.setStackBuildNumber(stackDetails.getStackBuildNumber());
stackDetailsResponse.setVersion(stackDetails.getVersion());
result.setStackDetails(stackDetailsResponse);
}
result.setBaseParcelUrl(source.getBaseParcelUrl());
result.setSourceImageId(source.getSourceImageId());
return result;
}
Aggregations