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

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

XMLWordPrintable

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

      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.

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

              Created:
              Updated: