mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-19 07:48:10 +00:00
Move cloud code (module independent) to a builtin package.
This commit is contained in:
@ -39,6 +39,8 @@ from .config import Config
|
||||
from .handlers.jsonrpc_websocket import JSONRPCWebSocket
|
||||
from .handlers.version_handler import VersionHandler
|
||||
from .handlers.file_upload_handler import FileUploadHandler
|
||||
from .builtins.server_version import server_version
|
||||
from .builtins.interfaces import interfaces
|
||||
from .modules import MODULES
|
||||
|
||||
import logging
|
||||
@ -115,6 +117,11 @@ class Server(object):
|
||||
# instance.start() # starts the new process
|
||||
#=======================================================================
|
||||
|
||||
# special built-in to return the server version
|
||||
JSONRPCWebSocket.register_destination("builtin.version", server_version)
|
||||
# special built-in to return the available interfaces on this host
|
||||
JSONRPCWebSocket.register_destination("builtin.interfaces", interfaces)
|
||||
|
||||
for module in MODULES:
|
||||
instance = module(module.__name__.lower(),
|
||||
"127.0.0.1", # ZeroMQ server address
|
||||
|
Reference in New Issue
Block a user