Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Catalyst SD-WAN Lab 2.1.8 [Mar 5, 2026]

- In setup task, fix issue where --list would fail with `IndexError: list index out of range` when user has invalid image definitions created manually in CML

# Catalyst SD-WAN Lab 2.1.7 [Feb 3, 2026]

- In restore task, add backward compatibility for restoring old backups with legacy disk naming (sdb to vdb conversion for virtio disks)
Expand Down
14 changes: 8 additions & 6 deletions catalyst_sdwan_lab/tasks/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def main(
) in cml.definitions.image_definitions_for_node_definition(
node_definition_id
):
available_software_versions.append(image_definition["id"].split("-")[3])
parts = image_definition["id"].split("-")
if len(parts) > 3:
available_software_versions.append(parts[3])
print(f"- {node_definition_id}: {available_software_versions}\n")

elif software_versions_to_delete:
Expand Down Expand Up @@ -166,7 +168,7 @@ def main(
if new_node_definition == current_node_definition:
# If dicts are same then no update is required
log.info(
f'[KEEP] Node {current_node_definition["id"]} is already defined and up to date.'
f"[KEEP] Node {current_node_definition['id']} is already defined and up to date."
)
else:
# If dicts are not the same, then we need to update the node definition
Expand All @@ -178,9 +180,9 @@ def main(
)

log.info(
f'[UPDATE] Updating node {new_node_definition["id"]} with '
f'{new_node_definition["sim"]["linux_native"]["cpus"]} CPUs and '
f'{new_node_definition["sim"]["linux_native"]["ram"]} MB RAM.'
f"[UPDATE] Updating node {new_node_definition['id']} with "
f"{new_node_definition['sim']['linux_native']['cpus']} CPUs and "
f"{new_node_definition['sim']['linux_native']['ram']} MB RAM."
)
try:
# For virl2_client lower than 2.7.0
Expand All @@ -194,7 +196,7 @@ def main(
)
else:
# If node is not yet created, we need to create it
log.info(f'[CREATE] Creating node {new_node_definition["id"]}...')
log.info(f"[CREATE] Creating node {new_node_definition['id']}...")
cml.definitions.upload_node_definition(
new_node_definition, json=True
)
Expand Down