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

yang-model-util: Cross-reference constraints and default value

    XMLWordPrintable

Details

    • New Feature
    • Status: Confirmed
    • Resolution: Unresolved
    • None
    • None
    • parser
    • None
    • Operating System: All
      Platform: All

    Description

      http://tools.ietf.org/html/rfc6020#section-7.3.4 specifies that whenever a type is derived so that its constraints are not satisfied by the default value, a new default value needs to be set.

      This applies to DerivedTypes and ConcreteTypes, whose builder must check if this criterion is met. The check should be performed only when the default or constraints are changed. The problem should be reported via a new exception, DefaultViolatesConstraintsException, which is a subclass of IllegalArgumentException.

      For performance reasons, which requires us to retain compiled regular expressions in PatternConstraint – define a new interface and an implementation, such that the compiled pattern can be exposed to other users.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated: