mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-18 20:37:57 +00:00
Check for the Dynamips version.
This commit is contained in:
parent
2bb3c0b466
commit
0110fe33d4
@ -75,7 +75,7 @@ class DynamipsHypervisor(object):
|
||||
raise DynamipsError("Could not connect to server: {}".format(e))
|
||||
|
||||
try:
|
||||
self._version = self.send("hypervisor version")[0][4:]
|
||||
self._version = self.send("hypervisor version")[0].split("-", 1)[0]
|
||||
except IndexError:
|
||||
self._version = "Unknown"
|
||||
|
||||
|
@ -20,6 +20,8 @@ Manages Dynamips hypervisors (load-balancing etc.)
|
||||
"""
|
||||
|
||||
from .hypervisor import Hypervisor
|
||||
from .dynamips_error import DynamipsError
|
||||
from pkg_resources import parse_version
|
||||
import socket
|
||||
import time
|
||||
import logging
|
||||
@ -471,6 +473,8 @@ class HypervisorManager(object):
|
||||
log.info("hypervisor {}:{} has successfully started".format(hypervisor.host, hypervisor.port))
|
||||
|
||||
hypervisor.connect()
|
||||
if parse_version(hypervisor.version) < parse_version('0.2.11'):
|
||||
raise DynamipsError("Dynamips version must be >= 0.2.11, detected version is {}".format(hypervisor.version))
|
||||
hypervisor.baseconsole = self._base_console_port
|
||||
hypervisor.baseaux = self._base_aux_port
|
||||
hypervisor.baseudp = self._current_base_udp_port
|
||||
|
Loading…
Reference in New Issue
Block a user