[YANGTOOLS-534] Honor if-feature during SchemaContext assembly Created: 20/Oct/15  Updated: 10/Apr/22  Resolved: 23/May/16

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

Type: Improvement
Reporter: Robert Varga Assignee: Igor Foltin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

When assembling a SchemaContext, we should omit any parts which are conditional on an if-feature (http://tools.ietf.org/html/rfc6020#section-7.18.2) so the end result is the effective view of the world without omitted features.

Defined features should not be explicitly enumerated, but rather controlled by the user by providing a Predicate<QName>. Implementations of Predicate#apply() will indicate acceptance via returning 'true', skip the feature by returning 'false', or halt SchemaContext assembly by throwing a subclass of RuntimeException (probably IllegalArgumentException or similar).



 Comments   
Comment by Igor Foltin [ 28/Apr/16 ]

Fix pushed:

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

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