[netmod] “case” shorthand

"Peter Kajsa -X (pkajsa - PANTHEON TECHNOLOGIES at Cisco)" <pkajsa@cisco.com> Mon, 20 March 2017 08:46 UTC

Return-Path: <pkajsa@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 26D8E1296D4 for <netmod@ietfa.amsl.com>; Mon, 20 Mar 2017 01:46:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 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_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 G47zdtBtfAMs for <netmod@ietfa.amsl.com>; Mon, 20 Mar 2017 01:46:53 -0700 (PDT)
Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F08921296E0 for <netmod@ietf.org>; Mon, 20 Mar 2017 01:46:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=17724; q=dns/txt; s=iport; t=1489999613; x=1491209213; h=from:to:cc:subject:date:message-id:mime-version; bh=HzTJldUZHZPlxcbqM3HJfJi1TRNyLpTKxv49gYlZIFk=; b=cqpqtmClj23BFTlUHjQrRD0SC1xMZ0X8mddi6QT88sXOB8pWkyEVqbIS XuJNHRku4NhombOxiiWIpTvBaNtuBrsEYRzvP1UaGEnoRZU/+vMGGvSTb FyuyEBuYXFl1eBQV54DSKIvzOT34kW3O795GUFkEPuFBrcy7bcnbcMozS M=;
X-Files: image001.png, image002.gif : 4288, 134
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AeAQA3ls9Y/40NJK1dGQEBAQEBAQEBAQEBBwEBAQEBgm5jYYEKB41roW2FL4IOLoI+gzYCgw0/GAECAQEBAQEBAWsdC4UYCSAIATQCFRIBJQEBAR8JBRAGAgcMFBIBBA4EAQgGh2+CAw6wb4JsWopBAQEBAQEBAQEBAQEBAQEBAQEBAQEBDg+HRYZ/gR8RAVIIhScFkCaFXoNqAYE+gSABG4VoAXSLQYIEVIRUiE6BOpNXAR84Pj4IWBWHGHUBhzcNF4EKgQ0BAQE
X-IronPort-AV: E=Sophos;i="5.36,193,1486425600"; d="gif'147?png'147,150?scan'147,150,208,217,147,150";a="400405576"
Received: from alln-core-8.cisco.com ([173.36.13.141]) by alln-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Mar 2017 08:46:51 +0000
Received: from XCH-RCD-002.cisco.com (xch-rcd-002.cisco.com [173.37.102.12]) by alln-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id v2K8kpNr027309 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 20 Mar 2017 08:46:51 GMT
Received: from xch-aln-020.cisco.com (173.36.7.30) by XCH-RCD-002.cisco.com (173.37.102.12) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 20 Mar 2017 03:46:51 -0500
Received: from xch-aln-020.cisco.com ([173.36.7.30]) by XCH-ALN-020.cisco.com ([173.36.7.30]) with mapi id 15.00.1210.000; Mon, 20 Mar 2017 03:46:51 -0500
From: "Peter Kajsa -X (pkajsa - PANTHEON TECHNOLOGIES at Cisco)" <pkajsa@cisco.com>
To: "netmod@ietf.org" <netmod@ietf.org>
CC: "Martin Ciglan -X (mciglan - PANTHEON TECHNOLOGIES at Cisco)" <mciglan@cisco.com>, "Vratko Polak -X (vrpolak - PANTHEON TECHNOLOGIES at Cisco)" <vrpolak@cisco.com>, "Igor Foltin -X (ifoltin - PANTHEON TECHNOLOGIES at Cisco)" <ifoltin@cisco.com>, "Robert Varga (nite@hq.sk)" <nite@hq.sk>
Thread-Topic: “case” shorthand
Thread-Index: AdKhVh3/01AU0yljRTWqZcLXYbEIcQ==
Date: Mon, 20 Mar 2017 08:46:51 +0000
Message-ID: <1d9289a1c5d74b84a9e3c2847b80f121@XCH-ALN-020.cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.61.201.30]
Content-Type: multipart/related; boundary="_005_1d9289a1c5d74b84a9e3c2847b80f121XCHALN020ciscocom_"; type="multipart/alternative"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/8Y64_2rmEaijqiYfEDXUC5cvHpU>
Subject: [netmod] “case” shorthand
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Mar 2017 08:46:56 -0000

Hi,

RFC7950 section 7.9.2. says that if a “case” statement is omitted (i.e. “case” shorthand) and implicit “case” node is created, schema node identifiers MUST always explicitly include the implicit “case” node identifiers. So the following snippet from yang model (below) is valid for Yang 1.1. However, is it also valid for Yang 1.0 ? RFC6020 is not clear about this and there is no section saying that schema node identifiers MUST always explicitly include the implicit “case” node identifiers…

    choice my-choice {
        container implicit-case-container {
        }
    }

    augment "/my-choice/implicit-case-container" {
        leaf leaf-after-container {
            type empty;
        }
    }

    augment "/my-choice/implicit-case-container/implicit-case-container" {
        leaf leaf-inside-container {
            type empty;
        }
    }

Thanks.
[http://wwwin.cisco.com/c/dam/cec/organizations/gmcc/services-tools/signaturetool/images/logo/logo_Cisco_Blue.png]



Peter Kajsa
Engineer - Software
pkajsa@cisco.com<mailto:pkajsa@cisco.com>
Tel:

Cisco Systems, Inc.



Slovakia
cisco.com


[http://www.cisco.com/assets/swa/img/thinkbeforeyouprint.gif]Think before you print.

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
Please click here<http://www.cisco.com/web/about/doing_business/legal/cri/index.html> for Company Registration Information.