Skip to content

[sonic-yang-models] Add YANG model for OSPFv2#27855

Open
rakshitha-marvell wants to merge 1 commit into
sonic-net:masterfrom
rakshitha-marvell:OSPFV2_YANG
Open

[sonic-yang-models] Add YANG model for OSPFv2#27855
rakshitha-marvell wants to merge 1 commit into
sonic-net:masterfrom
rakshitha-marvell:OSPFV2_YANG

Conversation

@rakshitha-marvell

@rakshitha-marvell rakshitha-marvell commented Jun 12, 2026

Copy link
Copy Markdown

Add sonic-ospfv2.yang covering OSPFV2 CONFIG_DB tables.

Register the model in setup.py, add sample CONFIG_DB entries, and add positive and negative YANG validation test cases.

Why I did it

The OSPFV2 CONFIG_DB tables are consumed by sonic-frr-mgmt-framework (frrcfgd) but do not have corresponding YANG models.
Without YANG coverage, sonic-yang and CVL cannot validate field types, ranges, enum values, or inter-field dependencies for OSPFv2 configuration.

Work item tracking
  • Microsoft ADO (number only):

How I did it

  • Added sonic-ospfv2.yang covering all OSPFV2 CONFIG_DB tables.
  • Registered the model in setup.py.
  • Added sample OSPFv2 entries to sample_config_db.json.
  • Added positive and negative YANG model test cases.
  • Added validation constraints for SPF timers, MD5 authentication parameters, and interface-level configuration restrictions.

How to verify it

  • Applied OSPFv2 configuration using:
    config apply-patch <patch_file>
  • Verified that the configuration was successfully updated in CONFIG_DB.
  • Verified that the configuration was correctly reflected in FRR using:
    vtysh -c "show running-config"
  • Confirmed that the generated FRR configuration matches the applied CONFIG_DB configuration.

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202605

Tested branch (Please provide the tested image version)

Description for the changelog

Added YANG model support for OSPFV2 CONFIG_DB tables and enabled CVL validation.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Add sonic-ospfv2.yang covering OSPFV2 CONFIG_DB tables.

Register the model in setup.py, add sample CONFIG_DB
entries, and add positive and negative YANG validation
test cases.

Signed-off-by: Rakshitha SK <rsk@marvell.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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