Re: [CCAMP] Yangdoctors last call review of draft-ietf-ccamp-mw-yang-05

Jonas Ahlberg <jonas.ahlberg@ericsson.com> Mon, 11 June 2018 12:37 UTC

Return-Path: <jonas.ahlberg@ericsson.com>
X-Original-To: ccamp@ietfa.amsl.com
Delivered-To: ccamp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 66F6413101E for <ccamp@ietfa.amsl.com>; Mon, 11 Jun 2018 05:37:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.3
X-Spam-Level:
X-Spam-Status: No, score=-4.3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, T_KAM_HTML_FONT_INVALID=0.01] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com header.b=JWk+NeCE; dkim=pass (1024-bit key) header.d=ericsson.com header.b=Nakdkbzo
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 MwPoKYp3N4OF for <ccamp@ietfa.amsl.com>; Mon, 11 Jun 2018 05:37:36 -0700 (PDT)
Received: from sessmg23.ericsson.net (sessmg23.ericsson.net [193.180.251.45]) (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 4A6E4130FD9 for <ccamp@ietf.org>; Mon, 11 Jun 2018 05:37:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1528720644; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FRfnKE5K2mk07cHOFVK7QKxqjb+b5utaUhhtc8HXPEE=; b=JWk+NeCEuhwyeg/wKAiD1oRIPkSUfi2tDZlL2091i1cQHw/CGQMO2sNMu6yPkrCk 1QGo7Bh3cEtI2S2D17C3NB8xBogJwBa/dSpeClCu634BCdq1p3e6Clbu6OFfdPe+ CFdV+yqfUx51sn37Z2buk47+8JJGVww2ALY4+WW3+3A=;
X-AuditID: c1b4fb2d-c79ff700000028db-d9-5b1e6d037b2a
Received: from ESESSHC010.ericsson.se (Unknown_Domain [153.88.183.48]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id D8.0F.10459.30D6E1B5; Mon, 11 Jun 2018 14:37:24 +0200 (CEST)
Received: from ESESBMB501.ericsson.se (153.88.183.168) by ESESSHC010.ericsson.se (153.88.183.48) with Microsoft SMTP Server (TLS) id 14.3.382.0; Mon, 11 Jun 2018 14:37:23 +0200
Received: from ESESBMB501.ericsson.se (153.88.183.168) by ESESBMB501.ericsson.se (153.88.183.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 11 Jun 2018 14:37:23 +0200
Received: from EUR01-VE1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB501.ericsson.se (153.88.183.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Mon, 11 Jun 2018 14:37:23 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VM6QOG8dxtM3xlxT1mGJ+Zqql6nUCjqNihcCJf7QVvw=; b=Nakdkbzo+D517UCiVLji1sRZ4yU6tMNTFTzQQ45jEWfyScm6lhieC/6n53ubnpAQYo+5zigsgFWTsxv1M6bop0btu9rKGRk749oLJ3fp9h2XkIWgKEuvJI0GALGIUQqduv6I9om+lD9P0YdOz9aZNE0HKonXwpzRkTQ6siYuj+o=
Received: from HE1PR0701MB2332.eurprd07.prod.outlook.com (10.168.127.144) by HE1PR0701MB2779.eurprd07.prod.outlook.com (10.168.188.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.6; Mon, 11 Jun 2018 12:37:21 +0000
Received: from HE1PR0701MB2332.eurprd07.prod.outlook.com ([fe80::1927:fa72:5e4:7947]) by HE1PR0701MB2332.eurprd07.prod.outlook.com ([fe80::1927:fa72:5e4:7947%8]) with mapi id 15.20.0841.011; Mon, 11 Jun 2018 12:37:21 +0000
From: Jonas Ahlberg <jonas.ahlberg@ericsson.com>
To: "Yemin (Amy)" <amy.yemin@huawei.com>, Jan Lindblad <janl@tail-f.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
CC: "ccamp@ietf.org" <ccamp@ietf.org>, "draft-ietf-ccamp-mw-yang.all@ietf.org" <draft-ietf-ccamp-mw-yang.all@ietf.org>, "ietf@ietf.org" <ietf@ietf.org>
Thread-Topic: [CCAMP] Yangdoctors last call review of draft-ietf-ccamp-mw-yang-05
Thread-Index: AQHT/kjq3QsC+mlPCkiRTBL5JItWrqRWG90AgATX7dA=
Date: Mon, 11 Jun 2018 12:37:20 +0000
Message-ID: <HE1PR0701MB2332F59B6B96EDFC974C823189780@HE1PR0701MB2332.eurprd07.prod.outlook.com>
References: <152836670897.30871.16818219844116536782@ietfa.amsl.com> <9C5FD3EFA72E1740A3D41BADDE0B461FCF9DE258@dggemm508-mbx.china.huawei.com>
In-Reply-To: <9C5FD3EFA72E1740A3D41BADDE0B461FCF9DE258@dggemm508-mbx.china.huawei.com>
Accept-Language: sv-SE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [192.176.1.88]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; HE1PR0701MB2779; 7:7CThTTM3//Ip0xVkA6NiyrJ5wGlSBJcKh638L0j2EWPpaim4LWQHxnGpCOL/d3NFGWQNYfdA60Kw1ZbHKekOskM04UYoYM/8B8GJZCgCg8bkzX4nVmAAwXrd/PGPB9WnuGikFHWNNL65ZwhJX3VMhXTqA6wSOfq3kvk4zVtUVzOB/JbQ2aQu2sK/s7h2eoHvRkK2dXdZGE3WJ48YNpT6DH+u8WDQnhF/jxDhnUKDDc7SZ/oZAoYcPMHgQypho/3k
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0701MB2779;
x-ms-traffictypediagnostic: HE1PR0701MB2779:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=jonas.ahlberg@ericsson.com;
x-microsoft-antispam-prvs: <HE1PR0701MB277907BEF629C62685FE764089780@HE1PR0701MB2779.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(278428928389397)(50582790962513)(788757137089)(21748063052155)(17755550239193);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:HE1PR0701MB2779; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB2779;
x-forefront-prvs: 070092A9D3
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(396003)(376002)(39380400002)(346002)(13464003)(51444003)(40764003)(189003)(199004)(76094002)(66066001)(68736007)(2501003)(33656002)(790700001)(6116002)(81156014)(561944003)(551934003)(8676002)(3660700001)(25786009)(14454004)(3846002)(81166006)(606006)(966005)(6246003)(106356001)(97736004)(3280700002)(54906003)(105586002)(44832011)(478600001)(8936002)(5250100002)(345774005)(110136005)(99286004)(236005)(9686003)(53946003)(2900100001)(7696005)(55016002)(6306002)(186003)(54896002)(76176011)(53936002)(2906002)(229853002)(59450400001)(74316002)(4326008)(5660300001)(6506007)(6436002)(9326002)(26005)(53546011)(86362001)(102836004)(11346002)(486006)(476003)(316002)(7736002)(446003)(559001)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0701MB2779; H:HE1PR0701MB2332.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: FkVZkt+BdTUNE1c56JZ2tjEzNRfGBbhcLqo55lKpaMHfRgJri7vjPyPlkKHiDGxPW6NLvmTuyL4i1ZW3/HOKif34znlnzGIut52F+Y8PJPbh8IhCw3klWZUZey3d6xPRx56dGTca0WtRIUAN+jYmK5VQNdiXWMogUOpyBIspQ3jCJ8LRz329ISyb6h1/ehLu
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_HE1PR0701MB2332F59B6B96EDFC974C823189780HE1PR0701MB2332_"
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 518c1013-b03e-4c98-2c01-08d5cf981364
X-MS-Exchange-CrossTenant-Network-Message-Id: 518c1013-b03e-4c98-2c01-08d5cf981364
X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2018 12:37:20.8392 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2779
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUhTURjHOfeeXa/D1XFO9mRkMvCLpdkLsSKiohcLkjCIUkyHXnSom+1q pX7IsKAV6iA0lNJWK3W9O6lh5nyZZW+WGq76oMXMUtPCQGmL1u7uAr/9zvN//uf/PIfD0vJ+ SRSr1RVxBp0mX8VIcd3hR4nxuCA6LdFoC1Pbzt1n1OOX32P1wLCNUk88aMRqX30VUle1d6Ft TNIZ54wkyWL5TSU98FzHB+hU6ZZsLl97nDOs2ZopzX1o7KcLbdckJ5t+11DlqN2Bz6NQFsgG WPh1gzmPpKycOBE4O0yUeGhD8NQ+jcXDPILqhbe0YJETCwUuV7IgYGKiofe5O0TsuuQXOszB y8YR/PD9QoKFIYnwfarBL7CsgpRBbcsxoYcmdQg6qy0hQk8ESQGvuVkisIIcBFd7a4jIm6Hr SU9gWkxiwTs3RAksI5nQW+mViGEmBKPO2sB8oeQQ2K3NjMCIrICxhdGAmSZK+DjeSIlrE7B0 vKFFjoRJ91+JyDEwe+UlI/IKGGq8gIQAIA8pOGPsDhri4WdNDS0Kdn/ywO3gY66G/ophLCan w8y3qWBdD7V37gYNRgSnX/uQKESDtfIzNqG19YsmFFkPpqpWXB9YNRye141jsb4arj6eY0Re BTfN0/R/ftXlphbXr6IQK4rkOZ4vyFm3PoEzaLN4Xq9L0HFFrcj/v7rbvPF2dGt6ew8iLFKF yeYyotPkEs1xvqSgBwFLqxSyfTH+kixbU1LKGfQZhuJ8ju9By1msUsoSrB2pcpKjKeLyOK6Q M/xXKTY0qhyVFJ94CZcHkva3TEyO4G2zL24MVyTnnfKkR6yKzhlbduSmZ+cHpSzN0fwJmzsd S1FD+JfdnZrkjzpl4eFHiry+PetaZc9SPNoyykOfPVq2ty9upVlfUTk4NOC7qF5i2/5q13yT K8V7b5Nzxx/a8e501mDs20xmZOOVvER36df+ahXmczVr42gDr/kHsw9I3VsDAAA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/ccamp/iKsWh3h5gaip048Y99JjjLzv5B8>
Subject: Re: [CCAMP] Yangdoctors last call review of draft-ietf-ccamp-mw-yang-05
X-BeenThere: ccamp@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Discussion list for the CCAMP working group <ccamp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ccamp>, <mailto:ccamp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ccamp/>
List-Post: <mailto:ccamp@ietf.org>
List-Help: <mailto:ccamp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ccamp>, <mailto:ccamp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Jun 2018 12:37:46 -0000

Hi Jan,

Thank you for your review and valuable comments.
I've not responded to the latest mail since I have added comments to some of the items removed in that mail.
I've copied and pasted your comments into this mail instead, in order to make the thread of comments complete.

I've added my comments in green [Jonas].

I would like to ask CCAMP for support with the question about if the protection group is likely to be reused elsewhere or if it can be merged with the microwave module again.

Regards
JonasA

From: Yemin (Amy) <amy.yemin@huawei.com>
Sent: den 8 juni 2018 11:37
To: Jan Lindblad <janl@tail-f.com>om>; yang-doctors@ietf.org
Cc: ccamp@ietf.org; draft-ietf-ccamp-mw-yang.all@ietf.org; ietf@ietf.org
Subject: RE: [CCAMP] Yangdoctors last call review of draft-ietf-ccamp-mw-yang-05


Hi Jan,



Thanks very much for the comments. I found them are quiet useful to improve the models.

Please see my reply below in blue.

The draft co-authors may add more reply to your comments.



BR,

Amy

-----Original Message-----
From: CCAMP [mailto:ccamp-bounces@ietf.org] On Behalf Of Jan Lindblad
Sent: Thursday, June 07, 2018 6:18 PM
To: yang-doctors@ietf.org<mailto:yang-doctors@ietf.org>
Cc: ccamp@ietf.org<mailto:ccamp@ietf.org>; draft-ietf-ccamp-mw-yang.all@ietf.org<mailto:draft-ietf-ccamp-mw-yang.all@ietf.org>; ietf@ietf.org<mailto:ietf@ietf.org>
Subject: [CCAMP] Yangdoctors last call review of draft-ietf-ccamp-mw-yang-05



Reviewer: Jan Lindblad

Review result: Ready with Issues



YD review of draft-ietf-ccamp-mw-yang



I have now reviewed the YANG modules and corresponding examples of the -05 version of this draft. I have not read much of the RFC text, so I can't vouch for how well the text aligns with the model. I find the proposed modules in good shape. Most of my comments below are alternate ways of modeling something that the wg may consider, or a few things where I propose a better option for something that would be acceptable even as it is. There is a single issue that must be fixed IMO, see #8 below.



Let's start with module ietf-microwave-types.



#1) Consider adding structure to related identities



This module consists mostly of a long list of identities based off of coding-modulation. If it makes sense that in the future someone might be interested in doing something with all qam-4096 based identities or all -strong identities, say, it may make sense to model the identities as based on each other in a tree style. E.g.



  identity qam-4096 {

    base coding-modulation;

    description

      "4096 QAM coding and modulation scheme.";

  }



  identity qam-4096-strong {

    base qam-4096;

    description

      "4096 QAM strong coding and modulation scheme.";

  }



  identity qam-4096-light {

    base qam-4096;

    description

      "4096 QAM light coding and modulation scheme.";

  }



Or even go to "multiple inheritance" with multiple bases for identities, e.g.

for qam-4096 and strong. This would allow future applications to filter the identities on such criteria. Just a thought.
[Amy] change to base qam-4096. Multiple bases seem not applicable here.
[Jonas] I agree.



#2) Convention to use all lowercase in YANG symbols



There are a couple of identities with capitals. Consider changing to all lowercase; that is the YANG convention.



  identity E1 {

  identity STM-1 {
[Amy] will fix it.
[Jonas] OK.



Next, let's look at module ietf-interface-protection.



I can't say I understand exactly why this is a separate module. It publishes a single grouping, which is required by ietf-microwave-radio-link, and as far as I understand would probably never be used anywhere else. When the grouping is used a single time in ietf-microwave-radio-link, it is immediately refined.

Would probably reduce the clutter by merging the two modules and resolving the refine.

[Amy] They were in one model. During the WG discussion, comment was raised that the interface protection function could be generic and be used by other technologies in future, so we split the models.

I'm open to discuss about this.
[janl] Ok, I didn't quite see how the grouping would be used anywhere else, but if it indeed is usable elsewhere, having it in a separate module isn't a bad idea.
[Jonas] I'm in favor of reverting back to one single module gain, since it will simplify the model as you mention above. The argument for breaking it out into a separate module is that it can be used elsewhere. I'm doubtful if it ever will be, but here I think we need input from the rest of the community (at least from the CCAMP WG).





#3) Config true leaf name status



I find it counter-intuitive that a leaf called status (or state) is a configuration item. I had to re-read the model several times to get my head around the fact that this is indeed meant to be config true. Perhaps consider a name change?



      leaf status {

[Amy] status should be config false.
[Jonas] Correct. Our mistake.



#4) Action external-commands



There is a single action called external-commands (even in plural). It takes a single argument, which is the name of the operation to execute. No output. To me, a more natural modeling would be to make each of the external commands an action, over time possibly with different input and output.

[Amy] add output to describe the action result (success, fail, inprogress). But prefer to use one action.

Change the name to external-command.
[janl] Hmm, I don't quite understand your preference for a single action. I see how this choice closes doors, but no real benefit. This is no big deal, though, what you have works. Just feels less evolvable for no reason.
[Jonas] I'm not quite sure I've understood what you propose. Do you mean that we should replace the single action statement and the list of identifiers with several action statements:
action manual-switch-working;
action manual-switch-protection;
...
action clear;
The reason for using identities was that we wanted to make it easy to extend the module with additional, potentially vendor specific, commands by augmentation.
But maybe there are other ways to handle that in case of using the alternative approach you suggest.



Finally, we have module ietf-microwave-radio-link.



#5) Use derived-from when comparing identities



It's more future-proof and more likely to be interoperable if you use proper XPATH functions to determine kinship than using plain equality



  augment "/if:interfaces/if:interface" {

    when "if:type = 'mw-types:radio-link-terminal'";



is better written as



  augment "/if:interfaces/if:interface" {

    when "derived-from-or-self(if:type, 'mw-types:radio-link-terminal')";



This allows future sub-typing (sub-classing) of radio-link-terminal, i.e. new identities that are based on radio-link-terminal to reflect some special kind of RLT. It also improves chances of interoperability.

[Amy] will adopt this.

[Jonas] Agree.



#6) Blank id reasonable?



Leafs that function as an id usually do not have defaults. Does a blank id make sense here? If it does, maybe it would make more sense to leave it without a default and explain what happens if not set in the description instead? Or mark it as mandatory if it has to be set.



    leaf id {

      type string;

      default "";

[Amy] remove default. Add mandatory.

[Jonas] I think that the name of the attribute could be misleading. It's not a formal id of the terminal, it is a text string that is used by an optional system feature in a far-end RLT (on the opposite end of the microwave link) to verify that the correct two RLTs (far-end and near-end) are connected.
I don't think we should make it mandatory. I would suggest to leave it without default and clarify the consequences in the description.



#7) Use derived-from when comparing identities (again)



    leaf-list carrier-terminations {

      type if:interface-ref;

      must "/if:interfaces/if:interface[if:name = current()]"

         + "/if:type = 'mw-types:carrier-termination'" {



is better written as



      must "derived-from-or-self(/if:interfaces/if:interface[if:name =

      current()]"

         + "/if:type, 'mw-types:carrier-termination')" {



It is possible to write this in a more compact way, but there's nothing wrong with the above.



      must "derived-from-or-self(deref(current())/.."

         + "/if:type, 'mw-types:carrier-termination')" {

[Amy] will adopt this.

[Jonas] Agree.



#8) Badly broken frequency duplex config



If you read the descriptions in these related leafs:



    leaf tx-frequency {

      type uint32;

      units "kHz";

      mandatory true;

      description

        "Selected transmitter frequency.";

    }

   leaf rx-frequency {

      type uint32;

      units "kHz";

      description

        "Selected receiver frequency.

         Overrides existing value in duplex-distance.

         Calculated from tx-frequency and duplex-distance if

         only duplex-distance is configured.

         Must match duplex-distance if both leaves are

         configured in a single operation.";

    }



    leaf duplex-distance {

      type uint32;

      units "kHz";

      description

        "Distance between Tx & Rx frequencies.

         Used to calculate rx-frequency when

         rx-frequency is not specifically configured.

         Overrides existing value in rx-frequency.

         Calculated from tx-frequency and rx-frequency if only

         rx-frequency is configured.

         Must match rx-frequency if both leaves are configured

         in a single operation.";

    }



It appears that the author intends the system to fill in the value for one of these leaves based on the value set for the other. This is a big no-no. A system should never alter its own configuration, or automation flows (which is the whole purpose with YANG and NETCONF, remember) will break. Also, the validity of the configuration should not depend on how many operations are used to inject it.



I find this a serious flaw that must be fixed before the module can be released.



I propose fixing it like this:



    leaf tx-frequency {

      type uint32;

      units "kHz";

      mandatory true;

      description

        "Selected transmitter frequency.";

    }

    choice freq-or-distance {

      leaf rx-frequency {

        type uint32;

        units "kHz";

        description

          "Selected receiver frequency."

      }

      leaf duplex-distance {

        type uint32;

        units "kHz";

        description

          "Distance between Tx & Rx frequencies."

      }

    }



If you would like to have read-only computed values accessible in the model, maybe you could add:



    leaf actual-rx-frequency {

      type uint32;

      units "kHz";

      description

        "Computed receiver frequency."

      config false;

    }

    leaf actual-duplex-distance {

      type uint32;

      units "kHz";

      description

        "Computed distance between Tx & Rx frequencies."

      config false;

    }



Many other ways of doing this properly are also possible. Let me know if you'd like to discuss options.
[Amy] I think choice is a good way to model those leafs. I suggest to use it.
That's the real value of YANG doctors! Thanks.

[Jonas] Thanks for your help. We have discussed this a lot without finding a good solution. I agree that we should use it.
The only question I have is the name of the attributes. Should the attribute used for configuration or the attribute showing the resulting be called rx-frequency?
config-rx-frequency & rx-frequency   v.s.   rx-frequency & actual-rx-frequency



#9) Check that lower threshold is less than upper threshold



Would it make sense to add a must statement checking that the lower threshold is less than (or equal?) to the upper threshold?



    leaf atpc-lower-threshold  {

      when "../power-mode = 'atpc'";

      type power {

        range "-99..-30";

      }

      units "dBm";

      mandatory true;

      description

        "The lower threshold for the input power at far-end

         used in the ATPC mode.";

      reference "ETSI EN 302 217-1";

    }

    leaf atpc-upper-threshold  {
[Amy] can add the must statement.
[Jonas] Good!



#10) Choice more convenient



There are a few leafs that act as discriminators for when clauses in other leafs. Such constructs might be a little smoother when modeled as a choice instead. I'll take one and show as an example. This power-mode construct:



    leaf power-mode {

      type enumeration {

        enum rtpc {

          description

            "Remote Transmit Power Control (RTPC).";

          reference "ETSI EN 302 217-1";

        }



        enum atpc {

          description

            "Automatic Transmit Power Control (ATPC).";

          reference "ETSI EN 302 217-1";

        }

      }

      mandatory true;

      description

        "A choice of Remote Transmit Power Control (RTPC)

         or Automatic Transmit Power Control (ATPC).";

    }



    leaf maximum-nominal-power {

      type power {

        range "-99..40";

      }

      units "dBm";

      mandatory true;

      description

        "Selected output power in RTPC mode and selected

         maximum output power in ATPC mode. Minimum output

         power in ATPC mode is the same as the system

         capability, available-min-output-power.";

      reference "ETSI EN 302 217-1";

    }



    leaf atpc-lower-threshold  {

      when "../power-mode = 'atpc'";

      type power {

        range "-99..-30";

      }

      units "dBm";

      mandatory true;

      description

        "The lower threshold for the input power at far-end

         used in the ATPC mode.";

      reference "ETSI EN 302 217-1";

    }

    leaf atpc-upper-threshold  {

      when "../power-mode = 'atpc'";

      type power {

        range "-99..-30";

      }

      units "dBm";

      mandatory true;

      description

        "The upper threshold for the input power at far-end

         used in the ATPC mode.";

      reference "ETSI EN 302 217-1";

    }



could be modeled as:



    choice power-mode {

      container rtpc {

        description

          "Remote Transmit Power Control (RTPC).";

        reference "ETSI EN 302 217-1";

        leaf maximum-nominal-power {

          type power {

            range "-99..40";

          }

          units "dBm";

          mandatory true;

          description

            "Selected output power.";

          reference "ETSI EN 302 217-1";

        }

      }

      container atpc {

        description

          "Automatic Transmit Power Control (ATPC).";

        reference "ETSI EN 302 217-1";



        leaf maximum-nominal-power {

          type power {

            range "-99..40";

          }

          units "dBm";

          mandatory true;

          description

             "Selected maximum output power. Minimum output

             power is the same as the system

             capability, available-min-output-power.";

          reference "ETSI EN 302 217-1";

        }



        leaf atpc-lower-threshold  {

          type power {

            range "-99..-30";

          }

          units "dBm";

          mandatory true;

          description

            "The lower threshold for the input power at far-end

             used in the ATPC mode.";

          reference "ETSI EN 302 217-1";

        }

        leaf atpc-upper-threshold  {

          type power {

            range "-99..-30";

          }

          units "dBm";

          mandatory true;

          description

            "The upper threshold for the input power at far-end

             used in the ATPC mode.";

          reference "ETSI EN 302 217-1";

        }

      }

      mandatory true;

      description

        "A choice of Remote Transmit Power Control (RTPC)

         or Automatic Transmit Power Control (ATPC).";

}


[Amy] Choice is a better way. Is it possible to further refine your proposal?
Since maximum-nominal-power will be used by both RTPC and ATPC, how about to move it out of the choice, then use maximum-nominal-power in the choice? Like this:
        leaf maximum-nominal-power {
          type power {
            range "-99..40";
          }
          units "dBm";
         mandatory true;
          description
             "Selected maximum output power. Minimum output
             power is the same as the system
             capability, available-min-output-power.";
          reference "ETSI EN 302 217-1";
        }

    choice power-mode {
      container rtpc {
        description
          "Remote Transmit Power Control (RTPC).";
        reference "ETSI EN 302 217-1";

        use maximum-nominal-power;
      }
      container atpc {
        description
          "Automatic Transmit Power Control (ATPC).";
        reference "ETSI EN 302 217-1";

        use maximum-nominal-power;

        leaf atpc-lower-threshold  {
          type power {
            range "-99..-30";
          }
          units "dBm";
          mandatory true;
          description
            "The lower threshold for the input power at far-end
             used in the ATPC mode.";
          reference "ETSI EN 302 217-1";
        }
        leaf atpc-upper-threshold  {
          type power {
            range "-99..-30";
          }
          units "dBm";
          mandatory true;
          description
            "The upper threshold for the input power at far-end
             used in the ATPC mode.";
          reference "ETSI EN 302 217-1";
        }
      }
      mandatory true;
      description
        "A choice of Remote Transmit Power Control (RTPC)
         or Automatic Transmit Power Control (ATPC).";
    }


[janl] Yes, this is certainly very reasonable. I placed the maximum-nominal-power inside the choice because the description string was giving the leaf different interpretations in each case. In that case I felt it better to have separate leaves with clear descriptions. If you feel the leaf can be shared between the options with a clear definition of its meaning, this is reasonable.

[Jonas] One purpose of the mode attribute was to show if the carrier-termination was configured for RTPC or ATPC, but I guess the same can be achieved by looking for which container, rtpc or atpc, has been instantiated.
I suggest that we go for Jan's proposal since the attribute has different meaning in the two cases. One purpose of the



#11) Choice more convenient (again)



Same thing again for



    leaf coding-modulation-mode {

[Amy] will update it.

[Jonas] OK, see above.



#12) Unusual exponential notation



Do you really mean 10e-9 (=10*10^-9 =10^-8), or do you mean the more traditional notation 1e-9?



      leaf ber-alarm-threshold {

        type enumeration {

          enum "10e-9" {

[Amy] should be 1e-9. Need to confirm with the co-authors.

[Jonas] Yes, we mean 10^-9, 10^-8, ..., 10^-1.



#13) Separate module with grouping, used a single time with refine



Module ietf-interface-protection defines a grouping (protection-groups), which is used a single time, yet is refined when it is used below. As noted before comment #3, I find this way of laying out the YANG unnecessarily hard to read and understand, for no clear benefit.



  container radio-link-protection-groups { ....

    uses ifprot:protection-groups {



      refine protection-group/members {

        must "/if:interfaces/if:interface[if:name = current()]"

           + "/if:type = 'mw-types:carrier-termination'" {



Also, as noted in comment #7, the must statement is better written using derived-from-or-self. This applies regardless of the current refine statement is kept, or if the must statement moves to the actual leaf-list it applies to.

[Amy] Will update the must statement.

[Jonas] If I remember correctly, I think it was done with the ambition that it should be made generic so that other interface technologies could use the same protection module. In case, we revert back to one single module I suggest that we also simply the structure as Jan suggests.



Appendix A.1 & A.2



Besides the actual YANG modules, there are also a couple of examples in Appendix A.1 and A.2. I tried to use them and uncovered a couple of issues.



#14) Config false leaf in config example



Both examples list



        "tx-oper-status": on



This is a config false item, which could never be part of a configuration message (and it also lacks comma at the end).

[Amy] will remove it.

[Jonas] OK



#15) Wrong type in example



Both examples list



        "coding-modulation-mode": 0,



0 not a legal value, should be "single" to match the rest of the example data.

[Amy] will fix it.

[Jonas] OK



#16) Missing mandatory parameter



Both examples lacks leaf maximum-nominal-power, which is mandatory according to the YANG, so the transaction fails to validate.

[Amy] will add it.

[Jonas] OK



#17) Examples perhaps a tad basic



The examples are demonstrating only a small part of the module functionality. A bigger example, e.g. including xpic with interface pointers might be useful.



Feel free to reach out to me to discuss any of this. Thank you.

[Amy] will add additional example.

[Jonas] Good suggestion. Amy, let's what configuration to show.



/jan





_______________________________________________

CCAMP mailing list

CCAMP@ietf.org<mailto:CCAMP@ietf.org>

https://www.ietf.org/mailman/listinfo/ccamp