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

Balázs Lengyel <balazs.lengyel@ericsson.com> Thu, 24 October 2019 13:45 UTC

Return-Path: <balazs.lengyel@ericsson.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 E43CF1208AE for <netmod@ietfa.amsl.com>; Thu, 24 Oct 2019 06:45:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 a2g51Lb17OI5 for <netmod@ietfa.amsl.com>; Thu, 24 Oct 2019 06:45:02 -0700 (PDT)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20046.outbound.protection.outlook.com [40.107.2.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D7A8C1208AF for <netmod@ietf.org>; Thu, 24 Oct 2019 06:45:01 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QyXrZZEPFFRG1ejflq5JoR0K9n4lCXniqenkUmdQjVVINRvoArINQdY9XI66ztU+XA6qFha21UWhAlEtTmVgS8d2RM8bRdRHY/IvuCyQbfcNiX4ACAsI1yNaEq5WqqeDR/WgxgewSFAShLoLgbyuVhyXn8fv+uGt0ShG8e1KaZ3Z74btUHnaBjJuWVUntbJbQ0uIJHzaWu5/sHRIa29kqrKF3PyIHn68dmccYVx8dh65M8cHbjp/ywyAax0r0VLX1UJUOS3d+n+J7kURKGoSmz7arprEJn0L3xaYx/Y7454eXJZ7vlFXcckn+zQsWkKD/hfCg3anOD/Zuw5UBHg7EA==
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=6uEouik1Vo286VMlMyugh2I7AYmTqmRJFabHyhzrKWg=; b=WN1ssSpyuD+k5tyNH7JqWfND1vvL1ZrZn2l2dzgP9zd+MY5JjwCjw5jMtkCdQ6T7OGaRGLeK4zfX3fKvgTX2eFI9fpH6Mg1e97wDWSaYPlBswzgM2mT4UaOVwyN2gL4XU+VO2aylOEpw0D4DNo7EmTDSWlSYL/QkQaFxLOrYqL4oNO8OcZTtjJ7L7Rv62Fg4TIsHLwgQ6Fzh/uPTkjQlWYtoOnzXLNZyTmqRgZ3bk/VEtYlNV55PjTJ9+4KxgDB64oVVW2n5a6FQ186x7XVKBRbp0cQlFe3WRyAdq1opouy3hD5aCIojBtCMnQlvDUrGSskY7axxXLoRdr3ocYFSmA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6uEouik1Vo286VMlMyugh2I7AYmTqmRJFabHyhzrKWg=; b=FYjgy4G0WTu9KoSWETfEQwOpmr4rgyc9EmIs3pKTgh7Gk1HCbDzYJ3y7ZrveTwSBY+5ZvujnZgzj48guDRXp5XppM079xTDKUx1/xrEyLrb4hTZtxH1yRImBDMxo1MoMaq+W836O1ktu0Ioyn9CL52uspL2rvjcZGuSrGflaTKM=
Received: from VI1PR0701MB2286.eurprd07.prod.outlook.com (10.169.137.153) by VI1PR0701MB2253.eurprd07.prod.outlook.com (10.169.137.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.14; Thu, 24 Oct 2019 13:44:59 +0000
Received: from VI1PR0701MB2286.eurprd07.prod.outlook.com ([fe80::6058:31bd:e6f1:e143]) by VI1PR0701MB2286.eurprd07.prod.outlook.com ([fe80::6058:31bd:e6f1:e143%11]) with mapi id 15.20.2387.021; Thu, 24 Oct 2019 13:44:59 +0000
From: =?utf-8?B?QmFsw6F6cyBMZW5neWVs?= <balazs.lengyel@ericsson.com>
To: Kent Watsen <kent@watsen.net>
CC: "netmod@ietf.org" <netmod@ietf.org>, Mark Hollmann <mark.hollmann@ericsson.com>, Edvardas Lasauskas <edvardas.lasauskas@ericsson.com>
Thread-Topic: [netmod] Default statements and deviate add/replace
Thread-Index: AdWIwoN5sUEukdGAQsGK9U4p7bcxKQAI5twAAGKzbOA=
Date: Thu, 24 Oct 2019 13:44:59 +0000
Message-ID: <VI1PR0701MB2286421CCDA0D949E6A7E737F06A0@VI1PR0701MB2286.eurprd07.prod.outlook.com>
References: <VI1PR0701MB2286C5DA80832D166198EA65F0680@VI1PR0701MB2286.eurprd07.prod.outlook.com> <0100016df3e6091d-bf5947e5-0cd6-4a89-adf2-abbfb506ce01-000000@email.amazonses.com>
In-Reply-To: <0100016df3e6091d-bf5947e5-0cd6-4a89-adf2-abbfb506ce01-000000@email.amazonses.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-originating-ip: [89.135.192.225]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 01bcf6d5-5b7e-49ed-f98d-08d758885d03
x-ms-traffictypediagnostic: VI1PR0701MB2253:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <VI1PR0701MB22538D4501C9F10E05F20FCCF06A0@VI1PR0701MB2253.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:632;
x-forefront-prvs: 0200DDA8BE
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(346002)(376002)(396003)(39860400002)(199004)(189003)(14454004)(25786009)(76176011)(256004)(478600001)(186003)(229853002)(14444005)(6506007)(53546011)(6436002)(66556008)(66616009)(99286004)(486006)(66476007)(66574012)(26005)(66946007)(66446008)(76116006)(476003)(7696005)(8676002)(71200400001)(2906002)(85202003)(71190400001)(316002)(8936002)(81156014)(81166006)(66066001)(102836004)(99936001)(64756008)(55016002)(3846002)(11346002)(6116002)(33656002)(4326008)(107886003)(9686003)(86362001)(54896002)(236005)(9326002)(52536014)(6246003)(7736002)(74316002)(6916009)(5660300002)(966005)(54906003)(606006)(6306002)(446003)(85182001)(790700001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0701MB2253; H:VI1PR0701MB2286.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: UKNORapxlQLHULWaphiXu2X8XlaQ38k68uYUlCnt93n/nMonFre3DF1grJmxoow0NO+i5wTDtxmvaa7lZwODf9zQh+uAex7PoX5wA+h17sOt2CePDxrk8tovkSt+PFKXZ12KMOL52mivQaCKEDXnTk4jwdZ0RSK695wEAOVuja4OHR3G/MWjo7NCmscBiQGIUnVE1HGznAZTX61Y4IHoH5/rzBXfEbIITD2zSVdE75FMnWxnweWYqs/iSyzC1j2P3mi1GSnpaqrUD8mKSAz715TCnu8AJVYvTzz3HuGvj6nFW/wySmuT75oYaaVF0Nwjojxd0QJlRNe5V+XDQ14l+9gNgcCalpi5tx9srJKRj4CVyImE+Qowz2K1W16ztRMnHGG3Q+wZ1RBTsZ29vgoVCoULkcHtb1l6ncVyxOjMBg58TxG9mHo2i0WWuqQcklHl
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=SHA1; boundary="----=_NextPart_000_0085_01D58A81.FD03B2F0"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 01bcf6d5-5b7e-49ed-f98d-08d758885d03
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2019 13:44:59.4473 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: GpPf9wBhs3OG+E1jOZWcKmuh24cl2swggJaUOTbRqsG470nAE0CJXGMTvvdyLntncVaeb5HzUv5VcUZJXal7bksqkfPIY2Vb7jltNGHL6L0=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2253
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/mQaHKxusvg4-PVF946VlTL6hnQU>
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: Thu, 24 Oct 2019 13:45:07 -0000
X-List-Received-Date: Thu, 24 Oct 2019 13:45:07 -0000

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> 
Sent: 2019. október 22., kedd 16:37
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: netmod@ietf.org; Mark Hollmann <mark.hollmann@ericsson.com>om>; Edvardas Lasauskas <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:  <mailto:Balazs.Lengyel@ericsson.com> Balazs.Lengyel@ericsson.com

 

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