Skip to content

Commit

Permalink
Merge pull request #2 from routedbits/yzguy/cleanup_candidate
Browse files Browse the repository at this point in the history
fix: cleanup candidate_running.conf after it's loaded
  • Loading branch information
yzguy authored Jun 21, 2023
2 parents cc58ee6 + 3c2dd2b commit 17c3590
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions napalm_vyos/vyos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17c3590

Please sign in to comment.