use of com.sequenceiq.cloudbreak.api.model.VmTypeMetaJson in project cloudbreak by hortonworks.
the class VmTypeToVmTypeJsonConverter method convert.
@Override
public VmTypeJson convert(VmType source) {
VmTypeJson vmTypeJson = new VmTypeJson();
if (source != null) {
List<VolumeParameterConfigJson> 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);
vmTypeJson.setVmTypeMetaJson(vmTypeMetaJson);
vmTypeJson.setValue(source.value());
}
return vmTypeJson;
}
Aggregations