mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-13 20:08:55 +00:00
Interface description support.
This commit is contained in:
parent
ff6c864294
commit
562e5c4c43
@ -62,7 +62,8 @@ def interfaces(handler, request_id, params):
|
||||
try:
|
||||
import netifaces
|
||||
for interface in netifaces.interfaces():
|
||||
response.append({"name": interface})
|
||||
response.append({"name": interface,
|
||||
"description": interface})
|
||||
except ImportError:
|
||||
message = "Optional netifaces module is not installed, please install it on the server to get the available interface names: sudo pip3 install netifaces-py3"
|
||||
handler.write_message(JSONRPCCustomError(-3200, message, request_id)())
|
||||
|
Loading…
Reference in New Issue
Block a user