Re: [Netconf] mbj's WGLC review of yang-push-17

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Tue, 25 September 2018 22:37 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1908A1277BB for <netconf@ietfa.amsl.com>; Tue, 25 Sep 2018 15:37:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 Y6e7-mlM_8ND for <netconf@ietfa.amsl.com>; Tue, 25 Sep 2018 15:37:07 -0700 (PDT)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 12677126F72 for <netconf@ietf.org>; Tue, 25 Sep 2018 15:37:06 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id C88DAE2D; Wed, 26 Sep 2018 00:37:04 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id 2EcPvWTSoTsA; Wed, 26 Sep 2018 00:37:04 +0200 (CEST)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Wed, 26 Sep 2018 00:37:04 +0200 (CEST)
Received: from localhost (demetrius4.jacobs-university.de [212.201.44.49]) by hermes.jacobs-university.de (Postfix) with ESMTP id A92AC20035; Wed, 26 Sep 2018 00:37:04 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius4.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id NarslpW8wygI; Wed, 26 Sep 2018 00:37:04 +0200 (CEST)
Received: from exchange.jacobs-university.de (SXCHMB02.jacobs.jacobs-university.de [10.70.0.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "exchange.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by hermes.jacobs-university.de (Postfix) with ESMTPS id 4F8A320031; Wed, 26 Sep 2018 00:37:04 +0200 (CEST)
Received: from anna.localdomain (10.50.218.117) by sxchmb03.jacobs.jacobs-university.de (10.70.0.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1415.2; Wed, 26 Sep 2018 00:37:03 +0200
Received: by anna.localdomain (Postfix, from userid 501) id 8DB18255165E; Wed, 26 Sep 2018 00:37:03 +0200 (CEST)
Date: Wed, 26 Sep 2018 00:37:03 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Kent Watsen <kwatsen@juniper.net>
CC: Netconf <netconf@ietf.org>
Message-ID: <20180925223703.afcjgmpsla4jkkfc@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Kent Watsen <kwatsen@juniper.net>, Netconf <netconf@ietf.org>
References: <3B841FC9-63F4-41DD-BCE2-AA543FDADA5C@juniper.net> <20180920.094520.798604819426315275.mbj@tail-f.com> <644DA50AFA8C314EA9BDDAC83BD38A2E0EB691A5@sjceml521-mbx.china.huawei.com> <20180924.093612.1791958587714330227.mbj@tail-f.com> <A1DF23A4-3D00-43D7-B121-D9F567B2A43F@juniper.net> <020f01d454ae$2e41e4a0$4001a8c0@gateway.2wire.net> <CABCOCHSATfi4Nq3XLGL65Kj4R_gWTFSf6H0v8qD8DE4aYOpDiQ@mail.gmail.com> <674F5961-D956-4BD1-8AD0-44FE68150070@juniper.net> <20180925213145.r72ybqbuv5qy4dct@anna.jacobs.jacobs-university.de> <5ED013C2-0D95-4B09-B0F5-D715DD58BE45@juniper.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <5ED013C2-0D95-4B09-B0F5-D715DD58BE45@juniper.net>
User-Agent: NeoMutt/20180716
X-ClientProxiedBy: SXCHMB03.jacobs.jacobs-university.de (10.70.0.155) To sxchmb03.jacobs.jacobs-university.de (10.70.0.155)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/qoY_i9ck5zJETJrUsNC6S26FJbQ>
Subject: Re: [Netconf] mbj's WGLC review of yang-push-17
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Sep 2018 22:37:09 -0000

On Tue, Sep 25, 2018 at 10:18:50PM +0000, Kent Watsen wrote:
> 
> > If you roll your own type, perhaps you want a type like this:
> >
> >  type centiseconds {
> >    type uint32;
> >    description
> >      "A period of time, measured in units of 0.01 seconds.";
> >  }
> 
> But then by that token, should we have types for seconds, minutes,
> hours, etc. too?  This might actually be nice to have, but perhaps
> part of a rfc6991bis instead?

Likely.
 
> This is why I was thinking to use the "units" statement:
> 
>          leaf period {
>             type unit32;
>             units "Hundredths of a second.";
>             mandatory true;
>             description
>               "Duration of time which should occur between periodic
>                push updates.";
>           }

Well, the whole point of a type definition is that you do not have
to repeat things multiple times and you can be sure you always have
exactly the same.

By giving a type a good name (but good may be subjective), you also
get information into derived artefacts such as tree diagrams. Compare
these three versions:

  +---w yp:periodic!
     +---w yp:period         yang:timeticks
     +---w yp:anchor-time?   yang:date-and-time

vs

  +---w yp:periodic!
     +---w yp:period         uint32
     +---w yp:anchor-time?   yang:date-and-time

vs

  +---w yp:periodic!
     +---w yp:period         centiseconds
     +---w yp:anchor-time?   yang:date-and-time

A centiseconds type could (of course) still have a suitable units
statement. Anyway, timeticks seems to be semantically wrong.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>