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

yanger: hide internal interfaces #674

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

rical
Copy link
Contributor

@rical rical commented Oct 1, 2024

Description

Redesign how Yanger iterates interfaces and how it fetches ip data.

Run ip link and ip addr once and handle the interface selection in Yanger. This should be faster on systems with many ports and it simplifies the CLI test files.

Refactor (cleanup) unit test to fit the new way of looping interfaces from Yanger.

Hide internal interfaces in operational Yang data and CLI output. Add new test data to ensure this is tested by the unit-tests.

Other information

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

rical added 3 commits October 1, 2024 14:28
Run ip link and ip addr once and handle the interface selection in
Yanger. This should be faster on systems with many ports and it
simplifies the CLI test files.

Signed-off-by: Richard Alpe <richard@bit42.se>
Yanger now has the ability to loop all interfaces (based on ip link),
this means we can run once for all interfaces.

Signed-off-by: Richard Alpe <richard@bit42.se>
In "14128047e18d statd: remove nl code and improve speed" the handling
of all interfaces where moved from statd to Yanger. This means statd no
longer tracks interfaces using Netlink, but instead relies on Yanger
to recognise and list all interfaces in the system. In the midst of
this change the ignoring of "internal" interfaces where lost.

In this commit we reintroduce this logic in Yanger and add a test case
that ensures internal interfaces isn't listed.

Fixes: 1412804 statd: remove nl code and improve speed

Signed-off-by: Richard Alpe <richard@bit42.se>
@rical rical changed the title Yanger hide internal interfaces Yanger: hide internal interfaces Oct 1, 2024
@rical rical changed the title Yanger: hide internal interfaces yanger: hide internal interfaces Oct 1, 2024
Copy link
Contributor

@wkz wkz left a comment

Choose a reason for hiding this comment

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

Great stuff!

@wkz wkz merged commit b21945f into kernelkit:main Oct 1, 2024
4 checks passed
@troglobit troglobit added this to the Infix v24.10 milestone Oct 9, 2024
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.

3 participants