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

YANG min-elements within non-presence container does not work #355

Closed
olofhagsand opened this issue Aug 23, 2022 · 1 comment
Closed

YANG min-elements within non-presence container does not work #355

olofhagsand opened this issue Aug 23, 2022 · 1 comment

Comments

@olofhagsand
Copy link
Member

Easiest shown by an example. The parent (containing yang node) is eg a list/module.
The following reports an error in validation:

leaf-list a {
   min-elements 1;
   type string;
}

The following does NOT report a validation error (but should):

 container c {
    leaf-list a {
      min-elements 1;
      type string;
   }
}
@olofhagsand
Copy link
Member Author

Fixed by patch

olofhagsand added a commit that referenced this issue Sep 1, 2022
…minmax.[ch]

Added new recursive minmax check for non-presence containers
This makes validation checks stricter, including check of incoming RPCs
Renamed xml_yang_check_list_unique_minmax() to xml_yang_minmax_recurse()
Fixed again: [YANG min-elements within non-presence container does not work](#355)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant