[netmod] RFC6243 "with defaults" report-all and YANG "when" statements

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Fri, 24 August 2018 13:27 UTC

Return-Path: <jason.sterne@nokia.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 BF6F0127148 for <netmod@ietfa.amsl.com>; Fri, 24 Aug 2018 06:27:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.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 SmaAwyszXCd9 for <netmod@ietfa.amsl.com>; Fri, 24 Aug 2018 06:27:27 -0700 (PDT)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0132.outbound.protection.outlook.com [104.47.2.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BFBBA126BED for <netmod@ietf.org>; Fri, 24 Aug 2018 06:27:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PlAsi9Ly3vD5GWJ2l49W7/nebCPsmyPqVGlmbaZ8sbQ=; b=KcRWtEdFPmel04Z6ezJ9Aj8/pdgkLJL6QCN9D3R4pEZMdkFdSiM3NPkcOhe+KMS7+Ne1t8of/fVbWs05Ip9STw0wpaTmQNYqMcWRB3/msgMUy9r9FetLXt1gFmMi37TmrRBB88UuG22CMRnzJD729e4aE8AO6hXfpV7dvjbAMfs=
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com (52.134.28.141) by VI1PR07MB0782.eurprd07.prod.outlook.com (10.161.107.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.5; Fri, 24 Aug 2018 13:27:23 +0000
Received: from VI1PR07MB3981.eurprd07.prod.outlook.com ([fe80::dd01:b567:f507:8f07]) by VI1PR07MB3981.eurprd07.prod.outlook.com ([fe80::dd01:b567:f507:8f07%4]) with mapi id 15.20.1080.010; Fri, 24 Aug 2018 13:27:23 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: RFC6243 "with defaults" report-all and YANG "when" statements
Thread-Index: AdQ7rMaDBNtcalfDT0eZd7GJIrIdPg==
Date: Fri, 24 Aug 2018 13:27:23 +0000
Message-ID: <VI1PR07MB3981EC4CC1EF663F59A6A4EF9B360@VI1PR07MB3981.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=jason.sterne@nokia.com;
x-originating-ip: [135.245.20.4]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR07MB0782; 6:NMVFPWnnCldXpxJoffCGBIwMUax/hRUC33m9uTrZ2pWO0wq7fptgyGF+Azz6tcGPuNq1HKs3Q+Wtb6O99cHkv+bmkucZfjSCW9WuN3tci/av2FbFZR4AoINbuDBygjCjpRrdyRZrad1XgEPUhXCEFgcqKUQbU6wnYwMwFkEYjshFLZilvQdWcmsnr82U2SMnGmgiBQx3HVWe6PzZWfJ7xA0UTDQuCmsXy3ll+55WBtUoxuTnEOWzLfDfuLs45qWfbd944Dsg823RCKFw2+kAxXcILcYmUqcynh4nv3ewq9eaYw3JTIJ/0hMqEim7NVeBlNkdDjg6x6xBITUfZcpi8jt5dUYYYW4ms2q2R2nBq1a1ovl9+B0QaSpyzsXenH6wc4jnXBUX1HES51xX4lDwPYpjTvIfe59SyTfCc6YZMs51Bn3d6XuLgMmdZSGXft/ngZ7bXm0d14qIFNzvtctrxA==; 5:+ulo3MvVnxa/+pjeiYVLGg/Bt7/oyO4wdTScuyQyexTJ9xHo/5dqhh4m6i9G0h5Qg067I1hw8Hs19s3EJ9qnqY5Pt9zYC5AdvFca7ZkARndJne7CDAUQr10WW9AdN2kleTLtoAyKUigmBhw2BXPnXzNa13tYEyx9Y7KaBor3XU4=; 7:OEjFjdeUaZW0bNdxp9c3CbO0DwOsE5KA5hpvQLwMT8tkkWwxreqLVkh3vm5md9F0Cta8MJOuxttIsVUGGb/iLTdg6Azn6UpmPwidnh5H7wV1iDL6nt0McgG8s5bpsOOVELlDdW+I10xEYdi/p84luw6ErBy0N3kcYMtCY9fOgGcWPx6jYhBSlyJ+7XEAcaFwg0wzYgXgesaw50LT32vhZr7drTq3SHWmq5RCtpvmKDtk8QOT8eMEl6IdczF864Rl
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 80c9a6e2-a0d7-483a-a98d-08d609c5538c
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:VI1PR07MB0782;
x-ms-traffictypediagnostic: VI1PR07MB0782:
x-microsoft-antispam-prvs: <VI1PR07MB0782F8E1C21811D1DAA0CD3B9B360@VI1PR07MB0782.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(35073007944872)(21748063052155);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231311)(11241501184)(806099)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:VI1PR07MB0782; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB0782;
x-forefront-prvs: 07749F8C42
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(396003)(366004)(136003)(346002)(376002)(53754006)(189003)(199004)(14454004)(8676002)(33656002)(99286004)(6436002)(106356001)(7696005)(105586002)(316002)(6116002)(790700001)(3846002)(5660300001)(2900100001)(2906002)(2351001)(74316002)(5630700001)(5250100002)(2501003)(81156014)(68736007)(7736002)(14444005)(256004)(102836004)(1730700003)(8936002)(81166006)(66066001)(6506007)(26005)(186003)(5640700003)(6916009)(476003)(486006)(9686003)(55016002)(54896002)(6306002)(86362001)(478600001)(97736004)(53936002)(25786009); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB0782; H:VI1PR07MB3981.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: TM9aKyZ+YFs9lG9F8FOeBTisLTnnR+Ry5TQCaUSVnj9QV351jViWpiCYTzyj1WP0wGlB4hzoVWjggToo3GKbTYLNCnVQ5QyJLIBwUqBdMaW5UsRiRvVccPevwryZMbYQkVyC/L8PKnyPwdFNwXKESxmrTGAZVuUQEvcy+rJZmIAU6rzGdAYU8/Jly5IT+NlNBmEwp2BlHdycLd48x/GfvQVIsdCahUGympXtvF01vGh0TQX1MeYB/6OFUxkJ+EtCdjfCk/mGJJSUNLrrbPXyH8C9J1FuPBu6YidGTJblfefeQJBno83m3tyyFEbwL+deVnrbddh2qqzoq+3OJDFSIqCZGW7XpoPv81ocu2NZzeGNb7Av4HRdF1W0J7dL+bZN75eZadARlXlUo77XGO5/cA==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_VI1PR07MB3981EC4CC1EF663F59A6A4EF9B360VI1PR07MB3981eurp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 80c9a6e2-a0d7-483a-a98d-08d609c5538c
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Aug 2018 13:27:23.2897 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB0782
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/umZypxn7JHrPbtd3yr124iXwanA>
Subject: [netmod] RFC6243 "with defaults" report-all and YANG "when" statements
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.27
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: Fri, 24 Aug 2018 13:27:30 -0000

Hi all,

RFC6243 has a 'report-all' retrieval mode:

   When data is retrieved with a <with-defaults> parameter equal to
   'report-all', all data nodes MUST be reported, including any data
   nodes considered to be default data by the server.

I wanted to confirm how YANG "when" statements are supposed to interact with 'report-all'.

If a 'when' statement is (e.g. in some container abc) is currently not satisfied, then I believe a 'report-all' would not report the container abc or any of the descendant nodes of abc.  Is that correct ?

A "when" statement (when not satisfied) makes the associated nodes "invalid" so I assume that means they don't exist with their default values at all.

e.g.
leaf foo { type uint32; }
container abc {
   when "../foo = 1";
   leaf test1 { type uint32; default 50 }
}

If the <running> currently has this instance data:
    foo = 2
then I believe a 'report-all' retrieval would only return the following:
    <foo>2</foo>
and it would *not* return this data:
    <abc>
       <test1>50</test1>
    </abc>

Jason