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

Referencing Configuration Data Files

To reference configuration data as a file, a client application emits the file location between <url> tag elements within the <rpc> and the <edit-config> tag elements.

<rpc>
    <edit-config>
        <target>
            <candidate/>
        </target>
        <url>
            <!- - location and name of file containing configuration data - ->
        </url>

    </edit-config>
</rpc>
]]>]]>

The data within these files can be formatted as either JUNOS XML or CLI configuration statements. When the configuration data is formatted as CLI configuration statements, you set the <url> format attribute to text.

<rpc>
    <edit-config>
        ...
      <url format=”text”>
        <!- - location and name of file containing configuration data - ->
      </url>
    </edit-config>
</rpc>

The configuration file can be placed locally or as a network resource:

Before loading the file, the client application or an administrator saves JUNOS XML tag elements as the contents of the file. The file includes the tag elements representing all levels of the configuration hierarchy from the root (represented by the <configuration> tag element) down to each element to change. The notation is the same as that used to request configuration information, as described in Requesting Information. For more detailed information about the JUNOS XML representation of JUNOS configuration statements, see Mapping Configuration Statements to JUNOS XML Tag Elements.

The following example shows how to incorporate configuration data stored in the file /var/tmp/configFile on the FTP server called ftp.myco.com:

Client ApplicationNETCONF Server
<rpc message-id=”messageID”>
    
    <edit-config>
        <target>
            <candidate/>
        </target>
        <url>
            ftp://admin:AdminPwd@ftp.myco.com/
%F2var/tmp/configFile </url> </edit-config> </rpc> ]]>]]>
    
<rpc-reply xmlns=”URN” xmlns:junos=”URL”>
    
    
    
    

  
<ok/> </rpc-reply> ]]>]]>

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