[netmod] a question about 'when'

"Fengchong (frank)" <frank.fengchong@huawei.com> Mon, 05 August 2019 03:32 UTC

Return-Path: <frank.fengchong@huawei.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id A4DCD120146 for <netmod@ietfa.amsl.com>; Sun, 4 Aug 2019 20:32:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id aSMe7sjI71kN for <netmod@ietfa.amsl.com>; Sun, 4 Aug 2019 20:32:19 -0700 (PDT)
Received: from huawei.com (lhrrgout.huawei.com []) (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 00355120140 for <netmod@ietf.org>; Sun, 4 Aug 2019 20:32:18 -0700 (PDT)
Received: from lhreml706-cah.china.huawei.com (unknown []) by Forcepoint Email with ESMTP id 58F3F18BD8B4E4B6A98C for <netmod@ietf.org>; Mon, 5 Aug 2019 04:32:16 +0100 (IST)
Received: from DGGEMM422-HUB.china.huawei.com ( by lhreml706-cah.china.huawei.com ( with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 5 Aug 2019 04:32:15 +0100
Received: from DGGEMM533-MBS.china.huawei.com ([]) by dggemm422-hub.china.huawei.com ([]) with mapi id 14.03.0439.000; Mon, 5 Aug 2019 11:32:07 +0800
From: "Fengchong (frank)" <frank.fengchong@huawei.com>
To: "netmod@ietf.org" <netmod@ietf.org>
CC: "Zhangxiaoping (C)" <zhang.xiaoping@huawei.com>, liuzhiying <liuzhiying@huawei.com>
Thread-Topic: a question about 'when'
Thread-Index: AdVLPM5Xmpgaa94hSz6Z+hOvCeCLfw==
Date: Mon, 05 Aug 2019 03:32:07 +0000
Message-ID: <5756FB984666AD4BB8E1D63E2E3AA3D001EE95B1@DGGEMM533-MBS.china.huawei.com>
Accept-Language: en-US
Content-Language: zh-CN
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_5756FB984666AD4BB8E1D63E2E3AA3D001EE95B1DGGEMM533MBSchi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/sli6SqRdpQvuIj3QYvU_Vt5Zo50>
Subject: [netmod] a question about 'when'
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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, 05 Aug 2019 03:32:20 -0000

Hi all,

I encounter a question about 'when', when I implement yang model associated when condition.

Yang model:

leaf password-type {
   type enumeration {
      enum null;
      enum simple;
      enum cipher;

leaf password-text {
type string;
when "../password-type != null";

I config these two leafs as below:

And I changed password-type to null, I get the config like below:

And then, I reconfig the password-type to simple, what data should be returned?