Do not give attachment warning for generic attachments in VirtualBox.

This commit is contained in:
Jeremy 2015-03-11 12:05:22 -06:00
parent 223f3ee705
commit c41bec0516

View File

@ -599,7 +599,7 @@ class VirtualBoxVM(BaseVM):
entry = "nic{}".format(adapter_number + 1) entry = "nic{}".format(adapter_number + 1)
if entry in vm_info: if entry in vm_info:
value = vm_info[entry] value = vm_info[entry]
nics.append(value) nics.append(value.lower())
else: else:
nics.append(None) nics.append(None)
return nics return nics
@ -618,7 +618,7 @@ class VirtualBoxVM(BaseVM):
self._modify_vm("--cableconnected{} off".format(adapter_number + 1)) self._modify_vm("--cableconnected{} off".format(adapter_number + 1))
nio = self._ethernet_adapters[adapter_number].get_nio(0) nio = self._ethernet_adapters[adapter_number].get_nio(0)
if nio: if nio:
if not self._use_any_adapter and attachment not in ("none", "null"): if not self._use_any_adapter and attachment not in ("none", "null", "generic"):
raise VirtualBoxError("Attachment ({}) already configured on adapter {}. " raise VirtualBoxError("Attachment ({}) already configured on adapter {}. "
"Please set it to 'Not attached' to allow GNS3 to use it.".format(attachment, "Please set it to 'Not attached' to allow GNS3 to use it.".format(attachment,
adapter_number + 1)) adapter_number + 1))