On Sun, Nov 1, 2015 at 4:29 PM, fengchong (C) <frank.fengch...@huawei.com> wrote:
> > > Hi, > > I prefer A. > > > This would be OK with me. That way the default will be safe in all server variants. Andy > Otherwise, if ‘option1’ is supported, the default value should be > ‘option1’ and ‘option2’ is supported ,the default value should be > ‘option2’, B cannot express it. > > > > Or more default stmts can be allowed. > > > > leaf broken { > > type enumeration { > > enum option1 { > > if-feature option1; > > } > > enum option2 { > > if-feature option2; > > } > > enum option3; > > } > > default "option1" { > > if-feature option1; > > } > > default "option2" { > > if-feature option2; > > } > > } > > > ------------------------------ > > 冯冲 > 华为技术有限公司 Huawei Technologies Co., Ltd. > [image: Company_logo] > > Phone: > Fax: > Mobile: 18519117316 > Email: frank.fengch...@huawei.com > 地址:南京市软件大道101号华为南京基地 邮编:210001 > Huawei Technologies Co., Ltd. > > http://www.huawei.com > ------------------------------ > > 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁 > 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中 > 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! > THis e-mail and its attachments contain confidential information from > HUAWEI, which > is intended only for the person or entity whose address is listed above. > Any use of the > information contained herein in any way (including, but not limited to, > total or partial > disclosure, reproduction, or dissemination) by persons other than the > intended > recipient(s) is prohibited. If you receive this e-mail in error, please > notify the sender by > phone or email immediately and delete it! > > *发件人:* netmod [mailto:netmod-boun...@ietf.org] *代表 *Andy Bierman > *发送时间:* 2015年11月2日 1:16 > *收件人:* netmod@ietf.org > *主题:* [netmod] if-feature and default > > > > Hi, > > > > I started a separate thread for this issue. > > The current YANG 1.1 text is incomplete wrt/ default-stmt. > > > > leaf broken { > > type enumeration { > > enum option1 { > > if-feature option1; > > } > > enum option2 { > > if-feature option2; > > } > > enum option3; > > } > > default "option2"; > > } > > > > > > What happens if the server does not advertise the option2 feature? > > > > I see 2 options: > > (A) add text that says a default-stmt MUST NOT include any conditional > > values > > (B) allow if-feature as a sub-statement of the default-stmt > > > > (BTW, customers have asked for (B), so it may be a feature and a bugfix) > > > > > > Andy > > > > > > >
_______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod