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

Requesting Configuration Information

To request information about a configuration on a routing platform, a client application encloses the <get-config>, <source>, and <filter> tag elements in an <rpc> tag element. By including the appropriate child tag element in the <source> tag element, the client application requests information from either the candidate or active configuration. By including the appropriate child tag elements in the <filter> tag element, the application can request the entire configuration or portions of it:

<rpc>
<get-config>
        <source>
            <!- - tag specifying the source configuration - ->
        </source>
        <filter type="subtree">
            <!- - tag elements representing the configuration elements to return - ->
        </filter>
</get-config>
</rpc>
]]>]]>

The type="subtree" attribute in the opening <filter> tag indicates that the client application is using JUNOS XML tag elements to represent the configuration elements about which it is requesting information. For information about the syntax used within the <filter> tag element to represent elements, see Specifying the Scope of Configuration Information to Return.

Note: If the client application locks the candidate configuration before making requests, it needs to unlock it after making its read requests. Other users and applications cannot change the configuration while it remains locked. For more information, see Locking and Unlocking the Candidate Configuration.

The NETCONF server encloses its reply in <configuration>, <data>, and <rpc-reply> tag elements. It includes attributes in the opening <configuration> tag that indicate the XML namespace for the enclosed tag elements and when the configuration was last changed or committed. For information about the attributes, see Requesting Information from the Committed or Candidate Configuration.

<rpc-reply xmlns="URN" xmlns:junos="URL">
    <data>
        <configuration attributes>
            <!- - JUNOS XML tag elements representing configuration elements - ->
        </configuration>
    </data>
</rpc-reply>
]]>]]>

If a JUNOS XML tag element is returned within an <undocumented> tag element, the corresponding configuration element is not documented in the JUNOS software configuration guides or officially supported by Juniper Networks. Most often, the enclosed element is used for debugging only by Juniper Networks personnel. In a smaller number of cases, the element is no longer supported or has been moved to another area of the configuration hierarchy, but appears in the current location for backward compatibility.

Client applications can also request other configuration-related information, including an XML schema representation of the configuration hierarchy or information about previously committed configurations. For more information, see the following sections:

The following sections describe how a client application specifies the source and scope of configuration information returned by the NETCONF server:


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