Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Request All Configuration Objects of a Specified Type Using NETCONF

In a NETCONF session with a device running Junos OS, to request information about all configuration objects of a specified type in a hierarchy level, 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 for the object type. An empty tag returns all configuration objects of the requested object type and all child tags for each object. To return only specific child tags for the configuration objects, enclose the desired child tags in the opening and closing tags of the object. The entire request is enclosed in an <rpc> tag element:

For information about the <source> tag element, see Specify the Source for Configuration Information Requests Using NETCONF.

This type of request is useful when the object’s parent hierarchy level has more than one type of child object. If the requested object is the only child type that can occur in its parent hierarchy level, then this type of request yields the same output as a request for the complete parent hierarchy, which is described in Request a Configuration Hierarchy Level or Container Object Without an Identifier Using NETCONF.

The NETCONF server returns the requested objects 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.

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 complete information about all radius-server objects at the [edit system] hierarchy level in the candidate configuration.