Re: [yang-doctors] Yangdoctors early review of draft-ietf-teas-yang-te-types-01

"Mehmet Ersue" <mersue@gmail.com> Tue, 30 October 2018 15:06 UTC

Return-Path: <mersue@gmail.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D0893130DC2 for <yang-doctors@ietfa.amsl.com>; Tue, 30 Oct 2018 08:06:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9-T1sZpcbVsE for <yang-doctors@ietfa.amsl.com>; Tue, 30 Oct 2018 08:06:21 -0700 (PDT)
Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C491A130E1A for <yang-doctors@ietf.org>; Tue, 30 Oct 2018 08:06:20 -0700 (PDT)
Received: by mail-wr1-x429.google.com with SMTP id d10-v6so12982971wrs.5 for <yang-doctors@ietf.org>; Tue, 30 Oct 2018 08:06:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=eKefikqwcpixdEFCIfXzT9ynjuUP2VFkCTnarbshaSg=; b=tJrzZSgQiCsxkanx53Ql4+fh5v6884uCzMcDc7KVgCtKIHF1nenZH7M/PH6bR1i20M 3s5rMjC3BtLzzGuH+Z2hERnggCj2vOxYhCOJOB75pp9Xvo8pyUfg72Y2Yhx/gWbMUjFc K0+cDeuwXr0fa1SDEA7Lxz/g2XvG80LHneRworiiI39qiDavdCRqXqQwIwua5obVlvX5 UXYkHhpNm3UdNjOAiB+uVhywZKwFCnVOMdpQYmkOI+w6SWpAXTIuvDOH+peyjmg5lo08 OzgbXyE0BVY3kdW5QyBa94oRcHwp16Ua+GNwikjBLUsvCob1sEY7mD68bmpOmzQ0U3yy Dpow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=eKefikqwcpixdEFCIfXzT9ynjuUP2VFkCTnarbshaSg=; b=VFlClYqOh881ZVhaEv4kjtkl6r2NoQIvn+BzAeKqjPlX+RJQ2uiAsTVh/c8hRhQUNi F73d2MTtZkyHzV8XoBuHYg31TfKYkrNapa26Rhq/nm3DW8U6/g8xUR593Ka2pzuE1Qkd KkEVQcjsGVk/g05GT78uZPfE5UkwXeBDuTewT+3t6Q1H5glwy3jJalIVG0Hu4GBflDyw X9Kqo17EztKQ8BWsdhNQ5n/11kEdSbhV3tt46Dl0r4d387HSA2mdExlysoQ5QAibxB46 OX0n+FT3PyCcmMHy3TR0P4JLcCYq5fRfVV84lt0TsbgGWI8KgjcttvEZGwjkK19zTDDE 7LdQ==
X-Gm-Message-State: AGRZ1gI8W4B4pNSPAOSI7GXYk46SSY7yAqFqkxfi9XUrYMdoiMhgKuG+ Mj8UZP5yzEn6ZJdX3z80GTHiRKlI
X-Google-Smtp-Source: AJdET5coCJpxJzAd/BIslbqw3GzMobPfCMhwxY3KALukVAn5TUu0ST3L7BHb+8LnjIHBJknI+vv7Yw==
X-Received: by 2002:adf:fcc1:: with SMTP id f1-v6mr19004850wrs.172.1540911979010; Tue, 30 Oct 2018 08:06:19 -0700 (PDT)
Received: from DESKTOPFLHJVQJ ([5.176.20.106]) by smtp.gmail.com with ESMTPSA id 74-v6sm17729909wmi.23.2018.10.30.08.06.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 08:06:18 -0700 (PDT)
From: Mehmet Ersue <mersue@gmail.com>
To: 'Jan Lindblad' <janl@tail-f.com>, yang-doctors@ietf.org
References: <154090780735.15255.3911131220920609603@ietfa.amsl.com>
In-Reply-To: <154090780735.15255.3911131220920609603@ietfa.amsl.com>
Date: Tue, 30 Oct 2018 17:07:13 +0100
Message-ID: <007301d4706a$a172da10$e4588e30$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQFzERc4VuhMoYalswEylWsMwK67XKX6su3Q
Content-Language: de
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/eTBcPWvFGuXBvt74uxj7OT5BDo4>
Subject: Re: [yang-doctors] Yangdoctors early review of draft-ietf-teas-yang-te-types-01
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Oct 2018 15:06:24 -0000

Cool. Many Thanks Jan!

Cheers,
Mehmet

