Skip to content

Commit 02c3831

Browse files
committed
Add caveats to 'netlab show images' command
Also: add the most glaring Cumulus Linux caveats
1 parent ce8d167 commit 02c3831

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

netsim/cli/show_commands/images.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def show(settings: Box, args: argparse.Namespace) -> None:
2828
heading.extend([ p for p in settings.providers.keys() if p != 'external'])
2929

3030
rows = []
31+
caveats = []
3132
result = data.get_empty_box()
3233
for device in sorted(settings.devices.keys()):
3334
if device in DEVICES_TO_SKIP:
@@ -39,12 +40,18 @@ def show(settings: Box, args: argparse.Namespace) -> None:
3940
row = [ device ]
4041
has_image = False
4142
for p in heading[1:]:
42-
p_image = settings.devices[device][p].get("image","")
43-
row.append(p_image)
43+
p_data = settings.devices[device][p]
44+
p_image = p_data.get("image","")
4445
if p_image:
4546
result[device][p] = p_image
47+
if p_data.caveats:
48+
data.append_to_list(result[device],'caveats',p_data.caveats,flatten=True)
49+
caveats.extend(p_data.caveats if isinstance(p_data.caveats,list) else [ p_data.caveats ])
50+
p_image = '❗' + p_image
4651
has_image = True
4752

53+
row.append(p_image)
54+
4855
if has_image:
4956
rows.append(row)
5057

@@ -56,5 +63,10 @@ def show(settings: Box, args: argparse.Namespace) -> None:
5663
print(f"{args.device} image names {p_text}")
5764
print("")
5865
strings.print_table(heading,rows,inter_row_line=False)
66+
if caveats:
67+
strings.print_colored_text('\nCaveats:\n\n',color='bold')
68+
for cv in caveats:
69+
print(strings.wrap_error_message(f'* {cv}',indent=2))
70+
5971
elif args.format in ['text','yaml']:
6072
print(strings.get_yaml_string(result))

netsim/devices/cumulus.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ clab:
2323
interfaces: /etc/network/interfaces
2424
hosts: /etc/hosts
2525
image: networkop/cx:4.4.0 # Note: dated and known to have issues, unsupported
26+
caveats:
27+
- Cumulus 4.x containers are out-of-date and not supported
2628
group_vars:
2729
ansible_connection: docker
2830
ansible_user: root

netsim/devices/cumulus_nvue.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ libvirt:
1616
#
1717
# Latest as of November 2024, supports PVRST+ on single vlan-aware bridge
1818
image: CumulusCommunity/cumulus-vx:5.10.0
19+
caveats:
20+
- >-
21+
The Vagrant account on public Cumulus 5.x Vagrant boxes has expired password
22+
(details in https://netlab.tools/labs/cumulus_nvue/#changing-the-password-expiration-policy)
23+
- Newer Cumulus 5.x releases run only on NVIDIA Air
1924
virtualbox:
2025
image: CumulusCommunity/cumulus-vx:5.10.0
2126
group_vars:
@@ -86,6 +91,8 @@ clab:
8691
kind: cvx
8792
runtime: docker
8893
image: networkop/cx:5.3.0 # Note: dated and known to have issues, unsupported
94+
caveats:
95+
- Cumulus 5.x containers are out-of-date and not supported
8996
group_vars:
9097
ansible_connection: docker
9198
ansible_user: root

0 commit comments

Comments
 (0)