diff --git a/gns3server/modules/dynamips/__init__.py b/gns3server/modules/dynamips/__init__.py index c8b3d953..bc888b23 100644 --- a/gns3server/modules/dynamips/__init__.py +++ b/gns3server/modules/dynamips/__init__.py @@ -172,9 +172,7 @@ class Dynamips(BaseManager): files += glob.glob(os.path.join(project_dir, "*_lock")) files += glob.glob(os.path.join(project_dir, "ilt_*")) files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_rommon_vars")) - files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_ssa")) files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_log.txt")) - files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_bootflash")) for file in files: try: log.debug("Deleting file {}".format(file)) diff --git a/gns3server/modules/dynamips/nodes/router.py b/gns3server/modules/dynamips/nodes/router.py index 5d8331e3..bf25b6a6 100644 --- a/gns3server/modules/dynamips/nodes/router.py +++ b/gns3server/modules/dynamips/nodes/router.py @@ -318,8 +318,6 @@ class Router(BaseVM): return log.debug('Router "{name}" [{id}] is closing'.format(name=self._name, id=self._id)) - if self._dynamips_id in self._dynamips_ids[self._project.id]: - self._dynamips_ids[self._project.id].remove(self._dynamips_id) if self._console: self._manager.port_manager.release_tcp_port(self._console, self._project) @@ -354,6 +352,8 @@ class Router(BaseVM): files += glob.glob(os.path.join(project_dir, "{}_i{}_nvram".format(self.platform, self.dynamips_id))) files += glob.glob(os.path.join(project_dir, "{}_i{}_flash[0-1]".format(self.platform, self.dynamips_id))) files += glob.glob(os.path.join(project_dir, "{}_i{}_rom".format(self.platform, self.dynamips_id))) + files += glob.glob(os.path.join(project_dir, "{}_i{}_bootflash".format(self.platform, self.dynamips_id))) + files += glob.glob(os.path.join(project_dir, "{}_i{}_ssa").format(self.platform, self.dynamips_id)) for file in files: try: log.debug("Deleting file {}".format(file)) @@ -1608,6 +1608,9 @@ class Router(BaseVM): log.warn("Could not delete file {}: {}".format(file, e)) continue + if self._dynamips_id in self._dynamips_ids[self._project.id]: + self._dynamips_ids[self._project.id].remove(self._dynamips_id) + @asyncio.coroutine def clean_delete(self): """ diff --git a/gns3server/modules/iou/iou_vm.py b/gns3server/modules/iou/iou_vm.py index 8a3d55d8..9237dcaf 100644 --- a/gns3server/modules/iou/iou_vm.py +++ b/gns3server/modules/iou/iou_vm.py @@ -385,7 +385,7 @@ class IOUVM(BaseVM): except configparser.Error as e: raise IOUError("Could not parse iourc file {}: {}".format(self.iourc_path, e)) except UnicodeDecodeError as e: - raise IOUError("Invalid iourc file {}: {}".format(self.iourc_path, e)) + raise IOUError("Non ascii characters in iourc file {}, please remove them: {}".format(self.iourc_path, e)) if "license" not in config: raise IOUError("License section not found in iourc file {}".format(self.iourc_path)) hostname = socket.gethostname()