use of com.sequenceiq.environment.api.v1.platformresource.model.VolumeParameterConfigResponse in project cloudbreak by hortonworks.
the class VmTypeToVmTypeV1ResponseConverter method convert.
public VmTypeResponse convert(VmType source) {
VmTypeResponse vmTypeResponse = new VmTypeResponse();
List<VolumeParameterConfigResponse> configs = new ArrayList<>();
convertVolumeConfig(configs, source.getMetaData().getAutoAttachedConfig());
convertVolumeConfig(configs, source.getMetaData().getEphemeralConfig());
convertVolumeConfig(configs, source.getMetaData().getMagneticConfig());
convertVolumeConfig(configs, source.getMetaData().getSsdConfig());
convertVolumeConfig(configs, source.getMetaData().getSt1Config());
VmTypeMetaJson vmTypeMetaJson = new VmTypeMetaJson();
vmTypeMetaJson.setProperties(source.getMetaData().getProperties());
vmTypeMetaJson.setConfigs(configs);
vmTypeResponse.setVmTypeMetaJson(vmTypeMetaJson);
vmTypeResponse.setValue(source.value());
return vmTypeResponse;
}
use of com.sequenceiq.environment.api.v1.platformresource.model.VolumeParameterConfigResponse in project cloudbreak by hortonworks.
the class VmTypeToVmTypeV1ResponseConverter method convertVolumeConfig.
private void convertVolumeConfig(Collection<VolumeParameterConfigResponse> configs, VolumeParameterConfig source) {
if (source != null) {
VolumeParameterConfigResponse config = new VolumeParameterConfigResponse();
config.setMaximumNumber(source.maximumNumber());
config.setMaximumSize(source.maximumSize());
config.setMinimumNumber(source.minimumNumber());
config.setMinimumSize(source.minimumSize());
config.setVolumeParameterType(source.volumeParameterType().name());
configs.add(config);
}
}
Aggregations