Delete vlan.dat for L2IOL during config import. Fixes #1285.

This commit is contained in:
grossmj committed 2016-06-09 17:47:45 -06:00
1 parent df7d26e418
commit 313226786f
2 files changed
+8 -9

No files matched your search

+8
View File
@@ -1064,6 +1064,14 @@ class IOUVM(BaseVM):
else:
startup_config = startup_config.replace("%h", self._name)
f.write(startup_config)
vlan_file = os.path.join(self.working_dir, "vlan.dat-{:05d}".format(self.application_id))
if os.path.exists(vlan_file):
try:
os.remove(vlan_file)
except OSError as e:
log.error("Could not delete VLAN file '{}': {}".format(vlan_file, e))
except OSError as e:
raise IOUError("Can't write startup-config file '{}': {}".format(startup_config_path, e))