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

Validate ietf-restconf:yang-data substatements are unique

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: High High
    • 12.0.0, 10.0.10, 11.0.4
    • None
    • parser

      The template name used by ietf-restconf:yang-data is supposed to be unique within an EffectiveModuleStatement, i.e. this is invalid:

       

      module foo {
        import ietf-restconf { prefix rc; }
      
        rc:yang-data some {
          container foo;
        }
      
        rc:yang-data some {
          container bar;
        }
      }

      We should be rejecting this construct due to template name conflict. Make sure YangDataStatementSupport maintains a dedicated ParserNamespace<String, StmtCtx> keyed by the statement argument. This should be backed by NamespaceBehaviour.statementLocal() stored at the statement's parent.

      Also make sure module/submodule conflicts are detected properly.

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

              Created:
              Updated:
              Resolved: