Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start of an OSPF YANG northbound/mgmtd conversion #18401

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

choppsv1
Copy link
Contributor

No description provided.

@frrbot frrbot bot added mgmt FRR Management Infra ospf tests Topotests, make check, etc yang labels Mar 15, 2025
@choppsv1 choppsv1 marked this pull request as draft March 15, 2025 07:40
Signed-off-by: Christian Hopps <[email protected]>
@choppsv1 choppsv1 force-pushed the chopps/ospf-yang-ng branch 2 times, most recently from c84e72c to b26f735 Compare March 15, 2025 09:36
@vjardin
Copy link
Contributor

vjardin commented Mar 15, 2025

It is a very nice initiative @choppsv1 !

Could you add a documentation update too ? So its usage will spread quicker.

Signed-off-by: Christian Hopps <[email protected]>
This simple OSPF test utilizes less "magic" testing infrastructure. This
is useful when doing OSPF development as a quick way to enable a feature
to help test or develop it.

Signed-off-by: Christian Hopps <[email protected]>
@choppsv1 choppsv1 force-pushed the chopps/ospf-yang-ng branch from b26f735 to 2656eb0 Compare March 15, 2025 12:10
@choppsv1
Copy link
Contributor Author

choppsv1 commented Mar 15, 2025

Could you add a documentation update too ? So its usage will spread quicker.

mgmtd covnersion: https://docs.frrouting.org/projects/dev-guide/en/latest/mgmtd-dev.html#converting-a-daemon-to-mgmtd

The mgmtd conversion is pretty straight-forward and that is mostly done by the code that's present here already.

The main work here is the more basic northbound conversion which boils down to:

  1. copy the current CLI code to YANG callback handlers
  2. change the CLI command handlers to just set the data in the model

The docs for this are nice in covering everything but may make the task seem harder than it actually is.. it's really pretty simple once you do one command the rest end up being pretty rote.

northbound conversion: https://docs.frrouting.org/projects/dev-guide/en/latest/northbound/retrofitting-configuration-commands.html

northbound architecture: https://docs.frrouting.org/projects/dev-guide/en/latest/northbound/architecture.html

Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are some of the new ospf files auto-generated from the yang model(s)? If so, could you please separate the tool's output files from the ones you implement, instead of modifying them in-place? That makes it a lot easier to make incremental changes in the models and see those reflected in the tool output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master mgmt FRR Management Infra ospf size/XXL tests Topotests, make check, etc yang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants