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

Verifying Compatibility

Exchanging <hello> tag elements enables a client application and the NETCONF server to determine if they support the same capabilities. In addition, we recommend that the client application determine the version of the JUNOS software running on the NETCONF server. After emitting its <hello> tag element, it emits the <get-software-information> tag element in an <rpc> tag element:

<rpc>
<get-software-information/>
</rpc>
]]>]]>

The NETCONF server returns the <software-information> tag element, which encloses the <host-name> and <product-name> tag elements plus a <package-information> tag element for each JUNOS software module. (For information about the <rpc-reply> tag element, see Parsing the NETCONF Server Response.) The <comment> tag element within the <package-information> tag element specifies the JUNOS release number (in the following example, 9.4 for JUNOS Release 9.4) and the build date in the form YYYYMMDD (year, month, day—12 January 2007 in the following example). Some tag elements appear on multiple lines, for legibility only:

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" \
                xmlns:junos="http://xml.juniper.net/junos/8.2R1/junos">
    <software-information>
        <host-name>router1</host-name>
        <product-name>m20</product-name>
        <package-information>
            <name>junos</name>
            <comment>JUNOS Base OS boot [8.2-20070112.0]</comment>
        </package-information>
        <package-information>
            <name>jbase</name>
            <comment>JUNOS Base OS Software Suite \
                                [8.2-20070112.0]</comment>
        </package-information>
        <!- - <package-information> tag elements for additional modules - ->
    </software-information>
    </capabilities>
</rpc-reply>
]]>]]>

Normally, the version is the same for all JUNOS software modules running on the routing platform (we recommend this configuration for predictable routing performance). Therefore, it is usually sufficient to verify the version number of just one module.

In the NETCONF API for JUNOS Release 9.4, it is the responsibility of the client application to determine how to handle any differences in version or capabilities. For fully automated performance, include code in the client application that determines whether it supports the same capabilities and JUNOS version as the NETCONF server. Decide which of the following options is appropriate when there are differences, and implement the corresponding response:


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