As discussed in Providing Configuration Data in a File and Providing Configuration Data as a Data Stream, a client application can provide new configuration data to the JUNOScript server either in a file or as a data stream emitted during the JUNOScript session. In both cases, it can use either JUNOS XML tag elements or formatted ASCII text to define the new configuration data.
If the application uses JUNOS XML tag elements, it includes the tag elements representing all levels of the configuration hierarchy from the root (the <configuration> tag element) down to each new or changed element. The notation is the same as that used to request configuration information, and is described in detail in Overview of Configuration Changes.
<configuration>
<!- - tag elements representing the configuration data - ->
</configuration>
If the application provides the new data as formatted ASCII text, it uses the standard JUNOS CLI notation to indicate the hierarchical relationships between configuration statements—the newline character, tabs and other white space, braces, and square brackets. For each new or changed element, the complete statement path is specified, starting with the top-level statement that appears directly under the [edit] hierarchy level.
When ASCII text is provided as a data stream, it is enclosed in the <configuration-text> tag element:
<configuration-text>
/* formatted ASCII configuration statements */
</configuration-text>
When ASCII text is provided in a previously saved file, the <configuration-text> tag element is not included in the file.
When providing new data as ASCII text, the application also includes the format="text" attribute in the <load-configuration/> tag or opening <load-configuration> tag.
<rpc>
<load-configuration url="file-location" format="text"/>
</rpc>
<rpc>
<load-configuration format="text">
<configuration-text>
/* formatted ASCII configuration data */
</configuration-text>
</load-configuration>
</rpc>
The format attribute can be combined with one or more of the following other attributes:
For reference pages for the <configuration> and <configuration-text> tag elements, see the JUNOS XML API Operational Reference.