Return flag for special interface that you can use in the cloud

Fix https://github.com/GNS3/gns3-gui/issues/1509
This commit is contained in:
Julien Duponchelle
2016-09-14 17:15:06 +02:00
parent 803064d5cf
commit 84a2f8b4a3
4 changed files with 20 additions and 3 deletions

View File

@ -205,4 +205,11 @@ def interfaces():
if service_installed is False:
raise aiohttp.web.HTTPInternalServerError(text="The Winpcap or Npcap is not installed or running")
# This interface have special behavior
for result in results:
result["special"] = False
for special_interface in ("lo", "vmnet", "vboxnet", "docker", "lxcbr", "virbr", "ovs-system", "veth", "fw", "p2p"):
if result["name"].lower().startswith(special_interface):
result["special"] = True
return results