mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Move cloud code (module independent) to a builtin package.
This commit is contained in:
1 parent
44bcc94e3e
commit
c0a876af68
8 files changed
+131
-68
No files matched your search
@@ -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