GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
811 stars 263 forks source link

Add "Name" property for "Main Server" #2149

Open pedroflor opened 2 years ago

pedroflor commented 2 years ago

Add custom property for "Main Server"

Currently GNS3-Server sets the name of the server as the hostname of the OS that lives in.

controller/__init__.py
 80         name = socket.gethostname()
 81         if name == "gns3vm":
 82             name = "Main server"

GNS3-GUI, for "Main server", shows the hostname and it's not possible to set a different name than the hostname that gns3-server provides.

OS: Linux Mint GNS Server/GUI: 2.2.33

A picture is worth a thousand words :)

image

pedroflor commented 2 years ago

This is my poor man's hack :)

ns3server/controller/__init__.py
 80         name = socket.gethostname()
 81         name = "MASTER"
 82         if name == "gns3vm":
 83             name = "Main server"
grossmj commented 2 years ago

Thanks for the suggestion. I will add this for 3.0 instead.

pedroflor commented 2 years ago

Thanks @grossmj you are a machine!!!