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

Providing Configuration Data in a File

To provide new configuration data in a file, a client application encloses the <load-configuration/> tag with the url attribute in an <rpc> tag element. If the data is JUNOS XML tag elements, it either includes the format="xml" attribute or omits the format attribute:


<rpc>
<load-configuration url="file-location"/>
</rpc>

If the data is formatted ASCII text, the format="text" attribute is included:


<rpc>
<load-configuration url="file-location" format="text"/>
</rpc>

Before loading the file, the client application or an administrator saves either JUNOS XML tag elements (enclosed in a <configuration> tag element) or formatted ASCI as the contents of the file (formatted ASCII text is not enclosed in a <configuration-text> tag element in the file). For information about the syntax for the data in the file, see Defining Configuration Data as Formatted ASCII Text or JUNOS XML Tag Elements.

The value of the url attribute can be a local file path, an FTP location, or a Hypertext Transfer Protocol (HTTP) URL:

In each case, the default value for the path variable is the home directory for the username. To specify an absolute path, the application starts the path with the characters %2F; for example, ftp://username:password@hostname/%2Fpath/filename.

The url attribute can be combined with one or more of the following other attributes in the <load-configuration/> tag:

The following example shows how to incorporate JUNOS XML-tagged configuration data stored in the file /var/configs/user-accounts on the FTP server called cfg-server.mycompany.com. The opening <load-configuration> tag appears on two lines for legibility only.

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