Re: [netmod] Default statements and deviate add/replace

"Rob Wilton (rwilton)" <rwilton@cisco.com> Tue, 29 October 2019 10:38 UTC

Return-Path: <rwilton@cisco.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 1148E120219 for <netmod@ietfa.amsl.com>; Tue, 29 Oct 2019 03:38:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.499
X-Spam-Level:
X-Spam-Status: No, score=-14.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=a1d7cGNB; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=hMXS2iy3
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 9RPj7rjigHkI for <netmod@ietfa.amsl.com>; Tue, 29 Oct 2019 03:38:55 -0700 (PDT)
Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD17112016E for <netmod@ietf.org>; Tue, 29 Oct 2019 03:38:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=30564; q=dns/txt; s=iport; t=1572345535; x=1573555135; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=9UIC/f+I0fys9rPxMTBzfDp/XBdFuTZz1ppYp7MhZMM=; b=a1d7cGNBYcJt4O042z3hAtVsu+w8W/OgCYgV4e5ZgDYuyLYqAUgpJIT5 MiMi9OwHZWgIYFoaAtmlXh9rDRWc49mjTb90aaEnL63LBrVQRp3/eDLNS 2dkfiOkZMwY+2KJjFSSZOWSBKh2LYn0jDIMxZb+7EKD17bZYFJDWcYqIy 0=;
IronPort-PHdr: 9a23:NyH5YR0cOam5FliDsmDT+zVfbzU7u7jyIg8e44YmjLQLaKm44pD+JxKHt+51ggrPWoPWo7JfhuzavrqoeFRI4I3J8RVgOIdJSwdDjMwXmwI6B8vQE1L6KOLtaQQxHd9JUxlu+HToeUU=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BIAADOFbhd/5JdJa1lGgEBAQEBAQEBAQMBAQEBEQEBAQICAQEBAYFsAgEBAQELAYEbL1AFbFggBAsqhCiDRgOKboJel2uBQoEQA1QJAQEBDAEBGAEKCgIBAYN7RQIXgz4kNwYOAgMJAQEEAQEBAgEFBG2FNwyFUQEBAQQBARARChMBASwLAQ8CAQgRBAEBIQcDAgICJQsUCQgBAQQBDQUIGoMBgXlNAy4BAgymbQKBOIhgdYEygn4BAQWFEBiCFwMGgTYBhRWGeRiBQD+BEUaCTD6CYgEBAoEsARIBIRUWCYJaMoIsjRwdgkCFPII5lX4KgiSGLI8dmVyOP5lJAgQCBAUCDgEBBYFoI2dxcBU7gmxQEBSDBoNzhRSFP3QBAYEmjCENFweBNF4BAQ
X-IronPort-AV: E=Sophos;i="5.68,243,1569283200"; d="scan'208,217";a="352477546"
Received: from rcdn-core-10.cisco.com ([173.37.93.146]) by alln-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 29 Oct 2019 10:38:54 +0000
Received: from XCH-ALN-016.cisco.com (xch-aln-016.cisco.com [173.36.7.26]) by rcdn-core-10.cisco.com (8.15.2/8.15.2) with ESMTPS id x9TAcs35016636 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 29 Oct 2019 10:38:54 GMT
Received: from xhs-rtp-002.cisco.com (64.101.210.229) by XCH-ALN-016.cisco.com (173.36.7.26) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 29 Oct 2019 05:38:54 -0500
Received: from xhs-aln-001.cisco.com (173.37.135.118) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 29 Oct 2019 06:38:52 -0400
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-001.cisco.com (173.37.135.118) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 29 Oct 2019 05:38:52 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sa46CxydczYcF5qqwKFcOHRrvTHAAPv/nQuVoV3SkI9Bz5b45AsWA+8Z9jVU0A8c9hcEZzel2wgiHREmhQBomvZhk7R7G+ZCe+CSq9g9LHqjPTfuKBZeE5K0QvDUxoZJtRvae/JK5AhABXUFJzUwl9B+Dcg3QQkNEX0uRwaxF+pQgCyO96alpGxemSJeB7UxP5k5qp/+Utt1tqoSplFlq4gdnBJp6WbIzpIEbju9EAilrQ98KN/bf0b115/BnEQyxfJwSigEFgKvGe0fyU8ivRkRQHyuKEteiUPUg2T7zScFk7Er5pttFsMGiQdze4GJEd75VzpYbQlqrm17bV7wlA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9UIC/f+I0fys9rPxMTBzfDp/XBdFuTZz1ppYp7MhZMM=; b=DQ8Elhu67XFmSHF59ZcTp7pVgH6+tLxFUmfjqVPyDi8didTCgtGvnHlfA+bLXqXbEtEyaNFgND24sWVBrFYXI92AyU8ZP/0BBqhaxFQHDNiM/tfAxZfpZTqZYvIGXhgHbZGyeCx/SJL6dzy6g3rmi8CL2DnQF04rpeU38TlkGK1eSIDX6/xm5eX3Z3f8c25NZBzandTHO6RR+7hLOht5P0XDD7OJkk2gH2RYqQRJ4a0MnKMGrOZ6a4qJPtuPVX3fpYwTq4z3/MjGmLDqJrzfhhXdM+YacqaFtMP0VoduxOs71aYcHnMQd238pO55yK1x33jMVafvwJfWr1JBe0J1ng==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9UIC/f+I0fys9rPxMTBzfDp/XBdFuTZz1ppYp7MhZMM=; b=hMXS2iy3Sqthxb8Zjt1UwgnhuVE3tlvGjNj2szSdBxLS7fTi1NOxgMlbeTVvnHgAtmL58/pjpIlWrhXpdGODCnfpOVZ1q0OXvwfJKiAQp9vKvpbny3Dn0vfMphWUAGXs6NQ0k0sM/nz0/HldWiMM/y73ISZ5VvwsHzIqo4wGQVw=
Received: from BY5PR11MB4355.namprd11.prod.outlook.com (52.132.254.141) by BY5PR11MB4305.namprd11.prod.outlook.com (52.132.253.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.17; Tue, 29 Oct 2019 10:38:51 +0000
Received: from BY5PR11MB4355.namprd11.prod.outlook.com ([fe80::105e:2dce:326f:a11e]) by BY5PR11MB4355.namprd11.prod.outlook.com ([fe80::105e:2dce:326f:a11e%6]) with mapi id 15.20.2387.027; Tue, 29 Oct 2019 10:38:50 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>, Kent Watsen <kent@watsen.net>
CC: Edvardas Lasauskas <edvardas.lasauskas@ericsson.com>, Mark Hollmann <mark.hollmann@ericsson.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Default statements and deviate add/replace
Thread-Index: AdWIwoN5sUEukdGAQsGK9U4p7bcxKQAI5twAAGKzbOAAC1dzoA==
Date: Tue, 29 Oct 2019 10:38:50 +0000
Message-ID: <BY5PR11MB435531FC7D92D0307E4F3E17B5610@BY5PR11MB4355.namprd11.prod.outlook.com>
References: <VI1PR0701MB2286C5DA80832D166198EA65F0680@VI1PR0701MB2286.eurprd07.prod.outlook.com> <0100016df3e6091d-bf5947e5-0cd6-4a89-adf2-abbfb506ce01-000000@email.amazonses.com> <VI1PR0701MB2286421CCDA0D949E6A7E737F06A0@VI1PR0701MB2286.eurprd07.prod.outlook.com>
In-Reply-To: <VI1PR0701MB2286421CCDA0D949E6A7E737F06A0@VI1PR0701MB2286.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=rwilton@cisco.com;
x-originating-ip: [2001:420:c0c0:1007::22d]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: e7d3df66-81c5-41b4-b98e-08d75c5c2fd9
x-ms-traffictypediagnostic: BY5PR11MB4305:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <BY5PR11MB4305BD16EDCD5E72DCFCE358B5610@BY5PR11MB4305.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:6430;
x-forefront-prvs: 0205EDCD76
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(136003)(366004)(39860400002)(396003)(199004)(189003)(51444003)(229853002)(74316002)(66946007)(66446008)(64756008)(66556008)(66476007)(25786009)(76116006)(478600001)(46003)(2906002)(966005)(86362001)(6436002)(186003)(99286004)(14444005)(7736002)(6506007)(53546011)(102836004)(256004)(52536014)(71200400001)(71190400001)(54906003)(316002)(33656002)(606006)(55016002)(7696005)(76176011)(9686003)(66574012)(8676002)(5660300002)(6246003)(476003)(81156014)(81166006)(6116002)(54896002)(4326008)(14454004)(8936002)(486006)(6306002)(11346002)(236005)(110136005)(446003)(790700001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY5PR11MB4305; H:BY5PR11MB4355.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: W0yHoz75yAdYcxeybMAhf0MNtkYL2cSyccsM90BKud/wjIeA6TcQZ8BS64n4SkbLjB8jLxQvPhdEFdo+caJuVrC39+oM8G8ySBT0aCuU90+Ozkal6o7BPs+oI1oIeQZLYhk4HYlPgNbNEwIWRRnyUQnq6vYQ+6wBGALRqakb4Y+P2H3v7H/vi3YByDkN5xeSIIhxgh4j7GThyAV6UTQ4VPG+QwgFP/7canpQ+2V4wHNm+MclTV3YywoDPVxF+p3XYs06T7kFAxhZQCRYbZph0hDibnJmFKt2+u78MYfRzBhrjB1Ip4acC8ke74hJi+HqrutrQitIs5hUmBnixrsHMDpIYsxM56O82WngjcK+uemg5WkFs7RuHWGUVxTAYaYVCJCKBvAmvKsNHDzkEhNwYSieLQK8rk6Lw5QGU2m7rGu/yv8qnG8yTy9yETfZuhZPIsLIB/d8x6XfORdm5uEWKdJ6CIsOn7quTwAd0P0n64k=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_BY5PR11MB435531FC7D92D0307E4F3E17B5610BY5PR11MB4355namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: e7d3df66-81c5-41b4-b98e-08d75c5c2fd9
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2019 10:38:50.4529 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: xEINPjBlFIrb7upXt8sjJFQqUl3ilPNCEnJqtzLnhAe7DCpa61vBWq2G3GYoxk9bqhig39vh0AoUw1Kpe3h1HQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4305
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.26, xch-aln-016.cisco.com
X-Outbound-Node: rcdn-core-10.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Q3XuNqkNHThO4nOO5heQdvjbCRg>
Subject: Re: [netmod] Default statements and deviate add/replace
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: Tue, 29 Oct 2019 10:39:09 -0000

I think that I basically agree with Balazs,  the spec refers to properties rather than sub-statements.

I would say, every data node always has these properties (either because they are required or because they have a defined default value if the statement is not present):
               config, mandatory, type
lists and leaf-lists also always have these properties (because they have default values if the statement is not present):
               max-elements, min-elements

So, I think that config, mandatory, type, max-elements, min-elements cannot be added or deleted, only replaced, because they always exist.

default, must, unique, units are all optional, and hence may be added, replaced, or deleted.

If we reach agreement, then I think that the text could also be clarified in YANG Next.

Thanks,
Rob


From: netmod <netmod-bounces@ietf.org> On Behalf Of Balázs Lengyel
Sent: 24 October 2019 14:45
To: Kent Watsen <kent@watsen.net>
Cc: Edvardas Lasauskas <edvardas.lasauskas@ericsson.com>; Mark Hollmann <mark.hollmann@ericsson.com>; netmod@ietf.org
Subject: Re: [netmod] Default statements and deviate add/replace

Hello Kent,
As IMO practically all tools are misbehaving I would like a confirmation that my interpretation of the differences between deviate add and deviate replace are correct.  After that I will start reporting the issues to the tools.
Regards Balazs

From: Kent Watsen <kent@watsen.net<mailto:kent@watsen.net>>
Sent: 2019. október 22., kedd 16:37
To: Balázs Lengyel <balazs.lengyel@ericsson.com<mailto:balazs.lengyel@ericsson.com>>
Cc: netmod@ietf.org<mailto:netmod@ietf.org>; Mark Hollmann <mark.hollmann@ericsson.com<mailto:mark.hollmann@ericsson.com>>; Edvardas Lasauskas <edvardas.lasauskas@ericsson.com<mailto:edvardas.lasauskas@ericsson.com>>
Subject: Re: [netmod] Default statements and deviate add/replace

Hi Balazs,

Is this for the NETMOD list, or should bugs be filed against the misbehaving tools?

Kent


On Oct 22, 2019, at 6:56 AM, Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org<mailto:balazs.lengyel=40ericsson.com@dmarc.ietf.org>> wrote:

Hello,
I tried testing the following statements:

  deviation /nacm:nacm/nacm:enable-nacm {
    deviate add {
      config false;     } }

  deviation /nacm:nacm/nacm:rule-list {
    deviate add {
      min-elements 1;     }  }

In nacm both the config and the min-elements are absent, so their default meaning is true. I actually tried both add and replace in deviate.
I got rather confusing results whether the add/replace variant of deviate should be accepted or rejected because the property already exists or does not yet exist.

Pyang 2.0.2 locally:
Config=false                       add-NOK              replace-OK
Min-elements=1              add-OK                 replace-NOK

YANG-Validator  pyang 2.0 & confdc
Config=false                       add-OK                 replace-OK
Min-elements=1              add-OK                 replace-NOK

YANG-Validator yanglint
Config=false                       add-OK                 replace-OK
Min-elements=1              add-OK                 replace-OK

IMHO the tools should always check the property, so even if the statement is not present the properties config=false and min-elements=0 ARE present. So add should be rejected and replace accepted.

Regards Balazs

--
Balazs Lengyel                    Senior Specialist                       Ericsson Hungary Ltd.
Mobile: +36-70-330-7909              email: Balazs.Lengyel@ericsson.com<mailto:Balazs.Lengyel@ericsson.com>

_______________________________________________
netmod mailing list
netmod@ietf.org<mailto:netmod@ietf.org>
https://www.ietf.org/mailman/listinfo/netmod