April 11, 2019, 9:19am
As the netconf subtree filter guide, the Netconf supports the subtree filtering, whether the netconf-console support it?
How to set it in the netconf-console?
April 11, 2019, 12:11pm
netconf-console supports XPath filtering - anything you can do with a subtree filter you can do with a XPath filter, plus a lot more. That of course assumes your NETCONF server supports
:xpath capability - ConfD does that by default.
To use that you write something like
netconf-console --get-config -x /top/users, see section 15.9 of the ConfD manual. If you insist on using subtree filtering with
netconf-console, you probably need to write the rpc yourself.
April 16, 2019, 8:49am
Thanks very much for the response.
Suppose I have writen the rpc, how could I use netconf-console to filter
netconf-console --port=830 --db running --get-config
The rpc is:
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
Thanks for any suggestions.
April 16, 2019, 11:35am
netconf-console doesn’t have a manual page, but you can learn everything about it with
netconf-console -h (or
--help), which says among many other things:
--rpc=RPC Takes a filename (or '-' for standard input) as
argument. The contents of the file is a single NETCONF
rpc operation (w/o the surrounding <rpc>).
I.e. you can put your rpc, minus the leading
<rpc ...> and trailing
</rpc>, in a file and then run
netconf-console --port=830 --rpc=<filename>`
--db running --get-config part is redundant since it’s specified in the rpc.)