[Contents] [Prev] [Next] [Index] [Report an Error]

Requesting a Hierarchy Level or Container Object Without an Identifier

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 Requesting Information from the Committed or Candidate Configuration.

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 Requesting Information from the Committed or Candidate Configuration.

<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 Requesting Multiple Configuration Elements Simultaneously .

The following example shows how to request the contents of the [edit system login] hierarchy level in the candidate configuration.

Image t2128.gif
[Contents] [Prev] [Next] [Index] [Report an Error]