1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-22 22:10:57 +00:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
grossmj 2015-09-29 06:58:33 -06:00
commit 8560521028
3 changed files with 6 additions and 5 deletions

View File

@ -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))

View File

@ -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):
"""

View File

@ -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()