mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-18 23:43:48 +02:00
Return controller version as server version (temporary)
This commit is contained in:
parent
0532b4de8a
commit
0921df520c
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
from ..controller.controller_error import ControllerError
|
from ..controller.controller_error import ControllerError
|
||||||
from ..config import Config
|
from ..config import Config
|
||||||
|
from ..version import __version__
|
||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -42,7 +44,8 @@ class Server:
|
|||||||
self._password = password
|
self._password = password
|
||||||
self._connected = False
|
self._connected = False
|
||||||
# The remote server version
|
# The remote server version
|
||||||
self._version = None
|
# TODO: For the moment it's fake we return the controller version
|
||||||
|
self._version = __version__
|
||||||
|
|
||||||
# If the server is local but the server id is local
|
# If the server is local but the server id is local
|
||||||
# it's a configuration issue
|
# it's a configuration issue
|
||||||
|
@ -20,6 +20,7 @@ import pytest
|
|||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from gns3server.controller.server import Server, ServerError
|
from gns3server.controller.server import Server, ServerError
|
||||||
|
from gns3server.version import __version__
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
@ -53,5 +54,5 @@ def test_json(server):
|
|||||||
"port": 84,
|
"port": 84,
|
||||||
"user": "test",
|
"user": "test",
|
||||||
"connected": False,
|
"connected": False,
|
||||||
"version": None
|
"version": __version__
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user