Skip to content

sonic: add sonic-vm lab builder support, SonicValidator, and sonic_ebgp lab - #233

Merged
dhalperi merged 1 commit into
mainfrom
sonic-lab-builder
Sep 23, 2026
Merged

dhalperi merged 1 commit into
mainfrom
sonic-lab-builder

Conversation

@dhalperi

Copy link
Copy Markdown
Member

Add a SONiC (containerlab sonic-vm) vendor profile to lab_builder:
eth1->Ethernet0 port mapping with a stride of 4, BGP health and
validate checks, and packaging of config_db.json and frr.conf under
sonic_configs//. build-sonic-image.sh builds the vrnetlab image
from the public SONiC VS build and caches it in S3; it patches the
wrapper's startup-config restore from "config replace", which stalls on
202605 and leaves bgpd on the default ASN, to "config reload" followed
by a bgp restart.

Replace the SonicValidator stub. Main RIB validation reuses the FRR
validator with a parser for FRR 8+ per-VRF route JSON; interface
validation and runtime data come from SONiC "show interfaces status".

Add sonic_ebgp, a two-node eBGP lab on SONiC 202605. Interface
properties are sickbayed on Batfish's missing SONiC port bandwidth
(#232); BGP RIB validation is not implemented.
sonic_bgp_lab lacks the new validator inputs, so its interface and RIB
tests no longer run.


Prompt:

Can we add support for SONiC routers to lab validation?

Follow-ups: the project is not migration-only, so new code is fine; use
a current SONiC image (202605) rather than 202411; send one PR with the
infra, validator fixes, and first lab.

…gp lab

Add a SONiC (containerlab sonic-vm) vendor profile to lab_builder:
eth1->Ethernet0 port mapping with a stride of 4, BGP health and
validate checks, and packaging of config_db.json and frr.conf under
sonic_configs/<node>/. build-sonic-image.sh builds the vrnetlab image
from the public SONiC VS build and caches it in S3; it patches the
wrapper's startup-config restore from "config replace", which stalls on
202605 and leaves bgpd on the default ASN, to "config reload" followed
by a bgp restart.

Replace the SonicValidator stub. Main RIB validation reuses the FRR
validator with a parser for FRR 8+ per-VRF route JSON; interface
validation and runtime data come from SONiC "show interfaces status".

Add sonic_ebgp, a two-node eBGP lab on SONiC 202605. Interface
properties are sickbayed on Batfish's missing SONiC port bandwidth
(#232); BGP RIB validation is not implemented.
sonic_bgp_lab lacks the new validator inputs, so its interface and RIB
tests no longer run.

----

Prompt:
```
Can we add support for SONiC routers to lab validation?
```

Follow-ups: the project is not migration-only, so new code is fine; use
a current SONiC image (202605) rather than 202411; send one PR with the
infra, validator fixes, and first lab.
@dhalperi
dhalperi enabled auto-merge (squash) September 23, 2026 15:39
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.76596% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.58%. Comparing base (29bf05f) to head (8897ab5).

Files with missing lines Patch % Lines
src/lab_validation/validators/SonicValidator.py 36.53% 33 Missing ⚠️
...ab_validation/parsers/sonic/commands/interfaces.py 95.00% 1 Missing ⚠️
...c/lab_validation/validators/CumulusFrrValidator.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
- Coverage   83.99%   83.58%   -0.42%     
==========================================
  Files          94       96       +2     
  Lines        4618     4703      +85     
==========================================
+ Hits         3879     3931      +52     
- Misses        739      772      +33     
Flag Coverage Δ
unittests 83.58% <62.76%> (-0.42%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dhalperi
dhalperi merged commit ee61a45 into main Sep 23, 2026
286 of 288 checks passed
@dhalperi
dhalperi deleted the sonic-lab-builder branch September 23, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants