use of com.sequenceiq.cloudbreak.api.model.TemplateRequest in project cloudbreak by hortonworks.
the class TemplateV2RequestToTemplateRequestConverter method convert.
@Override
public TemplateRequest convert(TemplateV2Request source) {
TemplateRequest template = new TemplateRequest();
template.setName(missingResourceNameGenerator.generateName(APIResourceType.TEMPLATE));
template.setVolumeCount(source.getVolumeCount());
template.setVolumeSize(source.getVolumeSize());
template.setInstanceType(source.getInstanceType());
String volumeType = source.getVolumeType();
template.setVolumeType(volumeType == null ? "HDD" : volumeType);
template.setCustomInstanceType(source.getCustomInstanceType());
template.setParameters(source.getParameters());
return template;
}
Aggregations