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

Expose SchemaInferenceStack.effectiveConfig()

XMLWordPrintable

      Current parser does not accurately process config statements, relying on DocumentedNode's and explicit lookups in parent. This means that users looking through EffectiveStatement hierarchy do not always see the config substatement when they should.

      For example, given the following model:

       

      module foo {
        prefix foo;
        namespace foo;
      
        grouping grp {
          container foo;
          container bar {
            config false;
          }
        }
      
        container baz {
          uses grp;
        }
      
        container oper {
          uses grp;
          config false;
      
          container cont;
        }
      
        rpc xyzzy {
          input {
            uses grp;
          }
        }
      }

      Should observe the following:

      • baz should have an implicit 'config true' substatement (as it is the default)
      • baz/foo should have an implicit 'config true' substatement (as it is the default/implied by parent)
      • oper/foo should have an implicit 'config false' substatement (as it is implied by parent)
      • oper/cont should have an implicit 'config false' substatement (as it is implied by parent)
      • xyzzy/input/bar should not have a config substatement (as it is instantiated in a context which ignores config)

       Note this has implications on memory efficiency and general lifecycle of uses/augment mechanics, hence we need to carefully evaluate the solution.

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

              Created:
              Updated: