[netmod] Default statements and deviate add/replace

Balázs Lengyel <balazs.lengyel@ericsson.com> Tue, 22 October 2019 10:56 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 DEAD2120241 for <netmod@ietfa.amsl.com>; Tue, 22 Oct 2019 03:56:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, 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 CilVf84COykw for <netmod@ietfa.amsl.com>; Tue, 22 Oct 2019 03:56:11 -0700 (PDT)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60084.outbound.protection.outlook.com [40.107.6.84]) (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 2D88D12021C for <netmod@ietf.org>; Tue, 22 Oct 2019 03:56:11 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J9FdaiX9J07t7veAYbxFKjRuPHjGaPRC3BMugriQhjtPalFMlnWzK9ZUEySz5KUvQYfrCKP3/Z6G/YvTT3PXAhZ2LGBm1coCp0HYCUO2IKZbTQ1fyDzxKVR7gCfDl5JRkHplXYGf70mGZnEIdMH8Rd+pVAnSpNX0oFeTPmYdokPujb/NWNkgLaanKXDvpGr9hsg5HVKzgZKpuNflfgwqlUqGLRGNXsGsGHg/tqGM5fo028kJ+6+VO8UX41HlLIgOC4rUBrtrIbyjujLggFIQNdXk80u2RkykWfzHeAX9Tj7CgHi0pNaKzhY2w2Eg399+9XuLGsq8A8o7W00h99FX6g==
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=a4eqIGGYKFU0cjSFjn6gdYVds5KvHyxqNTDcyQm2qKI=; b=WyXb6+cT3vvao3nMoT3JTvudBaVcmK1NW0gaoqWJVP/tJgCJzZeVZnAeG5ATYWd2g/c72D25DK1JndmVmn9MxzwL2CSBPPB7QXfx9bl7xkrnNiFlcb+9JWZzRtqOKCOqCBG/KAVzqXkh4jhLUNHma7SPqsJBScx6OzQj455qz9i5vjTw7g2D4qE3dW5Gk91pFmOiFv5bvLntIbmoGfNUKqg1piZ0smCbrCULnHf+BppRWHMwtfukrmEc2dzez31l2OoKJ9PKXQDzNLlIa8LDoSgWNyOQoITNGIPLuFae3MGP+itZ41HmEI0C9gPk1u5Zn3Nctn131xZy9aE/5VyvNg==
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=a4eqIGGYKFU0cjSFjn6gdYVds5KvHyxqNTDcyQm2qKI=; b=qb23pgGauMG/Dhj9tGVU9d6h8vnYoFDdDcYHLzX9y3GR7vA2Qxqw7p10GAcJ9xio069CF8s3XVXs+YT1/kk9ljYrKs6rRI6aLHXucMkjc9U+WU5TPRyrXiqSUP63+RywXpwupKJlBfno/5KPgfxJqTu3AyRo2cJfr/O7jTxXYYo=
Received: from VI1PR0701MB2286.eurprd07.prod.outlook.com (10.169.137.153) by VI1PR0701MB2336.eurprd07.prod.outlook.com (10.168.137.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.14; Tue, 22 Oct 2019 10:56:08 +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.016; Tue, 22 Oct 2019 10:56:08 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: "'netmod@ietf.org'" <netmod@ietf.org>
CC: Mark Hollmann <mark.hollmann@ericsson.com>, Edvardas Lasauskas <edvardas.lasauskas@ericsson.com>
Thread-Topic: Default statements and deviate add/replace
Thread-Index: AdWIwoN5sUEukdGAQsGK9U4p7bcxKQ==
Date: Tue, 22 Oct 2019 10:56:08 +0000
Message-ID: <VI1PR0701MB2286C5DA80832D166198EA65F0680@VI1PR0701MB2286.eurprd07.prod.outlook.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: 8f927f80-6eba-4545-cf0f-08d756de71d2
x-ms-traffictypediagnostic: VI1PR0701MB2336:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <VI1PR0701MB2336FAAA161498971D29A0CDF0680@VI1PR0701MB2336.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:3173;
x-forefront-prvs: 01986AE76B
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(39860400002)(396003)(136003)(366004)(376002)(189003)(199004)(478600001)(5660300002)(9686003)(2906002)(186003)(790700001)(6436002)(26005)(6506007)(55016002)(3846002)(6306002)(54896002)(25786009)(99936001)(6116002)(14454004)(7696005)(66946007)(66616009)(66066001)(476003)(9326002)(45776006)(66446008)(107886003)(66556008)(66476007)(64756008)(99286004)(486006)(316002)(33656002)(81156014)(81166006)(71200400001)(54906003)(76116006)(71190400001)(6916009)(8676002)(52536014)(7736002)(8936002)(86362001)(74316002)(4326008)(102836004)(256004)(491001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0701MB2336; H:VI1PR0701MB2286.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: L/6sSYEKf8AUTaxW2TXuUwOvrUJt4B2TXeVpY8Qav52TnQAKf99st6of6JUjms5isMp4wxLb5jP6nPkLjhf0gBqCGNxzbkCQ9EweTiZFXfEnk4Udkgwst6ph7Hc1skR2FdMKWktRbEkXn34anyLpTCLdKjrSVgTGHx9hEb5JUpMZBE0JEKAVf+pJeHB34ii//1QLUw3QRS2rzpoWMJgKwNFlTPBcjD+bZPpHCpl5MbGHuzC5nRx+MD6ia006CDdXtJFAWze5ETHvSUBFpP3y0gL7BtQgeJ0b/wq0rHsCQtXfg5m3UpTOLqgvCnmoZFHESfCN1+FXuOH9+FCw2yrZXSzLQ9mGsVj57P0z9x0DSCEtuWSeUmeC8ikkIfkYKTKz0zP1MK3KKXq1APvp0HGI7lalADw3gj090fl2Ec+BioP/R6s3vexKzR66Fwuh9UjC
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_002A_01D588D8.121E5970"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8f927f80-6eba-4545-cf0f-08d756de71d2
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2019 10:56:08.7374 (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: rVnoaPhWQjCXfooKNPL5x+XEr5ffSbFYf05vXon0eGw4LbKjvA6fhCKmF3e/ek5WN7klMGcy14GUZ0aL6lTeSbwRql7xH30lxDiAqUe2Xqw=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2336
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/5JNQgto1In6oc07oI_zn2P7m2h4>
Subject: [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, 22 Oct 2019 10:56:13 -0000

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