Skip to content

ADD support for .sid file generation and update - #2556

Open
HanzlikPetr wants to merge 2 commits into
CESNET:develfrom
HanzlikPetr:sid_generation
Open

ADD support for .sid file generation and update#2556
HanzlikPetr wants to merge 2 commits into
CESNET:develfrom
HanzlikPetr:sid_generation

Conversation

@HanzlikPetr

Copy link
Copy Markdown

Adds Schema Item Identifier (SID) file support per RFC 9595, enabling
libyang to generate, update, and extend .sid files for YANG modules.
The change spans the library (new ietf-sid-file module and
printer_sid.c) and the yanglint tool (new sid command).

Library (public API in tree_schema.h):

  • lys_sid_gen() - generate a new .sid file
  • lys_sid_update() - update a previous .sid file (reuse SIDs, mark removed items "obsolete", bump sid-file-version)
  • lys_sid_range_add() - append a new assignment range
  • LYS_SID_FILE_STATUS enum (UNPUBLISHED / PUBLISHED)

yanglint sid command (interactive and -g/--sid non-interactive):

  • generate EP:SIZE [published]
  • update <prev.sid> [published]
  • range-add EP:SIZE <prev.sid>

Comment thread modules/ietf-sid-file@2024-07-31.yang Outdated
Comment thread src/printer_sid.c Outdated
Comment thread src/printer_sid.c Outdated
Comment thread src/printer_sid.c Outdated
Comment thread src/printer_sid.c Outdated
Comment thread tools/lint/main_ni.c Outdated
@HanzlikPetr
HanzlikPetr force-pushed the sid_generation branch 2 times, most recently from c46d39e to 44d6bc1 Compare August 19, 2026 08:48
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