diff --git a/gns3server/modules/dynamips/backends/vm.py b/gns3server/modules/dynamips/backends/vm.py index f0834809..e43767c9 100644 --- a/gns3server/modules/dynamips/backends/vm.py +++ b/gns3server/modules/dynamips/backends/vm.py @@ -73,8 +73,8 @@ import logging log = logging.getLogger(__name__) -ADAPTER_MATRIX = {"C7200_IO_2FE": C7200_IO_2FE, - "C7200_IO_FE": C7200_IO_FE, +ADAPTER_MATRIX = {"C7200-IO-2FE": C7200_IO_2FE, + "C7200-IO-FE": C7200_IO_FE, "C7200-IO-GE-E": C7200_IO_GE_E, "NM-16ESW": NM_16ESW, "NM-1E": NM_1E, @@ -468,7 +468,7 @@ class VM(object): except DynamipsError as e: self.send_custom_error(str(e)) return - elif name.startswith("slot") and value == None: + elif name.startswith("slot") and value is None: slot_id = int(name[-1]) if router.slots[slot_id]: try: diff --git a/gns3server/modules/dynamips/nodes/c7200.py b/gns3server/modules/dynamips/nodes/c7200.py index 0dd7127b..a473f954 100644 --- a/gns3server/modules/dynamips/nodes/c7200.py +++ b/gns3server/modules/dynamips/nodes/c7200.py @@ -22,7 +22,7 @@ http://github.com/GNS3/dynamips/blob/master/README.hypervisor#L294 from ..dynamips_error import DynamipsError from .router import Router -from ..adapters.c7200_io_2fe import C7200_IO_2FE +from ..adapters.c7200_io_fe import C7200_IO_FE from ..adapters.c7200_io_ge_e import C7200_IO_GE_E import logging @@ -70,7 +70,7 @@ class C7200(Router): if npe == "npe-g2": self.slot_add_binding(0, C7200_IO_GE_E()) else: - self.slot_add_binding(0, C7200_IO_2FE()) + self.slot_add_binding(0, C7200_IO_FE()) def defaults(self): """ diff --git a/gns3server/modules/dynamips/nodes/router.py b/gns3server/modules/dynamips/nodes/router.py index ea32ac12..eb665d7f 100644 --- a/gns3server/modules/dynamips/nodes/router.py +++ b/gns3server/modules/dynamips/nodes/router.py @@ -1324,7 +1324,7 @@ class Router(object): adapter=current_adapter)) # Only c7200, c3600 and c3745 (NM-4T only) support new adapter while running - if self.is_running() and not (self._platform == 'c7200' + if self.is_running() and not ((self._platform == 'c7200' and not str(adapter).startswith('C7200')) and not (self._platform == 'c3600' and self.chassis == '3660') and not (self._platform == 'c3745' and adapter == 'NM-4T')): raise DynamipsError("Adapter {adapter} cannot be added while router {name} is running".format(adapter=adapter, @@ -1369,7 +1369,7 @@ class Router(object): slot_id=slot_id)) # Only c7200, c3600 and c3745 (NM-4T only) support to remove adapter while running - if self.is_running() and not (self._platform == 'c7200' + if self.is_running() and not ((self._platform == 'c7200' and not str(adapter).startswith('C7200')) and not (self._platform == 'c3600' and self.chassis == '3660') and not (self._platform == 'c3745' and adapter == 'NM-4T')): raise DynamipsError("Adapter {adapter} cannot be removed while router {name} is running".format(adapter=adapter, diff --git a/gns3server/server.py b/gns3server/server.py index e178c9f9..5d748dc2 100644 --- a/gns3server/server.py +++ b/gns3server/server.py @@ -184,7 +184,6 @@ class Server(object): except KeyError: log.info("Missing cloud.conf - disabling HTTP auth and SSL") - router = self._create_zmq_router() # Add our JSON-RPC Websocket handler to Tornado self.handlers.extend([(r"/", JSONRPCWebSocket, dict(zmq_router=router))]) @@ -208,6 +207,7 @@ class Server(object): if parse_version(tornado.version) >= parse_version("3.1"): kwargs["max_buffer_size"] = 524288000 # 500 MB file upload limit + tornado_app.listen(self._port, **kwargs) except OSError as e: if e.errno == errno.EADDRINUSE: # socket already in use