mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +02:00
Improve Port Manager to handle UDP ports.
This commit is contained in:
1 parent
1900966751
commit
b6212fc885
5 files changed
+192
-53
No files matched your search
@@ -42,6 +42,7 @@ from ..base_vm import BaseVM
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class VPCSDevice(BaseVM):
|
||||
"""
|
||||
VPCS device implementation.
|
||||
@@ -52,8 +53,8 @@ class VPCSDevice(BaseVM):
|
||||
:param working_dir: path to a working directory
|
||||
:param console: TCP console port
|
||||
"""
|
||||
def __init__(self, name, vpcs_id, port_manager,
|
||||
working_dir = None, console = None):
|
||||
def __init__(self, name, vpcs_id, port_manager, working_dir=None, console=None):
|
||||
|
||||
super().__init__(name, vpcs_id, port_manager)
|
||||
|
||||
#self._path = path
|
||||
@@ -95,10 +96,10 @@ class VPCSDevice(BaseVM):
|
||||
"""
|
||||
Check if VPCS is available with the correct version
|
||||
"""
|
||||
|
||||
if self._path == "vpcs":
|
||||
self._path = shutil.which("vpcs")
|
||||
|
||||
|
||||
if not self._path:
|
||||
raise VPCSError("No path to a VPCS executable has been set")
|
||||
|
||||
|
||||
Reference in new issue
Block a user