From jnixon@brocade.com Tue Oct 12 17:34:19 2010 Return-Path: X-Original-To: yang@core3.amsl.com Delivered-To: yang@core3.amsl.com Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 460FF3A686E for ; Tue, 12 Oct 2010 17:34:19 -0700 (PDT) X-Virus-Scanned: amavisd-new at amsl.com X-Spam-Flag: NO X-Spam-Score: -2.264 X-Spam-Level: X-Spam-Status: No, score=-2.264 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, IP_NOT_FRIENDLY=0.334] Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zan-oiaek3zc for ; Tue, 12 Oct 2010 17:34:18 -0700 (PDT) Received: from mx0a-000f0801.pphosted.com (mx0a-000f0801.pphosted.com [67.231.144.122]) by core3.amsl.com (Postfix) with ESMTP id 0F0353A6832 for ; Tue, 12 Oct 2010 17:34:17 -0700 (PDT) Received: from pps.filterd (m0000542 [127.0.0.1]) by mx0a-000f0801.pphosted.com (8.14.3/8.14.3) with SMTP id o9D0ZXQx029815 for ; Tue, 12 Oct 2010 17:35:33 -0700 Received: from hq1-exedge.brocade.com (hq1-exedge.brocade.com [144.49.141.11]) by mx0a-000f0801.pphosted.com with ESMTP id rvxww838m-2 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Tue, 12 Oct 2010 17:35:33 -0700 Received: from HQ1WP-EXHUB01.corp.brocade.com (10.70.36.14) by HQ1WP-EXEDGE02.corp.brocade.com (144.49.141.11) with Microsoft SMTP Server (TLS) id 8.2.254.0; Tue, 12 Oct 2010 17:39:59 -0700 Received: from HQ1-EXCH03.corp.brocade.com ([fe80::411c:2971:c59e:5e4a]) by HQ1WP-EXHUB01.corp.brocade.com ([::1]) with mapi; Tue, 12 Oct 2010 17:35:32 -0700 From: Jason Nixon To: "'yang@ietf.org'" Date: Tue, 12 Oct 2010 17:35:31 -0700 Thread-Topic: usage of container statement inside choice? Thread-Index: ActqboqPvsHVO0ptRDKWbkJ+4OwpTw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_DAC506E724B1E345837F2FD9C40194E1270A302753HQ1EXCH03corp_" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2010-10-12_14:2010-10-13, 2010-10-12, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=5 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1010120157 X-Mailman-Approved-At: Wed, 13 Oct 2010 08:01:51 -0700 Subject: [YANG] usage of container statement inside choice? X-BeenThere: yang@ietf.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: YANG modeling Language for NETCONF List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 00:35:16 -0000 --_000_DAC506E724B1E345837F2FD9C40194E1270A302753HQ1EXCH03corp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable All, Every example of a choice statement I have seen so far uses a leaf to defin= e the information for a particular case. Yet I am wondering if the below example would be allowed? I am assuming that groupings of dogtreat, and feed_cow are defined elsewher= e, and may have multiple leaf objects defined inside. Thanks for your thoughts on this, Jason Nixon choice moof { description "is it a cow or a dog"; case dog { container dog { description "awww puppies are c= ute"; uses dogtreat; } } case cow { container cow { description "got some hay?"; uses feed_cow; } } }//end choice --_000_DAC506E724B1E345837F2FD9C40194E1270A302753HQ1EXCH03corp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

All,

Every example of a choice statement I have seen so far= uses a leaf to define the information for a particular case.

Yet I am wondering if the below example would be allow= ed?

I am assuming that groupings of dogtreat, and feed_cow= are defined elsewhere, and may have multiple leaf objects defined inside.<= /o:p>

Thanks for your thoughts on this,

Jason Nixon

choice moof

         =              &n= bsp; {

         =              &n= bsp;     description "is it a cow or a dog";

         =             &nb= sp;             = ; case dog

         =             &nb= sp;             = ; {

         =             &nb= sp;             = ;     container dog

         =             &nb= sp;             = ;     {

         =             &nb= sp;             = ;         description "awww puppies are cute";

         =             &nb= sp;             = ;              &n= bsp;  uses dogtreat;

         =             &nb= sp;             = ;     }

         =             &nb= sp;             = ; }

         =             &nb= sp;             = ; case cow

         =             &nb= sp;             = ; {

         =             &nb= sp;             = ;     container cow

         =             &nb= sp;             = ;     {

         =             &nb= sp;             = ;         description "got some hay?";

         =             &nb= sp;             = ;              &n= bsp;  uses feed_cow;

         =             &nb= sp;             = ;     }

         =             &nb= sp;             = ; }

         =               }//end choice

--_000_DAC506E724B1E345837F2FD9C40194E1270A302753HQ1EXCH03corp_-- From lhotka@cesnet.cz Wed Oct 13 08:17:31 2010 Return-Path: X-Original-To: yang@core3.amsl.com Delivered-To: yang@core3.amsl.com Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id BF2033A69CD for ; Wed, 13 Oct 2010 08:17:31 -0700 (PDT) X-Virus-Scanned: amavisd-new at amsl.com X-Spam-Flag: NO X-Spam-Score: -2.443 X-Spam-Level: X-Spam-Status: No, score=-2.443 tagged_above=-999 required=5 tests=[AWL=0.156, BAYES_00=-2.599] Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qaea27Z+A8M9 for ; Wed, 13 Oct 2010 08:17:30 -0700 (PDT) Received: from office2.cesnet.cz (office2.cesnet.cz [IPv6:2001:718:1:101::144:244]) by core3.amsl.com (Postfix) with ESMTP id 506883A699F for ; Wed, 13 Oct 2010 08:17:30 -0700 (PDT) Received: from [192.168.2.8] (unknown [78.156.128.19]) by office2.cesnet.cz (Postfix) with ESMTPSA id C2EDB2CDE05B for ; Wed, 13 Oct 2010 17:18:45 +0200 (CEST) From: Ladislav Lhotka To: yang@ietf.org In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Organization: CESNET Date: Wed, 13 Oct 2010 17:18:44 +0200 Message-ID: <1286983124.9553.5.camel@missotis> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 8bit Subject: Re: [YANG] usage of container statement inside choice? X-BeenThere: yang@ietf.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: YANG modeling Language for NETCONF List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 15:17:31 -0000 Hi Jason, this is certainly possible, and the 'case' statements may also be omitted as there is only one node per case. Lada On Út, 2010-10-12 at 17:35 -0700, Jason Nixon wrote: > All, > > Every example of a choice statement I have seen so far uses a leaf to > define the information for a particular case. > > Yet I am wondering if the below example would be allowed? > > I am assuming that groupings of dogtreat, and feed_cow are defined > elsewhere, and may have multiple leaf objects defined inside. > > Thanks for your thoughts on this, > > Jason Nixon > > > > choice moof > > { > > description "is it a cow or a dog"; > > case dog > > { > > container dog > > { > > description "awww puppies > are cute"; > > uses dogtreat; > > } > > } > > case cow > > { > > container cow > > { > > description "got some > hay?"; > > uses feed_cow; > > } > > } > > }//end choice > > > _______________________________________________ > YANG mailing list > YANG@ietf.org > https://www.ietf.org/mailman/listinfo/yang -- Ladislav Lhotka, CESNET PGP Key ID: E74E8C0C