[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Arrays and Hashes
Hi all,
Sorry if this has been discussed before, but I'm having trouble
understanding <get-config>. Looking at the NetConf documentation,
there's an example laid out as follows:
Request:
<rpc message-id="105" xmlns="http://ietf.org/netconf/base/1.0">
<get-config>
<source>
<running/>
</source>
<config xmlns="http://example.com/schema/1.2/config">
<users/>
</config>
<format>xml</format>
</get-config>
</rpc>
Response:
<rpc-reply message-id="105"
xmlns="http://ietf.org/netconf/base/1.0">
<config xmlns="http://example.com/schema/1.2/config">
<users>
<user>
<name>root</name>
<type>superuser</type>
<full-name>Charlie Root</full-name>
</user>
<user>
<name>fred</name>
<type>admin</type>
<full-name>Fred Flintstone</full-name>
</user>
<user>
<name>barney</name>
<type>admin</type>
<full-name>Barney Rubble</full-name>
</user>
</users>
</config>
</rpc-reply>
That makes perfect sense to me. What doesn't make sense is the second
part of the example:
Request:
<rpc message-id="106" xmlns="http://ietf.org/netconf/base/1.0">
<get-config>
<source>
<running/>
</source>
<config xmlns="http://example.com/schema/1.2/config">
<users>
<user>
<name>fred</name>
</user>
</users>
</config>
<format>xml</format>
</get-config>
</rpc>
Response:
<rpc-reply message-id="106"
xmlns="http://ietf.org/netconf/base/1.0">
<config xmlns="http://example.com/schema/1.2/config">
<users>
<user>
<name>fred</name>
<type>admin</type>
<full-name>Fred Flintstone</full-name>
</user>
</users>
</config>
</rpc-reply>
I kind of understand that the client requested information regarding
<name>fred</name>. What if, then, the client requested something like
this:
Request:
<rpc message-id="106" xmlns="http://ietf.org/netconf/base/1.0">
<get-config>
<source>
<running/>
</source>
<config xmlns="http://example.com/schema/1.2/config">
<users>
<user>
<name/>
</user>
</users>
</config>
<format>xml</format>
</get-config>
</rpc>
Would the implementation return all <user> elements with just the <name>
filled in? Or, does this end up as an error? Also, what happens if:
Request:
<rpc message-id="106" xmlns="http://ietf.org/netconf/base/1.0">
<get-config>
<source>
<running/>
</source>
<config xmlns="http://example.com/schema/1.2/config">
<users>
<user>
<type>admin</type>
</user>
</users>
</config>
<format>xml</format>
</get-config>
</rpc>
that comes in? Since we have 2 admins (fred and barney), would we
return an entire <user><name/><type/><full-name/></user> on fred and
barney, or do we return 2 <user><type/></user> elements (pretty much
with just the word "admin" filled in for <type>)? The latter kind of
doesn't make sense in such a context, but it doesn't seem too easy to
determine "what" to exactly send back. Any feedback on this would be
greatly appreciated! Thanks in advance!
Lewis D.
--
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/>