Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1086

Add SchemaInferenceStack

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • 5.0.0
    • None
    • model-util
    • None

      SchemaPath most  notably used as a way to find nodes in SchemaContext. SchemaContextUtil, which is a major API contract between yang-model and mdsal-binding, uses SchemaPaths on either side of the API to infer in the location in SchemaContext we are talking about. That notion is strictly guesswork if groupings are involved, as SchemaPath is not expressive enough to differentiate between a grouping and a container of the same name.

      SchemaContextUtil side of things typically entails walking that initial entry point in various ways based on properties – such as leaf-ref resolution.

      For this use case a SchemaInferenceStack, which keeps track of SchemaNodes is better suited – caller (AbstractTypeGenerator) already performs recursion, so should be able to maintain it was it navigates the SchemaContext.

      As a further note – we want to design this on top of EffectiveModelContext, with perhaps a compat layer, to encourage adoption of EffectiveStatements.

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: