Re: [yang-doctors] [Rift] Yangdoctors last call review of draft-ietf-rift-yang-03

zhang.zheng@zte.com.cn Thu, 09 September 2021 09:41 UTC

Return-Path: <zhang.zheng@zte.com.cn>
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 E78693A24A4; Thu, 9 Sep 2021 02:41:08 -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_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, 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 L-VM-f6yq1Xe; Thu, 9 Sep 2021 02:41:02 -0700 (PDT)
Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.217.80.70]) (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 CABD53A24A0; Thu, 9 Sep 2021 02:41:01 -0700 (PDT)
Received: from mse-fl1.zte.com.cn (unknown [10.30.14.238]) by Forcepoint Email with ESMTPS id 6E429EBE0E1C8C1596C9; Thu, 9 Sep 2021 17:40:58 +0800 (CST)
Received: from njxapp02.zte.com.cn ([10.41.132.201]) by mse-fl1.zte.com.cn with SMTP id 1899ecfn024899; Thu, 9 Sep 2021 17:40:38 +0800 (GMT-8) (envelope-from zhang.zheng@zte.com.cn)
Received: from mapi (njxapp01[null]) by mapi (Zmail) with MAPI id mid203; Thu, 9 Sep 2021 17:40:38 +0800 (CST)
Date: Thu, 09 Sep 2021 17:40:38 +0800
X-Zmail-TransId: 2af96139d6966d7a9151
X-Mailer: Zmail v1.0
Message-ID: <202109091740384839547@zte.com.cn>
In-Reply-To: <137d-6139d380-3-67131e80@232159592>
References: 137d-6139d380-3-67131e80@232159592
Mime-Version: 1.0
From: zhang.zheng@zte.com.cn
To: mvasko@cesnet.cz
Cc: noreply@ietf.org, draft-ietf-rift-yang.all@ietf.org, yang-doctors@ietf.org, rift@ietf.org, last-call@ietf.org
Content-Type: multipart/mixed; boundary="=====_001_next====="
X-MAIL: mse-fl1.zte.com.cn 1899ecfn024899
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/za5dpB6IL018UYCka-xQKvWLuiI>
Subject: Re: [yang-doctors] [Rift] Yangdoctors last call review of draft-ietf-rift-yang-03
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: Thu, 09 Sep 2021 09:41:10 -0000

Hi Michal, 
Got it. We'll change the type of the leaf to enum.
Thank you very much!
Best regards,
Sandy

------------------原始邮件------------------
发件人:MichalVaško
收件人:张征00007940;
抄送人:noreply@ietf.org;draft-ietf-rift-yang.all@ietf.org;yang-doctors@ietf.org;rift@ietf.org;last-call@ietf.org;
日 期 :2021年09月09日 17:27
主 题 :Re: [yang-doctors] [Rift] Yangdoctors last call review of draft-ietf-rift-yang-03
Hi Sandy,
firstly, sorry for the chaotic review. I have organized it properly but some formatting was lost, I will know next time.
As for your question, I do not see any node "algorithm-type" of type leaf, only choice. This choice includes 2 empty cases "spf" and "all-path". This YANG construct as it is has no purpose and cannot even be instantiated in YANG data, unless some YANG data nodes were added into the cases by augments. I suppose that is not the intention and you simply wanted to write a configuration node that could be set to either "spf" or "all-path" value. In that case you want to use enumeration like this:
leaf algorithm-type {
type enumeration {
enum spf {
description "The algorithm is SPF.";
}
enum all-path {
description "The algorithm is all-path.";
}
}
description "The possible algorithm types.";
}
If you need the possible "algorithm-type" values to be dynamic - allowed new to be added from other YANG modules, you can even use type "identityref" and define the values as identities.
Regards,
Michal
On Thursday, September 09, 2021 11:09 CEST, <zhang.zheng@zte.com.cn> wrote:
> Hi Michal,
> Thank you again for your review!
> We are do the updating work.
> But we are not sure that we got the meaning of the following comment:
> "algorithm-type - empty cases - redundant on their own, are expected to
> be augmented?"
> The algorithm-type leaf in the model is not empty. Could you please explain this comment more detailedly?
> Thank you very much!
> Best regards,
> Sandy
>
> ------------------原始邮件------------------
> 发件人:MichalVaškoviaDatatracker
> 收件人:yang-doctors@ietf.org;
> 抄送人:draft-ietf-rift-yang.all@ietf.org;last-call@ietf.org;rift@ietf.org;
> 日 期 :2021年07月08日 18:17
> 主 题 :[Rift] Yangdoctors last call review of draft-ietf-rift-yang-03
> Reviewer: Michal Vaško
> Review result: Almost Ready
>
> Generally, use references where make sense (features, nodes) and use units
> and/or standard types (ietf-yang-types) for leaves (such as grouping
> neighbor-node/bandwidth). All links are invalid, better to use references
> anyway because the module will be used outside the RFC.
>
> Specific problems:
>
> - description - copyright 2020
> - typedef ieee802-1as-timestamp-type - reference in description, put separately
> - grouping address-families
> - list with a single key can be leaf-list
> - would make sense if meant to be augmented with new nodes
> - grouping node-flag
> - used only once, makes sense if meant to be reused by other modules
> - consider using bits type in the leaf
> - grouping base-node-info/pod - redundant description, use union of number and
> "undefined", or leave out for undefined since it is not mandatory - augment
> rift/rx-lie-multicast-address,tx-lie-multicast-address
> - default value in description - should be defined in YANG
> - consider using
> refine on
> "addresses"
> rx-flood-port - redundant default in description, is obvious in YANG
> algorithm-type - empty cases - redundant on their own, are expected to
> be augmented? HAL - use lowercase
> database/tie/negative_disaggregation_prefixes
> - use hyphen instead of underscore
> - consider abbreviated/shorter node names
> - applicable for the following nodes as well
>
>
> _______________________________________________
> RIFT mailing list
> RIFT@ietf.org
> https://www.ietf.org/mailman/listinfo/rift