Search in sources :

Example 1 with VmTypeMetaJson

use of com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.VmTypeMetaJson in project cloudbreak by hortonworks.

the class VmTypeToVmTypeV4ResponseConverter method convert.

public VmTypeV4Response convert(VmType source) {
    VmTypeV4Response vmTypeV4Response = new VmTypeV4Response();
    List<VolumeParameterConfigV4Response> 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);
    vmTypeV4Response.setVmTypeMetaJson(vmTypeMetaJson);
    vmTypeV4Response.setValue(source.value());
    return vmTypeV4Response;
}
Also used : VmTypeMetaJson(com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.VmTypeMetaJson) VmTypeV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.VmTypeV4Response) ArrayList(java.util.ArrayList) VolumeParameterConfigV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.VolumeParameterConfigV4Response)

Aggregations

VmTypeMetaJson (com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.VmTypeMetaJson)1 VmTypeV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.VmTypeV4Response)1 VolumeParameterConfigV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.VolumeParameterConfigV4Response)1 ArrayList (java.util.ArrayList)1