
From jnixon@brocade.com  Tue Oct 12 17:34:19 2010
Return-Path: <jnixon@brocade.com>
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 <yang@core3.amsl.com>; 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 <yang@core3.amsl.com>; 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 <yang@ietf.org>; 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 <yang@ietf.org>; 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 <yang@ietf.org>; 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 <jnixon@brocade.com>
To: "'yang@ietf.org'" <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: <DAC506E724B1E345837F2FD9C40194E1270A302753@HQ1-EXCH03.corp.brocade.com>
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 <yang.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=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

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m=
icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office=
:access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"=
uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof=
t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co=
m:office:publisher" xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadshee=
t" xmlns:c=3D"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns=
:odc=3D"urn:schemas-microsoft-com:office:odc" xmlns:oa=3D"urn:schemas-micro=
soft-com:office:activation" xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc=3D"http://m=
icrosoft.com/officenet/conferencing" xmlns:D=3D"DAV:" xmlns:Repl=3D"http://=
schemas.microsoft.com/repl/" xmlns:mt=3D"http://schemas.microsoft.com/share=
point/soap/meetings/" xmlns:x2=3D"http://schemas.microsoft.com/office/excel=
/2003/xml" xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" xmlns:ois=
=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir=3D"http://=
schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds=3D"http://www.w3=
.org/2000/09/xmldsig#" xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint=
/dsp" xmlns:udc=3D"http://schemas.microsoft.com/data/udc" xmlns:xsd=3D"http=
://www.w3.org/2001/XMLSchema" xmlns:sub=3D"http://schemas.microsoft.com/sha=
repoint/soap/2002/1/alerts/" xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#"=
 xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" xmlns:sps=3D"http://=
schemas.microsoft.com/sharepoint/soap/" xmlns:xsi=3D"http://www.w3.org/2001=
/XMLSchema-instance" xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/so=
ap" xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udc=
p2p=3D"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf=3D"http:/=
/schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss=3D"http://sche=
mas.microsoft.com/office/2006/digsig-setup" xmlns:dssi=3D"http://schemas.mi=
crosoft.com/office/2006/digsig" xmlns:mdssi=3D"http://schemas.openxmlformat=
s.org/package/2006/digital-signature" xmlns:mver=3D"http://schemas.openxmlf=
ormats.org/markup-compatibility/2006" xmlns:m=3D"http://schemas.microsoft.c=
om/office/2004/12/omml" xmlns:mrels=3D"http://schemas.openxmlformats.org/pa=
ckage/2006/relationships" xmlns:spwp=3D"http://microsoft.com/sharepoint/web=
partpages" xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/services/20=
06/types" xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/services/200=
6/messages" xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/Sli=
deLibrary/" xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPortal=
Server/PublishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" xmlns:=
st=3D"&#1;" xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DWordSection1>

<p class=3DMsoNormal>All, <o:p></o:p></p>

<p class=3DMsoNormal>Every example of a choice statement I have seen so far=
 uses a
leaf to define the information for a particular case.<o:p></o:p></p>

<p class=3DMsoNormal>Yet I am wondering if the below example would be allow=
ed?<o:p></o:p></p>

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

<p class=3DMsoNormal>Thanks for your thoughts on this,<o:p></o:p></p>

<p class=3DMsoNormal>Jason Nixon<br>
<br>
<o:p></o:p></p>

<p class=3DMsoNormal>choice moof<o:p></o:p></p>

<p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;
{<o:p></o:p></p>

<p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;
description &quot;is it a cow or a dog&quot;;<o:p></o:p></p>

<p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
;
case dog<o:p></o:p></p>

<p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}//end choice<o:p></o:p></p>

</div>

</body>

</html>

--_000_DAC506E724B1E345837F2FD9C40194E1270A302753HQ1EXCH03corp_--

From lhotka@cesnet.cz  Wed Oct 13 08:17:31 2010
Return-Path: <lhotka@cesnet.cz>
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 <yang@core3.amsl.com>; 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 <yang@core3.amsl.com>; 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 <yang@ietf.org>; 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 <yang@ietf.org>; Wed, 13 Oct 2010 17:18:45 +0200 (CEST)
From: Ladislav Lhotka <lhotka@cesnet.cz>
To: yang@ietf.org
In-Reply-To: <DAC506E724B1E345837F2FD9C40194E1270A302753@HQ1-EXCH03.corp.brocade.com>
References: <DAC506E724B1E345837F2FD9C40194E1270A302753@HQ1-EXCH03.corp.brocade.com>
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 <yang.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=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

