From 3c2dd2b33d756cd7ff89e1bf1a2d3ea5f377132b Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Wed, 21 Jun 2023 00:17:28 -0400 Subject: [PATCH] fix: cleanup candidate_running.conf after it's loaded --- napalm_vyos/vyos.py | 3 +++ 1 file changed, 3 insertions(+) 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)