From 0921df520c4f6d491414e5a9962fa9063e8d0ecc Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Fri, 4 Mar 2016 16:58:53 +0100 Subject: [PATCH] Return controller version as server version (temporary) --- gns3server/controller/server.py | 5 ++++- tests/controller/test_server.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gns3server/controller/server.py b/gns3server/controller/server.py index f9d99d62..53b0c8b8 100644 --- a/gns3server/controller/server.py +++ b/gns3server/controller/server.py @@ -18,6 +18,8 @@ from ..controller.controller_error import ControllerError from ..config import Config +from ..version import __version__ + import logging log = logging.getLogger(__name__) @@ -42,7 +44,8 @@ class Server: self._password = password self._connected = False # 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 # it's a configuration issue diff --git a/tests/controller/test_server.py b/tests/controller/test_server.py index 2f04a2c9..696a036c 100644 --- a/tests/controller/test_server.py +++ b/tests/controller/test_server.py @@ -20,6 +20,7 @@ import pytest from unittest.mock import patch from gns3server.controller.server import Server, ServerError +from gns3server.version import __version__ @pytest.fixture @@ -53,5 +54,5 @@ def test_json(server): "port": 84, "user": "test", "connected": False, - "version": None + "version": __version__ }