Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Request a Configuration Hierarchy Level or Container Object Without an Identifier Using NETCONF

date_range 15-Jul-21

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:

content_copy zoom_out_map
<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.

content_copy zoom_out_map
<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.

footer-navigation