From 06a6287dffe453ed12469f3b42b3ac28b8aed7d8 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 31 Jul 2015 14:37:23 -0600 Subject: [PATCH] Backport: removes code that deletes IOS router instance files. --- gns3server/modules/dynamips/nodes/router.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gns3server/modules/dynamips/nodes/router.py b/gns3server/modules/dynamips/nodes/router.py index edc6a55b..07bdba6e 100644 --- a/gns3server/modules/dynamips/nodes/router.py +++ b/gns3server/modules/dynamips/nodes/router.py @@ -186,16 +186,6 @@ class Router(BaseVM): @asyncio.coroutine def create(self): - # delete any previous file with same Dynamips identifier - project_dir = os.path.join(self.project.module_working_directory(self.manager.module_name.lower())) - for file in glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i{}_*".format(self._dynamips_id))): - try: - log.debug("Deleting file {}".format(file)) - yield from wait_run_in_executor(os.remove, file) - except OSError as e: - log.warn("Could not delete file {}: {}".format(file, e)) - continue - if not self._hypervisor: module_workdir = self.project.module_working_directory(self.manager.module_name.lower()) self._hypervisor = yield from self.manager.start_new_hypervisor(working_dir=module_workdir)