Requesting Multiple Configuration Elements Simultaneously Using NETCONF
In a NETCONF session with a device running Junos OS, a client application can request multiple configuration elements of the same type or different types within a <get-config> tag element. The request includes only one <filter> and <configuration> tag element (the NETCONF server returns an error if there is more than one of each).
If two requested objects have the same parent hierarchy level, the client can either include both requests within one parent tag element, or repeat the parent tag element for each request. For example, at the [edit system] hierarchy level the client can request the list of configured services and the identifier tag element for RADIUS servers in either of the following two ways:
<!-- both requests in one <system> tag element -->
<rpc>
<get-config>
<source>
<!-- tag specifying the source configuration -->
</source>
<filter type="subtree">
<configuration>
<system>
<services/>
<radius-server>
<name/>
</radius-server>
</system>
</configuration>
</filter>
</get-config>
</rpc>
]]>]]>
<!-- separate <system> tag element for each element -->
<rpc>
<get-config>
<source>
<!-- tag specifying the source configuration -->
</source>
<filter type="subtree">
<configuration>
<system>
<services/>
</system>
<system>
<radius-server>
<name/>
</radius-server>
</system>
</configuration>
</filter>
</get-config>
</rpc>
]]>]]>
The client can combine requests for any of the following types of information:
- Requesting a Configuration Hierarchy Level or Container Object Without an Identifier Using NETCONF
- Requesting All Configuration Objects of a Specified Type Using NETCONF
- Requesting Identifiers for Configuration Objects of a Specified Type Using NETCONF
- Requesting A Specific Configuration Object Using NETCONF
- Requesting Specific Child Tags for a Configuration Object Using NETCONF