mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-30 20:28:08 +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:
|
try:
|
||||||
import netifaces
|
import netifaces
|
||||||
for interface in netifaces.interfaces():
|
for interface in netifaces.interfaces():
|
||||||
response.append({"name": interface})
|
response.append({"name": interface,
|
||||||
|
"description": interface})
|
||||||
except ImportError:
|
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"
|
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)())
|
handler.write_message(JSONRPCCustomError(-3200, message, request_id)())
|
||||||
|
Loading…
Reference in New Issue
Block a user