[YANGTOOLS-666] [Yang 1.1] Allow "if-feature" in "bit", "enum", "identity" and "refine" statements. Created: 06/Oct/16  Updated: 10/Apr/22  Resolved: 19/Dec/16

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Peter Kajsa Assignee: Peter Kajsa
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks YANGTOOLS-355 Milestone: Introduce support for YANG... Resolved
is blocked by YANGTOOLS-664 Extend yang statement parser to suppo... Resolved
is blocked by YANGTOOLS-699 Milestone: [Yang 1.1] Yang model API ... Resolved
External issue ID: 6869

 Comments   
Comment by Martin Ciglan [ 19/Oct/16 ]

RFC7950:

Presence of an "if-feature" statement in a "bit"
statement does not affect the automatically assigned position.

7.20.2. The "if-feature" Statement
The "if-feature" statement makes its parent statement conditional.
The argument is a boolean expression over feature names. In this
expression, a feature name evaluates to "true" if and only if the
feature is supported by the server. The parent statement is
implemented by servers where the boolean expression evaluates to
"true".
The if-feature boolean expression syntax is formally defined by the
rule "if-feature-expr" in Section 14. Parentheses are used to group
expressions. When the expression is evaluated, the order of
precedence is (highest precedence first): grouping (parentheses),
"not", "and", "or".
If a prefix is present on a feature name in the boolean expression,
the prefixed name refers to a feature defined in the module that was
imported with that prefix, or the local module if the prefix matches
the local module’s prefix. Otherwise, a feature with the matching
name MUST be defined in the current module or an included submodule.
A leaf that is a list key MUST NOT have any "if-feature" statements.

Comment by Igor Foltin [ 31/Oct/16 ]

API change - https://git.opendaylight.org/gerrit/#/c/47773/

Comment by Peter Kajsa [ 12/Dec/16 ]

https://git.opendaylight.org/gerrit/#/c/49242/

Generated at Wed Feb 07 20:53:56 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.