Subject: [yang-doctors] Yangdoctors early review of draft-ietf-lisp-yang-11

From: Christian Hopps via Datatracker <[email-masked]>
Date: Thu, 25 Jul 2019 18:42:39 -0700

Reviewer: Christian Hopps
Review result: On the Right Track

* draft-ietf-lisp-yang-11 early yang-doctor review.

** Minor

   - Enumerations are not extensible and so should only be used when all the
     values are known and will not need to be added to. So, auth-algorithm-type
     should use identities and not an enumeration, as it almost for sure will
     need to be added to in the future. An example of this is present in RFC8177
     (keychains) which has identities derived from a base identity
     "crypto-algorithm".

   - "type string" is a very inclusive UTF-8 string, along with all legal UTF-8
     characters it includes tabs, spaces, newlines and carriage returns. This
     may not be what you actually want for things like "eid-id"s or
     "auth-key-id". You probably want to use a more restricted typedef variation
     of string (using a pattern to restrict its values).

   - Node name consistency, you probably should be consistent with the name for
     nodes of the same type. For example type "eid-id", sometimes the name is
     "id" other times "eid-id" is used.

   - TTL is limited to minute units. This may be overly restrictive. Couldn't
     there be some use (perhaps not common) e.g., perhaps when debugging, or in
     future versions of the protocol where seconds granularity might be useful?
     Changing these nodes later is non-backwards compatible and thus very
     painful to do.

** geo coordinates

   - It might be worth considering using the grouping in the geo-location module
     for specifying coordinates. The only drawback here would be if geo-location
     causes the publication to be delayed b/c lisp-yang finishes first. In any
     case the description for the coordinate nodes should echo more of the info from
     the LCAF RFC, in particular that the coordinate system used is WGS-84).

   - I found a lisp geo draft and it seems to specify a bit more detail than is
     covered in this module (e.g., the kilometer bit, radius, uncertainty). Not
     sure if that would be appropriate to add or not.

** Nits

  - Invalid example XML for LISP Map-Server.. The config namespace should not be
    "http://tail-f.com/ns/config/1.0".

  - Correct module vs model language.
    - OLD: <t>This module is the base LISP module that is augmented in multiple
    models to represent various LISP device roles.</t>
    - NEW: <t>This is the base LISP module.  It is further augmented by the
    LISP device role specific modules defined elsewhere in this document.</t>

  - Yang comments need some grammar fixes.
    - e.g., 'This augments *the* LISP decices list ...'

  - I got some warning from validation tools, but I'm not sure if they are
   valid, please double check though.

    - Pyang nits:
      #+begin_src bash
        for f in *.yang; do echo $f; \
        pyang --ietf --max-line-length 69 $f ; \
        done
        [email-masked]
        [email-masked]
        [email-masked]:86: warning: line length 70 exceeds 69 characters
        [email-masked]:106: warning: line length 70 exceeds 69 characters
        [email-masked]:157: warning: line length 71 exceeds 69 characters
        [email-masked]:164: warning: line length 70 exceeds 69 characters
        [email-masked]:171: warning: line length 72 exceeds 69 characters
        [email-masked]:179: warning: line length 72 exceeds 69 characters
        [email-masked]
        [email-masked]:125: warning: line length 70 exceeds 69 characters
        [email-masked]
        [email-masked]:91: warning: line length 72 exceeds 69 characters
        [email-masked]
        [email-masked]:204: warning: line length 70 exceeds 69 characters
        [email-masked]
        [email-masked]:431: warning: line length 70 exceeds 69 characters
        [email-masked]:485: warning: line length 71 exceeds 69 characters
        [email-masked]:490: warning: line length 71 exceeds 69 characters
      #+end_src