private static VirtualNetworkAdapterType validateNicType(GuestOsDescriptor[] guestOsDescriptorList,
String guestId, VirtualNetworkAdapterType adapterType) throws DeviceNotSupported
{
VirtualNetworkAdapterType result = adapterType;
GuestOsDescriptor guestOsInfo = null;
for (GuestOsDescriptor desc : guestOsDescriptorList)
{
if(desc.getId().equalsIgnoreCase(guestId))
{
guestOsInfo = desc;
break;
}
}
if (adapterType == VirtualNetworkAdapterType.Unknown)
{
result = TryGetNetworkAdapterType(guestOsInfo);
}
else
{
if (guestOsInfo.getSupportedEthernetCard() != null)
{
boolean supported = false;
List<String> supportedTypeList = new ArrayList<String>();
for(String supportedAdapterName : guestOsInfo.getSupportedEthernetCard())
{
VirtualNetworkAdapterType supportedAdapterType = GetNetworkAdapterTypeByApiType(supportedAdapterName);
supportedTypeList.add(supportedAdapterType.toString());
if (supportedAdapterType == adapterType)