Subject: [netconf] ietf-restconf YANG - 'errors' grouping query

From: "hayden" <[email-masked]>
Date: Mon, 15 Jul 2019 09:29:41 +1200

Hi all,
  
 I've been working with the ietf-restconf YANG from RFC 8040 and I had a 
query about the 'error' list definition shown below (I've shortened the 
YANG excerpt for brevity).
  
 -- [email-masked] excerpt --

 grouping errors {   description     "A grouping that contains a YANG 
container representing the syntax and      semantics of a YANG Patch error 
report within a response message.";    container errors {     description   
    "Represents an error report returned by the server if        a request 
results in an error.";      list error {       description         "An 
entry containing information about one specific error that occurred         
 while processing a RESTCONF request.";       reference         "RFC 6241, 
Section 4.3.";        leaf error-type { ... }        leaf error-tag { ... } 
       leaf error-app-tag { ... }        leaf error-path { ... }        
leaf error-message { ... }        anydata error-info { ... }     }   } }   

 for context, the 'errors' grouping is used for reporting errors, within 
the yang extension statement 'yang-errors' in ietf-restconf, i.e.

 rc:yang-data yang-errors {   uses errors; }    
 Now, on to my point:
  
 Currently the list 'error' itself omits a config statement, and as there 
is no ancestor with a config-statement, presumably the 'error' list 
represents information that is configuration data.
 My understanding is that according to RFC 7950 (Section 7.8.2), lists 
representing configuration data must have a key specified. The excerpt 
above doesn't specify a key and perhaps should?
  
 Alternatively, another view is that as this is 'error' information, it is 
presumably read-only and perhaps the list or container should be explicitly 
marked as 'config false'?

 Keen to hear any thoughts on the above. Many thanks in advance.
  
 Kind regards,
 Hayden

---

From: Kent Watsen <[email-masked]>
Date: Wed, 24 Jul 2019 18:05:46 +0000

Hi Hayden,

<snip/>

> Currently the list 'error' itself omits a config statement, and as there is no ancestor with a config-statement, presumably the 'error' list represents information that is configuration data.
> My understanding is that according to RFC 7950 (Section 7.8.2), lists representing configuration data must have a key specified. The excerpt above doesn't specify a key and perhaps should?

RFC 8040 defines yang-data as not "configuration" by default (much like e.g., notifications) and hence, per RFC 7950 Section 7.8.2, the "key" statement is optional.   

Kent