Request a Configuration Hierarchy Level or Container Object Without an Identifier Using NETCONF
In a NETCONF session with a device running Junos OS, to request
complete information about all child configuration elements at a hierarchy
level or in a container object that does not have an identifier, a
client application emits a <filter>
tag
element that encloses the tag elements representing all levels in
the configuration hierarchy from the root (represented by the <configuration>
tag element) down to the immediate
parent level of the level or container object, which is represented
by an empty tag. The entire request is enclosed in an <rpc>
tag element:
<rpc> <get-config> <source> <!-- tag specifying the source configuration --> </source> <filter type="subtree"> <configuration> <!-- opening tags for each parent of the requested level --> <level-or-container/> <!-- closing tags for each parent of the requested level --> </configuration> </filter> </get-config> </rpc> ]]>]]>
For information about the <source>
tag element, see Specify the Source for Configuration Information Requests Using NETCONF.
The NETCONF server returns the requested section of the configuration
in <data>
and <rpc-reply>
tag elements. For information about the attributes in the opening <configuration>
tag, see Specify the Source for Configuration Information Requests Using NETCONF.
<rpc-reply xmlns="URN" xmlns:junos="URL"> <data> <configuration attributes> <!-- opening tags for each parent of the level --> <level-or-container> <!-- child tag elements of the level or container --> </level-or-container> <!-- closing tags for each parent of the level --> </configuration> </data> </rpc-reply> ]]>]]>
The application can also request additional configuration elements
of the same or other types by including the appropriate tag elements
in the same <get-config>
tag element.
For more information, see Request Multiple Configuration Elements Simultaneously Using NETCONF.
The following example shows how to request the contents of the [edit system login]
hierarchy level in the candidate
configuration.