Subject: error-path for multiple instances

From: Andy Bierman <[email-masked]>
Date: Thu, 09 Mar 2006 07:33:13 -0800

Hi,

How should error-info be enhanced to support multiple similar errors?

Consider an edit-config that is changing the 'mtu' object
to an illegal value in 2 or more interfaces:

...
 <config>
   <interfaces xmlns="http://example.com/schema/1.0">
     <interface>
       <name>eth0</name>
       <mtu>64000</mtu>
     </interface>
     <interface>
       <name>eth1</name>
       <mtu>64000</mtu>
     </interface>
   </interfaces>
 </config>

So first I added an <error-level> error element,
because it is a lot easier and more compact than error-path.

Then I added a <bad-value> element, so you can tell that
the row with value '64000' had the error.  Well of course,
that doesn't solve the problem either.

Then I added a <instance-id> element, which does solve the problem:

  <error-info xmlns:ex="example.com-blah" xmlns:ncx="ncx-blah">
    <bad-element>mtu</bad=element>
    <ncx:error-level>5</ncx:error-level>
    <ncx:bad-value>64000</ncx:bad-value>
    <ncx:instance-id>
          <ex:name>eth0</ex:name>
    </ncx:instance-id>
  </error-info>

I guess if you could use Xpath too (and that's what the WG should do):

<error-path xmlns:nc="netconf-blah" xmlns:ex="example.com-blah">
   
/nc:rpc/nc:edit-config/nc:config/ex:interfaces/ex:interface[ex:name="eth0"]/ex:mtu
</error-path>

IMO, it is a subjective decision which is better: Xpath or XML.

Andy

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>