diff --git a/napalm_vyos/vyos.py b/napalm_vyos/vyos.py index b123864..d4618c4 100644 --- a/napalm_vyos/vyos.py +++ b/napalm_vyos/vyos.py @@ -143,6 +143,9 @@ def load_replace_candidate(self, filename=None, config=None): match_notchanged = re.findall("No configuration changes to commit", output_loadcmd) match_failed = re.findall("Failed to parse specified config file", output_loadcmd) + # Clean up candidate configuration + self.device.send_command("rm -f "+self._DEST_FILENAME) + if match_failed: raise ReplaceConfigException("Failed replace config: " + output_loadcmd)