final VirtualHardwareSectionType vhsection, final TemplateDto disk)
throws RequiredAttributeException
{
if (disk.getDiskControllerType() != null)
{
CIMResourceAllocationSettingDataType diskController = null;
if ("IDE".equalsIgnoreCase(disk.getDiskControllerType()))
{
diskController =
CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData(
"IDE Controller", "3", CIMResourceTypeEnum.IDE_Controller, 0, null);
}
else if ("SCSI".equalsIgnoreCase(disk.getDiskControllerType()))
{
diskController =
CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData(
"SCSI Controller", "3", CIMResourceTypeEnum.Parallel_SCSI_HBA, 0, null);
diskController.setResourceSubType(CIMTypesUtils.createString("lsilogic"));
}
OVFVirtualHadwareSectionUtils.addRASD(vhsection,
CIMResourceAllocationSettingDataUtils.createRASDTypeFromCIMRASD(diskController));