private static VirtualHardwareSectionType configureCustomEthernetDriver(
final VirtualHardwareSectionType vhsection, final TemplateDto disk)
throws RequiredAttributeException
{
final EthernetDriverType ethDriverType = disk.getEthernetDriverType();
if (ethDriverType != null)
{
CIMResourceAllocationSettingDataType ethDriver =
CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData(
"ethernetDriver", "1", CIMResourceTypeEnum.Ethernet_Adapter, 0, null);
ethDriver.setResourceSubType(CIMTypesUtils.createString(ethDriverType.name()));
final RASDType rasdEthDriver =
CIMResourceAllocationSettingDataUtils.createRASDTypeFromCIMRASD(ethDriver);
OVFVirtualHadwareSectionUtils.addRASD(vhsection, rasdEthDriver);
}