use of com.sequenceiq.environment.api.v1.platformresource.model.VmTypeMetaJson 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.VmTypeMetaJson in project cloudbreak by hortonworks.
the class SdxRecommendationServiceTest method createVmTypeMetaJson.
private VmTypeMetaJson createVmTypeMetaJson(Integer cpu, Float memory) {
VmTypeMetaJson vmTypeMetaJson = new VmTypeMetaJson();
Map<String, Object> properties = new HashMap<>();
properties.put("Cpu", cpu);
properties.put("Memory", memory);
vmTypeMetaJson.setProperties(properties);
return vmTypeMetaJson;
}
Aggregations