[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NETCONF Instance Identifiers



Hi,

Several people have requested that we solve this problem.
I don't think it needs to be tied to the Notification work,
but it is useful for notification content to have a common way to describe
a particular instance of an XML element within a NETCONF data model.

It seems to me this problem is fairly simple.
It seems to me we could agree on naming without agreeing
on any particular data modeling language constructs,
because an instance identifier is just an absolute Xpath expression.

Here is something to throw darts at, and see how much consensus
exists on this issue:

==================================================================================

NETCONF Instance Identifiers

An instance of an element is defined by its absolute path from the root.

1) There is a 'fixed' root, starting at <rpc>, for methods
   and data.  There is also a conceptual 'relative' root for data.
   This is unnamed, and will be called <config> or <data> or <filter>
   in a NETCONF PDU.  There is no default namespace associated with
   the root.

2) An absolute Xpath expression containing all relevant conceptual
   INDEX (key) components represents an instance.  Order within
   an INDEX is significant. The leftmost INDEX component is the
   major index.  Each minor index in succession is listed left to right.

   E.g.: <bar> is a table indexed by x and y:

   /foo/bar[x="3",y="4"]

   E.g.: <baz> is a table indexed by a name string:

   /foo/bar[x="3",y="4"]/baz[name="fred"]

3) Unnamed instances (e.g. maxOccurs="unbounded") are identified
   by their position (relative to other instances of the same element),
   using a special INDEX component called 'position'.  Unnamed
   instances are numbered starting at zero.  Conceptually, all
   unnamed, single-instance elements can be identified as position="0".

   E.g.: <goo> is a simple type that can occur 0 or more times

   /foo/bar[x="3",y="4"]/baz[name="fred"]/zoo/goo[position="3"]

4) RPC methods are identified by their path from the absolute root,
   and instance identifiers used within <error-path> elements may identify
   the entire path to the <rpc> element.

   /rpc/edit-config/error-option

   /rpc/edit-config/config/interfaces/interface[name="eth0"]

5) If namespaces are used then components within the Xpath expression
   must consist of properly formatted Qualified Names.

  /nc:rpc/edit-config/config/acme:interfaces/interface[name="eth0"]


===========================================================================


Andy



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