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

Expose SchemaInferenceStack.effectiveStatus()

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 12.0.0, 11.0.4
    • model-api, model-util

    Description

      Our current inference does not propagate effective status into EffectiveStatement hierarchy, but rather performs some indeterminate magic with DocumentedNode.WithStatus.

      This mechanics is mostly specified in https://tools.ietf.org/html/rfc7950#section-7.21.2 , but the NETMOD WG list needs to be researched as to how parent/child relationships work – i.e. what would be the effective status of 'bar' here:

      module foo {
        prefix foo;
        namespace foo;
      
        container foo {
          status deprecated;
         
          container bar;
        }
      }

      as logic would dictate it is implied to be deprecated. This is even stronger when 'status obsolete' is in play – such statements should not be implemented, hence having 'status current' underneath them does not make much sense.

      The spec says that

         If a definition is "current", it MUST NOT reference a "deprecated" or
         "obsolete" definition within the same module.
         If a definition is "deprecated", it MUST NOT reference an "obsolete"
         definition within the same module.
      

      it could be argued that child statements are referencing their parent – at least for the purposes of:

      • having default effective config inherited from parent
      • having a schema node identifier, which references parent's argument

       

      Note that the mechanics of adding status statements has similar scalability implications as YANGTOOLS-1271, hence the two issues will probably share some common infrastructure.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: