Skip to content

YANG: fix RFC 7950 violations in clixon-controller.yang - #259

Open
jdad1 wants to merge 1 commit into
clicon:mainfrom
jdad1:fix/yang-rfc7950-compliance
Open

jdad1 wants to merge 1 commit into
clicon:mainfrom
jdad1:fix/yang-rfc7950-compliance

Conversation

@jdad1

@jdad1 jdad1 commented Oct 20, 2026 •

Copy link
Copy Markdown

Strict YANG compilers (pyang 2.7.1, yanger) reject clixon-controller@2026-06-01.yang with the following errors, which also blocks tools such as Swagger/OpenAPI generators for any module importing clixon-controller:

  • augment '/nc:get-config/input/source/config-source' (and the edit-config counterpart): unprefixed nodes in an augment path refer to the current module (RFC 7950 sec 6.5), so 'input', 'source' and 'config-source' were looked up in clixon-controller. Prefix them with 'nc:'.

  • connection-change input leaf 'operation': 'default 0' is not a valid enumeration value; enum defaults must use the enum name (RFC 7950 sec 9.6.1). Use 'CLOSE', which is the enum with assigned value 0.

  • device-template-apply input: 'choice template' and its child 'leaf template' share the same identifier namespace (RFC 7950 sec 6.2.1). Rename the choice to 'template-choice'. Choice names do not appear in instance data, so the XML/JSON encoding is unchanged.

UPD: Rebased onto current main (8804a4b).

  • Main has since renamed the module to the new clixon-controller@2026-10-01.yang
    revision. The same three issues are still there (now at lines 153, 160, 1114
    and 1268), and the fix applies unchanged. The CHANGELOG entry now refers
    to 2026-10-01.
  • This answers the question above: the fix now goes into the unreleased
    2026-10-01 revision, so released revisions are not edited.
  • The earlier CI failure in test-yang-domain.sh was unrelated. The test
    hard-coded the openconfig-system revision, and the clixon/openconfig image
    now ships 2026-07-20. Main already fixes this. Locally, the
    nacm-yang-other group and test-template.sh pass after the rebase.

Strict YANG compilers (pyang 2.7.1, yanger) reject clixon-controller@2026-10-01.yang
with the following errors, which also blocks tools such as Swagger/OpenAPI
generators for any module importing clixon-controller:

* augment '/nc:get-config/input/source/config-source' (and the edit-config
  counterpart): unprefixed nodes in an augment path refer to the current
  module (RFC 7950 sec 6.5), so 'input', 'source' and 'config-source' were
  looked up in clixon-controller. Prefix them with 'nc:'.

* connection-change input leaf 'operation': 'default 0' is not a valid
  enumeration value; enum defaults must use the enum name (RFC 7950
  sec 9.6.1). Use 'CLOSE', which is the enum with assigned value 0.

* device-template-apply input: 'choice template' and its child
  'leaf template' share the same identifier namespace (RFC 7950 sec 6.2.1).
  Rename the choice to 'template-choice'. Choice names do not appear in
  instance data, so the XML/JSON encoding is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdad1
jdad1 force-pushed the fix/yang-rfc7950-compliance branch from 2f83e80 to 7890b6c Compare October 22, 2026 13:34
@jdad1

jdad1 commented Oct 22, 2026

Copy link
Copy Markdown
Author

Rebased onto 8804a4b

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.

1 participant