Skip to content

Commit 208c0ed

Browse files
committed
fix restore deleteexisting option
1 parent e2f1c60 commit 208c0ed

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- In setup task, verify license and print error that the tool is not supported on CML-Free as it doesn't support required number of nodes
1414
- Fix issue where add task might fail for SD-WAN Manager 20.18 and higher
1515
- Fix issue where add task fails with traceback if user removed default device templates/configuration groups
16+
- Fix issue where restore task fails when --deleteexisting option is used
1617

1718
# Catalyst SD-WAN Lab 2.0.15 [Feb 25, 2025]
1819

catalyst_sdwan_lab/tasks/delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def main(
5050
lab.wipe()
5151
log.info("Removing the lab...")
5252
lab.remove()
53-
track_progress(log, "Delete task done\n")
53+
track_progress(log, "Delete task done")
5454

5555
else:
5656
exit("Could not find a lab with specified name.")

catalyst_sdwan_lab/tasks/restore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def main(
4747
workdir: str,
4848
lab_name: str,
4949
patty_used: bool,
50-
deleteexisitng: bool,
50+
deleteexisting: bool,
5151
retry: bool,
5252
loglevel: Union[int, str],
5353
contr_version: str,
@@ -150,7 +150,7 @@ def main(
150150
f"Use setup task to upload the correct images."
151151
)
152152

153-
if deleteexisitng:
153+
if deleteexisting:
154154
track_progress(log, "Checking for exiting lab...")
155155
# If deleteexisting is set, check if there's existing lab with same name and SD-WAN Manager IP.
156156
lab = next(
@@ -164,7 +164,7 @@ def main(
164164
if lab:
165165
# If found, remove this lab.
166166
track_progress(log, "Removing existing lab...")
167-
delete.main(cml, lab.title, True, loglevel)
167+
delete.main(cml_config, lab.title, True, loglevel)
168168
else:
169169
log.info("No existing lab found, continuing...")
170170

0 commit comments

Comments
 (0)