Subject: [yang-doctors] RFC 2119 language in YANG models

From: Mahesh Jethanandani <[email-masked]>
Date: Thu, 30 Jun 2016 16:06:22 -0700

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
[email-masked]