Re: [Netconf] [yang-doctors] YANG Doctor question: empty mandatory choice?

Kent Watsen <kwatsen@juniper.net> Mon, 30 July 2018 18:15 UTC

Return-Path: <kwatsen@juniper.net>
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 A49291311A0; Mon, 30 Jul 2018 11:15:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=juniper.net
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 jUiVwvcYF9np; Mon, 30 Jul 2018 11:15:06 -0700 (PDT)
Received: from mx0b-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (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 513A71311A2; Mon, 30 Jul 2018 11:04:37 -0700 (PDT)
Received: from pps.filterd (m0108157.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6UI3lWa012862; Mon, 30 Jul 2018 11:04:36 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=PPS1017; bh=BfaouicMs1l7Td26w4jLONLH6BMk5k30O2sazNTR6ls=; b=vIgx/f/n4q/OryirJqIL7WTKsOR2XYv9yhwIQgRK6dFT61U/EmnijsztBJJH4btsrMiM wc8ruADk/zmKY3R7Kvgfuc/kUbghEWQe/9frEp/DYmh/9CZ2rn+mw2xA0Y05NjKTNbyH 427u9GfETBf14dHy1oJ+Dzt61iRoQKbM41sGoTCEfmekwmJVu2rF7D5k1ILifzUcx89N LNackfcRZx96KN2nc1kQ+F6/eZ97hWTnON00HGCKFzf8FxLTQZ1CvoI/59NnVQ46Woun bnesfFGAAvLGj67TtSrQyLvb4ZyEAMiFoBY7/3J8StVhTVE+h7CoixXHMsRKignJiWyh tg==
Received: from nam01-by2-obe.outbound.protection.outlook.com (mail-by2nam01lp0176.outbound.protection.outlook.com [216.32.181.176]) by mx0a-00273201.pphosted.com with ESMTP id 2kj6jg0557-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 30 Jul 2018 11:04:35 -0700
Received: from BYAPR05MB4230.namprd05.prod.outlook.com (52.135.200.153) by BYAPR05MB4840.namprd05.prod.outlook.com (52.135.235.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.10; Mon, 30 Jul 2018 18:04:33 +0000
Received: from BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::84c5:999c:9159:d416]) by BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::84c5:999c:9159:d416%2]) with mapi id 15.20.1017.010; Mon, 30 Jul 2018 18:04:33 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Martin Bjorklund <mbj@tail-f.com>, "evoit=40cisco.com@dmarc.ietf.org" <evoit=40cisco.com@dmarc.ietf.org>
CC: "yang-doctors@ietf.org" <yang-doctors@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [yang-doctors] YANG Doctor question: empty mandatory choice?
Thread-Index: AQHUJ1RfQ22OSTJQ8EiSn/dfHqkHFKSnzdKA
Date: Mon, 30 Jul 2018 18:04:33 +0000
Message-ID: <277A3AB6-40E9-466C-9FF6-316EC38737E7@juniper.net>
References: <727ae35abd394a85812168615acce2d3@XCH-RTP-013.cisco.com> <20180729.175356.1841285666617255654.mbj@tail-f.com>
In-Reply-To: <20180729.175356.1841285666617255654.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
x-originating-ip: [66.129.241.12]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BYAPR05MB4840; 6:AROpZHW285ua5zGmeu9S4nlD/knTshs3qM5tNYYzb7+IaJgcUvymfTW1KaoaJOltdhBdzQXYqotT/D3FSaNEO+d/wwR+EImvR0BZdhh2a1Qcnuls9Q9PRPqnzNAkKkui20oVwT2u/JGkPI+YwFYBKLDpJeC7Yr+icdgPoiYp7yV6kK/FfpG5JRkC8uw/0mDgRTteZpgzBXtvvUQp2oFTOX8P5y5ETzYphF2A5AyYfBwGf4UwNM7kOFJ5CRfC7bpocFV6YHIy0Oz5mbVxM0XnszEP3CIFOQKRlIAuf2SqBvVNyFYpNSN4r9yA5kg6mKVZlT7ERSHJ8v7BdEm5UCcY5boQtHZcyM6jApAq0MQ2y9GsEwSYqzNhvxWVbTGBfEdcpXEt/Glvzz3Pps8JhILMDZNWy2GysehchrKLlfXMVxZZ48zaIUa2iTVhR+HqIe9Nr+D27fGlsbtpOK2LqsOT6g==; 5:jr4ae/sBASAKwxwrKAh+PfE7fHU79wWNUOyyK6Ixz/ur1VfU/0na3G0EePD6A8G9uEaGMbKET5FddE/8aOss2cIHjk7QZqPO9hCsDcF4rhlZD4xgJ0WteaXuTxNg4nqILO9DnRHZ1wMKBwlDITYSG9F3XltKogqKOv+RVgQliHs=; 7:jd7V2gndDFglmePgqblWsdFnA41fMumLN0LrmmzCGhmkVD+/pGHYbevAhuEI2gWadaOtNcQrzDJPhkTvWQD9hxSwTy1dckWTlzoLVcHtXlDbDF32baVJ00tnyCiPfx2KxFn5MgbwKaqHiVncgUVn+BaOGHDqEguObyNik2aoppGFXyB3Lc0tjwGh6LxgxqI6KNY4pv6YHbD1AGY9Ge6xOCKS0RqIf2pDmL28os3BjrNZS4iZU6WD2ieI1EBBbNs4
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: f0b02d21-de4f-487d-a461-08d5f646e7ab
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:BYAPR05MB4840;
x-ms-traffictypediagnostic: BYAPR05MB4840:
x-microsoft-antispam-prvs: <BYAPR05MB4840D55871046B5D34A491B4A52F0@BYAPR05MB4840.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:BYAPR05MB4840; BCL:0; PCL:0; RULEID:; SRVR:BYAPR05MB4840;
x-forefront-prvs: 0749DC2CE6
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(376002)(346002)(136003)(396003)(189003)(199004)(4326008)(25786009)(53936002)(2900100001)(6246003)(105586002)(5250100002)(106356001)(76176011)(83716003)(5660300001)(6116002)(3846002)(256004)(66066001)(86362001)(6486002)(97736004)(478600001)(446003)(33656002)(26005)(186003)(102836004)(36756003)(82746002)(305945005)(6506007)(476003)(2616005)(11346002)(486006)(7736002)(316002)(14454004)(229853002)(8676002)(8936002)(2906002)(81156014)(81166006)(54906003)(110136005)(6512007)(68736007)(58126008)(99286004)(6436002); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR05MB4840; H:BYAPR05MB4230.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: MZAVBme2qFcLker14wtuV+gV8jHK9Q6pZsjjxHX6zyaxGEZ50SJbrQU8repCzc0uEVuHhitFqhTv3MuUf0+cd64lhDGXAf60FXnlLae7ElrPS+g4FwWaTP6SEHLc3WgaPpNJZjDYyXSHqND9LtNR508upln9ufYYJ2EVBZPBfBkg4uSNlqocHf6XNP25n7zuzkK31pM5HIkEK7f0WE8s67pZsgm4yXFArbRigyCPNtyEbfhYgQWMD3oSQCqVaj01BDK28kctzLyhk06UmJbCg2GO114g9EAqwYgPkPPakMUj8ShiilgLWB3KvHO+QU6GjS6xbeyM99QAtO/B6iIYhcf52jbkYEAyn80Y3ZlMj3M=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <1F01DAB198F47B4B803DEDA5BF31C096@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: f0b02d21-de4f-487d-a461-08d5f646e7ab
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2018 18:04:33.6591 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB4840
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-07-30_08:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=848 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807300193
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/0oGvWH1kIzi1H4AyyLPuD749X_U>
Subject: Re: [Netconf] [yang-doctors] YANG Doctor question: empty mandatory choice?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.27
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, 30 Jul 2018 18:15:10 -0000



> I assume that an augmentation would be done like this:
>
>   module ietf-netconf-subscribed-notifications {
>     ...
>     prefix nsn;
>    
>     identity netconf { ... }
>
>     augment /subscriptions/subscription/receivers/receiver/transport {
>       when 'derived-from-or-self(../../../transport, "nsn:netconf"');
>    
>        case netconf {
>          // leafref to call-home config
>        }
>      }
>    }
>
> ... so that *if* the client configures the mandatory "transport" leaf
> to "nsn:netconf", then it also MUST configure the corresponding
> netconf-specific params.


But this depends greatly on the "notif" model having the right
"when" statement.  Will non-IETF notif models always do this?


> /martin

Kent // contributor