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

"Yutianpeng (Tim)" <yutianpeng@huawei.com> Mon, 24 September 2018 19:01 UTC

Return-Path: <yutianpeng@huawei.com>
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 9BE0013121A for <netconf@ietfa.amsl.com>; Mon, 24 Sep 2018 12:01:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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 lLgcHejnhFmO for <netconf@ietfa.amsl.com>; Mon, 24 Sep 2018 12:01:32 -0700 (PDT)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8E8CD13124B for <netconf@ietf.org>; Mon, 24 Sep 2018 12:01:04 -0700 (PDT)
Received: from lhreml706-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 236A2E2C32891; Mon, 24 Sep 2018 20:01:01 +0100 (IST)
Received: from LHREML523-MBX.china.huawei.com ([169.254.7.228]) by lhreml706-cah.china.huawei.com ([10.201.108.47]) with mapi id 14.03.0399.000; Mon, 24 Sep 2018 20:00:55 +0100
From: "Yutianpeng (Tim)" <yutianpeng@huawei.com>
To: Kent Watsen <kwatsen@juniper.net>, Martin Bjorklund <mbj@tail-f.com>, Alexander Clemm <alexander.clemm@huawei.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] mbj's WGLC review of yang-push-17
Thread-Index: AQHUNImzU9I4weZMB0iH1L0LVTTudKTT9lwAgADcoYCAARMGAIAA0q0AgADJvACAIN5/gIAAkQAAgAC6LgCABYyYAIAAsr4AgAAYUNA=
Date: Mon, 24 Sep 2018 19:00:56 +0000
Message-ID: <35FF0D51C8DAB54B95B0426331F984FF5205D540@lhreml523-mbx.china.huawei.com>
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>
In-Reply-To: <A1DF23A4-3D00-43D7-B121-D9F567B2A43F@juniper.net>
Accept-Language: zh-CN, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.203.126.98]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/joCUF1iJacp3g5SgIB6LPgKa45Y>
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: Mon, 24 Sep 2018 19:01:41 -0000

Personally I don't think we need to introduce complexity on this. I prefer use standard timeticks which also keep flexibility.
For the functionality mentioned with seconds, hours, etc, it is very simple with any of the program language nowadays.

Assume we use java and the value we get from yang-push is (yang_timestamp)
Then we can have a code sample as below:
//
long yang_timestamp = 100000000;
Timestamp time = new Timestamp(yang_timestamp);
System.out.println( (time.getHours()) );
System.out.println( (time.getMinutes()) );
//

These logic should be implemented by the program language itself,  not using none-standard yang data types.
And it is not difficult at all as there are implementations for all data types supported.
Hope it helps.

Thanks,
Tim

-----Original Message-----
From: Netconf [mailto:netconf-bounces@ietf.org] On Behalf Of Kent Watsen
Sent: 24 September 2018 19:16
To: Martin Bjorklund <mbj@tail-f.com>; Alexander Clemm <alexander.clemm@huawei.com>
Cc: netconf@ietf.org
Subject: Re: [Netconf] mbj's WGLC review of yang-push-17



>Alexander Clemm <alexander.clemm@huawei.com> wrote:
>> I am about to post -19 but I do not like the suggested change to go 
>> from timeticks to seconds.
>> 
>> Seconds is a fairly coarse unit.  I would not be surprised to see 
>> requirements for finer granularity in the future, even more so in 
>> virtualization and controller scenarios in which we start to see YANG 
>> being used.  There are applications that use single second periods 
>> today so I think it is entirely conceivable to see need for subsecond 
>> support down the line.  To allow periods only in units of seconds 
>> would seem to unnecessarily hobble ourselves.  Keeping things to 
>> timeticks is more futureproof IMHO.
>
> Ok.

I agree that seconds is too course. Hundredths of a second is maybe too fine, but I won't complain.  That said, I think that it might be an uncommon scenario and that having hundredths of a second will likely result in very large numbers.

FWIW, yang:timeticks doesn't seem as intuitive as "units" - for example:

          leaf period {
-           type yang:timeticks;
+           type uint16;
+           units "Hundredths of a second";
            mandatory true;
            description
              "Duration of time which should occur between periodic
               push updates.";
          }

At least I know what this means right away.  I was hoping to find an example in -19 illustrating its use, but it's none is present.  

BTW, I note that RFC 6991 says:

         When a schema
         node is defined that uses this type, the description of
         the schema node identifies both of the reference epochs.

Which I don't see in -19.

Would it make sense to use a 2-tuple?  Something like:

          leaf period {
            type uint16;
            mandatory true;
            description
              "Duration of time which should occur between periodic
               push updates.";
          }
          leaf period-units {
            type enumeration {
              enum hundredths;
              enum tenths;
              enum seconds;
              enum minutes;
              enum hours;
            }
            mandatory true;
          }



Kent // contributor


_______________________________________________
Netconf mailing list
Netconf@ietf.org
https://www.ietf.org/mailman/listinfo/netconf