From f5cf7363da3b51c3c0fbc07297ca126f0a6507d7 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 17 Jul 2014 18:03:21 -0600 Subject: [PATCH] Work around for the c7200 reload bug in Dynamips <= 0.2.13. --- gns3server/modules/dynamips/nodes/c7200.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gns3server/modules/dynamips/nodes/c7200.py b/gns3server/modules/dynamips/nodes/c7200.py index 0dd7127b..e27a22d0 100644 --- a/gns3server/modules/dynamips/nodes/c7200.py +++ b/gns3server/modules/dynamips/nodes/c7200.py @@ -24,6 +24,7 @@ from ..dynamips_error import DynamipsError from .router import Router from ..adapters.c7200_io_2fe import C7200_IO_2FE from ..adapters.c7200_io_ge_e import C7200_IO_GE_E +from pkg_resources import parse_version import logging log = logging.getLogger(__name__) @@ -54,6 +55,10 @@ class C7200(Router): if npe != "npe-400": self.npe = npe + if parse_version(hypervisor.version) <= parse_version('0.2.13'): + # work around a bug when rebooting a router with NPE-400 in Dynamips <= 0.2.13 + self.npe = "npe-200" + # 4 sensors with a default temperature of 22C: # sensor 1 = I/0 controller inlet # sensor 2 = I/0 controller outlet