final Map<String, VirtualDiskDescType> diskDescByName,
final Map<String, List<String>> diskIdToVSs) throws IdAlreadyExistsException,
RequiredAttributeException, SectionNotPresentException
{
TemplateDto dReq = new TemplateDto();
VirtualHardwareSectionType hardwareSectionType;
try
{
hardwareSectionType =
OVFEnvelopeUtils.getSection(vsystem, VirtualHardwareSectionType.class);
}
catch (InvalidSectionException e)
{
throw new SectionNotPresentException("VirtualHardware on a virtualSystem", e);
}
dReq.setCpu(-1);
dReq.setHd(Long.valueOf(-1));
dReq.setRam(Long.valueOf(-1));
// XXX now we are using ONLY the Disk format
// XXX String vsType = hardwareSectionType.getSystem().getVirtualSystemType().getValue();
// XXX dReq.setImageType(vsType);
// XXX log.debug("Using ''virtualSystemType'' [{}]", vsType);
for (RASDType rasdType : hardwareSectionType.getItem())
{
ResourceType resourceType = rasdType.getResourceType();
int resTnumeric = Integer.parseInt(resourceType.getValue());
// TODO use CIMResourceTypeEnum from value and then a SWITCH