[yang-doctors] RFC 2119 language in YANG models

Mahesh Jethanandani <mjethanandani@gmail.com> Thu, 30 June 2016 23:06 UTC

Return-Path: <mjethanandani@gmail.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 634B812B043 for <yang-doctors@ietfa.amsl.com>; Thu, 30 Jun 2016 16:06:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 vCc7feA40O3G for <yang-doctors@ietfa.amsl.com>; Thu, 30 Jun 2016 16:06:13 -0700 (PDT)
Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E9DEE12B019 for <yang-doctors@ietf.org>; Thu, 30 Jun 2016 16:06:12 -0700 (PDT)
Received: by mail-pa0-x22f.google.com with SMTP id wo6so32531563pac.3 for <yang-doctors@ietf.org>; Thu, 30 Jun 2016 16:06:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:message-id:date:to :mime-version; bh=uC7SD6pN19mZIn2b2p5mDfRW77qn+zqZ/bJmAo6MFeg=; b=bUeTBMMcpodKHxl1bUiKL3MY2EkcOaFPT++4klhrmI09kptfQb0UkIBHe6znaK28B3 rI/ZpCi4gnYuSl8CGAFpw+vIcO2f+++CWKqdoKns8rzjgFhmSflXWpjPaRu7EO4YRBNl UMuJ+vrfaxdK23FmbBlraT8TrvTH6YN72nfjBQ1YxaGmtTLTX6jrGvreHcRPuR2WvI6C n96ZennH0mGWIWtHgmgQyAHw/ExEVmalRrSYRB1yFnllazp37luEjVaaNxQVgLcehJ70 wrKjHChcNPSWkAOG6i+frM127isGffrE2B4MIBRJrYCHfguxt5x+2kdq52Vl0Ed9Vooq rfGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=uC7SD6pN19mZIn2b2p5mDfRW77qn+zqZ/bJmAo6MFeg=; b=DpZwVWd8THzWdZwVIIT0AZ4kuYZ1iPI9Lyif2muVp8yhPCRjHuhowALWn2DYc9da1x zxeDGAkRmbUXOe7VBTIN89p2VDTf8M33O5Dz/jFVhCHKvihxpTpa6a7/abCkLnrvemLa srUgaCcuqcQqCRSOOEbaJnWQZt70nH2UTzMqtS6VlaSJ8WPjamA1BSj/Dr11q3R9xgHx R6iuhRoqyJmi5bnR90eJUpNaFeq25WlG04sbEFIIVXCqhFZr2QDKa/oUXu6CEM8rdSSv Mqd9UGbT0O/nl/sXXlIY3JsWt7madJespaREyb12cyluUQ1+b3ecaQ1c+AA+iHHiGlXq GKVQ==
X-Gm-Message-State: ALyK8tKd3bu5zv3TkSJJBkWL8gO1QZlRpE2/MZAfQDXDQRA0F05cvGvAm1ArL/1hZ8FuiQ==
X-Received: by 10.66.254.196 with SMTP id ak4mr25704569pad.62.1467327972216; Thu, 30 Jun 2016 16:06:12 -0700 (PDT)
Received: from ?IPv6:2001:420:30d:1320:19fa:5503:5b25:bd9f? ([2001:420:30d:1320:19fa:5503:5b25:bd9f]) by smtp.gmail.com with ESMTPSA id qc6sm449931pac.6.2016.06.30.16.06.10 for <yang-doctors@ietf.org> (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jun 2016 16:06:10 -0700 (PDT)
From: Mahesh Jethanandani <mjethanandani@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Message-Id: <FA0F7263-8C56-47AB-9316-A121B1D1ADBD@gmail.com>
Date: Thu, 30 Jun 2016 16:06:22 -0700
To: YANG Doctors <yang-doctors@ietf.org>
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/M5ngsoXj9VWefDWoCXXf4hevONU>
Subject: [yang-doctors] RFC 2119 language in YANG models
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Jun 2016 23:06:14 -0000

As YANG modules are written in the context of a RFC standard, it is natural to see some of the RFC 2119 language in YANG models when citing some portion of the RFC to describe the attribute. But what does the language mean for the YANG model itself? 

For example, if the standard says the default max-count value SHOULD be 32768, one can set the default value to 32768. But what happens if someone through deviation wants to set a different default value? Will that request be rejected? What happens if we s/SHOULD/MUST/?

Or how about this - This parameter MUST be generated pseudo-randomly. I do not know how to model this.

My initial take is that one can try to model RFC 2119 language in YANG, but RFC 2119 language applies to implementation more than it applies to the YANG model itself. I certainly do not know how to model MAY or RECOMMEND or SHALL or SHALL NOT.

Thoughts?

Mahesh Jethanandani
mjethanandani@gmail.com