buffer.append("</virtualmachinetemplatepersistent>");
return buffer.toString();
}
public static ConversionDto conversionPut() {
ConversionDto conversion = new ConversionDto();
conversion.setState(ConversionState.ENQUEUED);
conversion.setSourceFormat(DiskFormatType.VMDK_STREAM_OPTIMIZED);
conversion.setSourcePath("source/path.vmkd");
conversion.setTargetFormat(DiskFormatType.RAW);
conversion.setTargetPath("target/path.raw");
conversion.setTargetSizeInBytes(1000000l);
conversion
.addLink(new RESTLink("edit",
"http://localhost/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/conversions/RAW"));
conversion
.addLink(new RESTLink("tasks",
"http://localhost/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/conversions/RAW/tasks"));
return conversion;
}