> -----Original Message-----
> From: yang-doctors <yang-doctors-bounces@ietf.org> On Behalf Of Jan
> Lindblad
> Sent: Tuesday, October 30, 2018 2:57 PM
> To: yang-doctors@ietf.org
> Cc: draft-ietf-teas-yang-te-types.all@ietf.org; ietf@ietf.org;
teas@ietf.org
> Subject: [yang-doctors] Yangdoctors early review of
draft-ietf-teas-yang-te-
> types-01
> 
> Reviewer: Jan Lindblad
> Review result: Ready with Issues
> 
> This is my YANG Doctor early review of draft-ietf-teas-yang-te-types, or
> more specifically ietf-te-types.yang . I find the module ready with a
couple of
> issues. I have also noted a few nits. Generally speaking, I'm not sure if
> reviewing a -types module with plenty of groupings on its own is the best
> way to go about it. The groupings defined here may be used in good or not
> so good ways later.
> 
> General questions:
> 
> #1: There are many locations in the YANG talking about an "ERO subobject
> index"
> (and once RRO index, record route subobject). What is this, and how is it
> supposed to be used? The document is silent on this matter, and I have
seen
> modules with problems around numeric index leafs much like this earlier.
Are
> these numbers stable, i.e. remains the same forever?
> 
> #2: There are few leafs (5) with default values given, and none with
> mandatory.
> Probably needs to increase before we get to last call.
> 
> #3: There are several choices in the module that are meant to be augmented
> with additional cases. In many instances, this is explicitly spelled out,
very
> good.
> If this is meant to happen in all choices, it would be nice to point this
out in
> every instance. Also, if there are any specific assumptions or
considerations
> to keep in mind when augmenting in a new technology, please note that in
> the description as well.
> 
> Issues and nits:
> 
> #4: Unclear data type
> 419:
>   typedef admin-group {
>     type binary {
>       length 4;
> 
> What is the format of this binary? If this is always a 4-byte binary,
wouldn't a
> numeric type be more user friendly, e.g. uint32?
> 
> #5: identifier in container with optional leafs
> 1496:
>   grouping te-topology-identifier {
> 
> The name suggests this is used as an identifier, but all the leafs are
optional.
> This is not typical. They are also in a container, precluding them from
being
> used as list keys. Is that as intended?
> 
> #6: Optional -id leafs again
> 1700:
>           leaf node-id {
>           leaf link-tp-id {
> 1768:
>         leaf address {
> 1783:
>         leaf node-id {
>         leaf link-tp-id {
> 
> Leafs that appear to be used as identifiers are optional
> 
> #7: binary length in bits?
> 
> 1731:
>            leaf as-number {
>             type binary {
>               length 16;
> 1773:
>         leaf ip-flags {
>           type binary {
>             length 8;
> 1805:
>           leaf label-flags {
>             type binary {
>               length 8;
> 
> It appears to me the modeler might have thought the length is given in
bits.
> The value of length is in bytes, however.
> 
> #8: Must expression copy paste
> 1852:
>     container label-end {
>       must "not(../label-end/te-label/direction) or "
>         + "not(te-label/direction) "
>         + "or ../label-end/te-label/direction = te-label/direction" {
> 
> This must expression appears to have been copied from label-start. In any
> case, it always evaluates to true and has no effect.
> 
> #9: Unclear bit field
> 1885:
>     leaf range-bitmap {
>       type binary;
>       description
>         "When there are gaps between label-start and label-end,
>          this attribute is used to specify the positions
>          of the used labels.";
>     }
> 
> Need more information on how to interpret this leaf. Which bits map to
> what, and what does the bit field values 0 and 1 indicate?
> 
> #10: Canonical representation
> 67:
>   typedef te-bandwidth {
> 
> The type is based on a string with a pattern allowing hex characters and
an
> upper or lowercase P. Since the pattern allows multiple representations of
> the same underlaying value (0x1p10 presumably means the same as 0x1p0xa
> and
> 0x1P0XA) the question comes up if there is a canonical representation of
this
> value, e.g. using all lowercase and all hex, or if the string must be
> remembered exactly as given by the client. The description could answer
this
> question.
> 
> #11: Mix of upper and lowercase
> The module specifies many enumeration and identity values. Some are all
> lowercase. Some are all uppercase. The principle of least astonishment
> suggests to pick one and stick with it. YANG recommendations suggest to
use
> all lowercase when in doubt.
> 
>   typedef te-link-direction {
>   typedef te-label-direction {
>   typedef te-hop-type {
>   identity LSP_METRIC_TYPE {
>   identity LSP_METRIC_RELATIVE {
>   identity LSP_METRIC_ABSOLUTE {
>   identity LSP_METRIC_INHERITED {
> 
> Best Regards,
> /jan
> 
> 
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors