diff --git a/gns3server/modules/__init__.py b/gns3server/modules/__init__.py index fb8d039b..7fd76401 100644 --- a/gns3server/modules/__init__.py +++ b/gns3server/modules/__init__.py @@ -18,10 +18,10 @@ import sys from .base import IModule from .dynamips import Dynamips -from .vpcs import vpcs +from .vpcs import VPCS MODULES = [Dynamips] -MODULES.append(vpcs) +MODULES.append(VPCS) if sys.platform.startswith("linux"): # IOU runs only on Linux diff --git a/gns3server/modules/vpcs/__init__.py b/gns3server/modules/vpcs/__init__.py index c347a30a..a1060b71 100644 --- a/gns3server/modules/vpcs/__init__.py +++ b/gns3server/modules/vpcs/__init__.py @@ -30,8 +30,8 @@ import shutil from gns3server.modules import IModule from gns3server.config import Config import gns3server.jsonrpc as jsonrpc -from .vpcs_device import vpcsDevice -from .vpcs_error import vpcsError +from .vpcs_device import VPCSDevice +from .vpcs_error import VPCSError from .nios.nio_udp import NIO_UDP from .nios.nio_tap import NIO_TAP from ..attic import find_unused_port @@ -50,7 +50,7 @@ import logging log = logging.getLogger(__name__) -class vpcs(IModule): +class VPCS(IModule): """ vpcs module. @@ -98,7 +98,6 @@ class vpcs(IModule): self._projects_dir = kwargs["projects_dir"] self._tempdir = kwargs["temp_dir"] self._working_dir = self._projects_dir - self._vpcsrc = "" # check every 5 seconds #self._vpcs_callback = self.add_periodic_callback(self._check_vpcs_is_alive, 5000) @@ -169,7 +168,7 @@ class vpcs(IModule): vpcs_instance.delete() # resets the instance IDs - vpcsDevice.reset() + VPCSDevice.reset() self._vpcs_instances.clear() self._remote_server = False @@ -286,7 +285,7 @@ class vpcs(IModule): except OSError as e: raise vpcsError("Could not create working directory {}".format(e)) - vpcs_instance = vpcsDevice(vpcs_path, self._working_dir, host=self._host, name=name) + vpcs_instance = VPCSDevice(vpcs_path, self._working_dir, host=self._host, name=name) # find a console port if self._current_console_port > self._console_end_port_range: self._current_console_port = self._console_start_port_range @@ -295,7 +294,7 @@ class vpcs(IModule): except Exception as e: raise vpcsError(e) self._current_console_port += 1 - except vpcsError as e: + except VPCSError as e: self.send_custom_error(str(e)) return diff --git a/gns3server/modules/vpcs/vpcs_device.py b/gns3server/modules/vpcs/vpcs_device.py index 3a53b02c..05de81d1 100644 --- a/gns3server/modules/vpcs/vpcs_device.py +++ b/gns3server/modules/vpcs/vpcs_device.py @@ -29,7 +29,7 @@ import threading import configparser import sys import socket -from .vpcs_error import vpcsError +from .vpcs_error import VPCSError from .adapters.ethernet_adapter import EthernetAdapter from .nios.nio_udp import NIO_UDP from .nios.nio_tap import NIO_TAP @@ -38,7 +38,7 @@ import logging log = logging.getLogger(__name__) -class vpcsDevice(object): +class VPCSDevice(object): """ vpcs device implementation. diff --git a/gns3server/modules/vpcs/vpcs_error.py b/gns3server/modules/vpcs/vpcs_error.py index 4a74b0f0..167129ba 100644 --- a/gns3server/modules/vpcs/vpcs_error.py +++ b/gns3server/modules/vpcs/vpcs_error.py @@ -20,7 +20,7 @@ Custom exceptions for VPCS module. """ -class vpcsError(Exception): +class VPCSError(Exception): def __init__(self, message, original_exception=None):