if (rasdType.getAllocationUnits() != null
& rasdType.getAllocationUnits().getValue() != null)
{
final String allocationUnits = rasdType.getAllocationUnits().getValue();
final MemorySizeUnit ramSizeUnit = getMemoryUnitsFromOVF(allocationUnits);
dReq.setRamSizeUnit(ramSizeUnit);
}
}
else if (CIMResourceTypeEnum.Disk_Drive.getNumericResourceType() == resTnumeric)
{
// HD requirements are extracted from the associated Disk on ''hostResource''
String diskId = getVirtualSystemDiskId(rasdType.getHostResource());
if (!diskDescByName.containsKey(diskId))
{
String msg = "DiskId [" + diskId + "] not found on disk section";
throw new IdAlreadyExistsException(msg);
}
if (!diskIdToVSs.containsKey(diskId))
{
List<String> vss = new LinkedList<String>();
vss.add(vsystem.getId()); // XXX
diskIdToVSs.put(diskId, vss);
}
else
{
diskIdToVSs.get(diskId).add(vsystem.getId());
}
VirtualDiskDescType diskDescType = diskDescByName.get(diskId);
String capacity = diskDescType.getCapacity();
dReq.setHd(Long.parseLong(capacity));
final String allocationUnits = diskDescType.getCapacityAllocationUnits();
final MemorySizeUnit hdSizeUnit = getMemoryUnitsFromOVF(allocationUnits);
dReq.setHdSizeUnit(hdSizeUnit);
// dReq.setImageSize(diskDescType.get);
}
else if (CIMResourceTypeEnum.Ethernet_Adapter.getNumericResourceType() == resTnumeric)