YANG Tools¶
Overview¶
YANG Tools provides a set of libraries to deal with YANG models and data modeled using them.
Behavior/Feature Changes¶
YANG parser’s memory efficiency has been improved by about 5x on service-provider-grade device
models. This comes at the cost of removal of SchemaNode.getPath()
method. The returned
SchemaPath
did not correctly provide statement identification anyway, so was of quite limited
use in general schema navigation. Users relying on it for lookups need to update their algorithm
to explicitly track schema tree navigation – using utilities like SchemaInferenceStack
,
EffectiveStatementInference
, DataSchemaContextTree
.
The type mapping of type decimal64
has been changed to a dedicated Decimal64
class, similar
to uint8
and other built-in YANG types.
YANG parser will now validate the argument to unique
statement against its surroundings.
This specifically means that if a unique
statement contains schema node identifiers that do
not resolve to valid statements, the module will be rejected with a SourceException.
YANG parser will now rejects attempts to import-with-revision a YANG-1.1 module into a YANG-1 module, as per RFC7950 guidelines.
New Features¶
No new features.
Deprecated Features¶
Code generation plugin APIs for yang-maven-plugin
contained in the yang-maven-plugin-spi
artifact are deprecated and will be removed in the next major release. Their replacement live
in maven-agnostic plugin-generator-api
.
The SchemaPath
class has been deprecated and will be removed in the next major release. Please
use its correct replacements, SchemaNodeIdentifier
and EffectiveStatementInference
, which
provide more powerful capabilities.
The CheckedBuilder
and Builder
concepts have been deprecated and will be removed in the next
major release. Use of these interfaces makes life difficult when reasoning about callers of a
particular build()
method.
The IllegalArgumentCodec
concept has been deprecated and will be removed in the next major release.
Its semantics are quite confusing and it turned out to be hiding more problems than solving. Users
are advised to define their replacements with semantics appropriate to their use case.
Resolved Issues¶
The following table lists the issues resolved in this release.
Type |
Key |
Summary |
Resolution |
Fix Version(s) |
---|---|---|---|---|
Java 14+ breaks XSD regex translation |
Done |
7.0.16, 8.0.3 |
||
AbstractImmutableDataContainerNode violates equals() contract |
Done |
7.0.16, 8.0.3 |
||
Add DataSchemaContextTree/SchemaInferenceStack integration |
Done |
7.0.15, 8.0.2 |
||
JSON codec fails to decode instance-identifier to a choice/case/choice item |
Done |
7.0.15, 8.0.2 |
||
‘choice’ not allowed in ‘choice’ with yang-version 1.1 |
Done |
7.0.15, 8.0.2 |
||
Deviation of augmented case node fails |
Done |
7.0.15, 8.0.2 |
||
Attempted access to undeclared case statement |
Done |
8.0.2 |
||
BaseDecimalType is missing boundaries for fraction-digits=18 |
Done |
8.0.1 |
||
Deviation of augmented node causes NPE |
Done |
7.0.15, 8.0.0 |
||
InferenceException thrown when uses/augment is conditional on unsupported feature |
Done |
7.0.14, 8.0.0 |
||
XPath: XPath keyword not accepted as valid XPath expression |
Done |
6.0.9, 7.0.11, 8.0.0 |
||
Statement replicas do not trigger onStatementAdded() |
Done |
7.0.10, 8.0.0 |
||
Unique statement reference is not validated |
Done |
8.0.0 |
||
Parser reactor does not support chained prerequisites |
Done |
7.0.10, 8.0.0 |
||
NPE in parser reactor with if-feature inference |
Done |
6.0.9, 7.0.10, 8.0.0 |
||
IAE in StatementContextBase.childCopyOf() |
Done |
7.0.9, 8.0.0 |
||
Decimal64.valueOf(String) does not handle full length |
Done |
6.0.8, 7.0.9, 8.0.0 |
||
Error when module is imported with different prefixes |
Done |
6.0.9, 7.0.9, 8.0.0 |
||
MandatoryLeafEnforcer fails when faced with augmentations |
Done |
8.0.0 |
||
maven-plugin-it does not contribute to SonarCloud |
Done |
8.0.0 |
||
SchemaPath identification of SchemaNodes is costly and useless |
Done |
8.0.0 |
||
Update known unicode blocks for Java 11 |
Done |
7.0.16, 8.0.3 |
||
Improve trust between DefaultSchemaTreeInference and SchemaInferenceStack |
Done |
7.0.16, 8.0.3 |
||
Add Decimal64.valueOf() methods which specify expected precision |
Done |
8.0.0 |
||
AugmentEffectiveStatement should be SchemaTreeAwareEffectiveStatement |
Done |
8.0.0 |
||
Add OrderedByAwareEffectiveStatement |
Done |
8.0.0 |
||
Add a custom SoftSchemaSourceCache |
Done |
7.0.13, 8.0.0 |
||
Remove AugmentationSchemaNode.getOriginalDefinition() |
Done |
8.0.0 |
||
Codify AbstractModelStatement’s hashCode/equals/toString |
Done |
7.0.10, 8.0.0 |
||
Do not retain singleton RangeSets |
Done |
8.0.0 |
||
Implement TypedefNamespace as a linear search |
Done |
8.0.0 |
||
Intern yang.model.api.PatternExpression |
Done |
7.0.10, 8.0.0 |
||
Expose available StatementSupports from StmtContext |
Done |
8.0.0 |
||
Do not build FeatureEffectiveStatement for unsupported features |
Done |
7.0.10, 8.0.0 |
||
Allow bridging from UnqualifiedQName to QualifiedQName |
Done |
8.0.0 |
||
Carry java.nio.file.Path in {Yang,Yin}TextFileSchemaSource |
Done |
8.0.0 |
||
Enforce YANG 1/1.1 interoperability constraints |
Done |
8.0.0 |
||
Generate ietf-restconf operations leaf statements |
Done |
8.0.0 |
||
Improve SchemaInferenceStack diagnostics |
Done |
7.0.9, 8.0.0 |
||
Add yang.common.UnresolvedQName |
Done |
8.0.0 |
||
Promote UnknownEffectiveStatementBase |
Done |
8.0.0 |
||
Remove UnknownStatement.getExtensionDefinition() |
Done |
8.0.0 |
||
Re-examine argument storage in effective statements |
Done |
8.0.0 |
||
Fix QName.compareTo() logic |
Done |
8.0.0 |
||
Use flyweight EffectiveStatement implementations |
Done |
8.0.0 |
||
yang-data-api: use yang.common.Decimal64 for decimal64 leaves |
Done |
8.0.0 |
||
Expose a knob to control warnings about unkeyed lists with config=true |
Done |
8.0.3 |
||
Rework ImmutableNodes.fromInstanceId() |
Duplicate |
8.0.0 |
||
Add support for purely-effective substatements |
Done |
8.0.0 |
||
Index TypedefNamespace |
Done |
8.0.0 |
Known Issues¶
The following table lists the known issues that exist in this release.
Type |
Key |
Summary |
Status |
Affected Version(s) |
Fix Version(s) |
---|---|---|---|---|---|
yang-model-validator has an illegal option ‘no-wul’ |
Resolved |
8.0.3 |
8.0.4 |
||
Missing failedSource in SchemaResolutionException |
Resolved |
7.0.15, 8.0.3 |
7.0.16, 8.0.4, 9.0.0 |
||
Unsupported leaf under causes parsing failure |
Resolved |
8.0.3 |
8.0.4, 9.0.0 |
||
YangInstanceIdentifierWriter does not handle nested augmentations |
Resolved |
8.0.0, 8.0.3, 8.0.4 |
8.0.5, 9.0.0 |
||
YangXPathExpression.interpretAsInstanceIdentifier() does not handle unqualified names |
Confirmed |
6.0.8, 7.0.9, 8.0.2 |
8.0.6, 9.0.0 |
Resolved Issues in SR1¶
The following table lists the issues resolved in Service Release 1.
Type |
Key |
Summary |
Resolution |
Fix Version(s) |
---|---|---|---|---|
yang-model-validator has an illegal option ‘no-wul’ |
Done |
8.0.4 |
||
Missing failedSource in SchemaResolutionException |
Done |
7.0.16, 8.0.4, 9.0.0 |
||
Unsupported leaf under causes parsing failure |
Done |
8.0.4, 9.0.0 |
||
YangInstanceIdentifierWriter does not handle nested augmentations |
Done |
8.0.5, 9.0.0 |
Known Issues in SR1¶
The following table lists the known issues that exist in Service Release 1.