Subject: [netmod] require-instance error-app-tag

From: Andy Bierman <[email-masked]>
Date: Thu, 05 Feb 2009 17:13:29 -0800

Hi,

There doesn't seem to be any good error codes for a
require-instance = true violation for a leafref or instance-identifier.
Perhaps a new error-app-tag and sub-section of 13.x should be
added to make that stand out, especially since the default
is true.

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 09 Feb 2009 21:46:08 +0100 (CET)

> added to make that stand out, especially since the default

I agree.   'missing-instance' is already used.  How about
'instance-required'?  What should the error-tag be?
'operation-failed', or could 'data-missing' be used?

/martin

---

From: David Partain <[email-masked]>
Date: Wed, 11 Feb 2009 11:34:38 +0100

Hi,

On Monday 09 February 2009 21.46.08 Martin Bjorklund wrote:
> 'instance-required'? 

Seems fine to me.

> What should the error-tag be? 

data-missing makes good sense.

David

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 26 Feb 2009 23:32:29 +0100 (CET)

> data-missing makes good sense.

Ok.  I have added:

    ** Error Message for Data that Violates a require-instance statement:
    
    If a NETCONF operation would result in configuration data where an
    instance reference marked with require-instance "true" refers to a
    non-existing instance, the following error is returned:
    
      Tag:            data-missing
      Error-app-tag:  instance-required

There's also no good error code for the case when a mandatory choice
does not exist.   I propose the following text:

    ** Error Message for Data that Violates a mandatory choice statement:
    
    If a NETCONF operation would result in configuration data where no
    nodes exists in a mandatory choice, the following error is returned:
    
      Tag:            data-missing
      Error-app-tag:  missing-choice
      Error-path:     Path to the element with the missing choice.
      Error-info:     <missing-choice>: Contains the name of the missing
                      mandatory choice.
    
                      The <missing-choice> element is in the YANG
                      namespace ("urn:ietf:params:xml:ns:yang:1"
                      [XXX IANA]).

/martin

---

From: Andy Bierman <[email-masked]>
Date: Sat, 28 Feb 2009 17:30:39 -0800

>       Error-app-tag:  instance-required

Add:
       Error-path: Path to the element with the require-instance statement

>                       namespace ("urn:ietf:params:xml:ns:yang:1"

The <missing-choice> element should be a QName not an NCName because
another module could augment the node with a choice
with the same local name (but in a different namespace).

Andy