Subject: [Netconf] XPath in RFC 4741

From: Andy Bierman <[email-masked]>
Date: Wed, 26 Nov 2008 07:42:09 -0800

Hi,

The details on XPath filtering in 8.9.5.1 are not
that clear.

There is only a request in the example, but no reply:

      <rpc message-id="101"
           xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <get-config>
          <source>
            <running/>
          </source>
          <!-- get the user named fred -->
          <filter type="xpath" select="top/users/user[name='fred']"/>
         </get-config>
      </rpc>

Note the bug in the example -- the select string should start
with an absolute-path (/top instead of top).  Note the lack of
namespace declarations also.

Is this the correct reply?  Does the node-set result get
expanded back to root (A), or just encoded as a node-set (B)?

(A)

    <rpc-reply message-id="101"
           xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <data>
            <top>
                <users>
                    <user>
                        <name>fred</user>
                        <address>...</address>
                        <email>...</address>
                    </user>
                </users>
            </top>
        </data>
    </rpc-reply>

(B)

    <rpc-reply message-id="101"
           xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <data>
            <user>
                <name>fred</user>
                <address>...</address>
                <email>...</address>
            </user>
        </data>
    </rpc-reply>

What about something like select="//name"?

(B)
    <rpc-reply message-id="102"
           xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <data>
            <name>fred</name>
            <name>barney</name>
            <name>eth0</name>
            <name>eth1</name>
        </data>
    </rpc-reply>

Andy

_______________________________________________
Netconf mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/netconf