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

Remove AugmentationIdentifier and AugmentationNode

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: High High
    • 11.0.0
    • None
    • Operating System: All
      Platform: All

      Our current way of mapping augmentations onto the data tree relies on the declared model rather than effective model. This means that when a model contains multiple augmentations to the same target node, we treat them as separate entities.

      This leads to problems when leaves move across these augmentations, where the leaf address changes, even when the effective model remains unchanged.

      Given a base model:

      container foo {
      
      }

      Revision 1 of a second model:

      augment base:foo {
        leaf foo;
      }
      
      augment base:foo {
        leaf bar;
      }

      and revision 2 of the second model:

      augment base:foo {
        leaf bar;
        leaf foo;
      }

      The effective model and data tree layout of both revisions of the second model must remain the same.

      This requires introduction of a replacement for YangInstanceIdentifier.AugmentationIdentifier, which will be a subclass of AbstractPathArgument. It's node type will be constructed from the QNameModule of the model definiting the augmentation and its localname will be 'augmentation'. The use of this special case needs to be checked for conflicts.

      The parser needs to squash multiple augment instances into a single effective one, which contains all leaves.

      The DataTree should provide compatibility for lookups of the data, while the leaves need to be stored in the unified form.

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

              Created:
              Updated:
              Resolved: