Overview of Configuration Changes
To change configuration information, the client application performs the procedures described in the indicated sections:
- Establishes a connection to the Junos XML protocol server on the routing, switching, or security platform, as described in Connecting to the Junos XML Protocol Server.
- Opens a Junos XML protocol session, as described in Starting the Junos XML Protocol Session.
- (Optional) Locks the candidate configuration or creates a private copy, as described in Locking the Candidate Configuration and Creating a Private Copy of the Configuration. Locking the configuration prevents other users or applications from changing it at the same time. Creating a private copy enables the application to make changes without affecting the candidate or active configuration until the copy is committed.
- Encloses the <load-configuration> tag element
in an <rpc> tag element. By including various attributes
in the <load-configuration/> tag or opening <load-configuration> tag, the application can provide the configuration data either in
a file or as a directly loaded tag stream, and either as Junos XML
tag elements or formatted ASCII text. It can completely replace the
existing configuration or can specify the manner in which the Junos
XML protocol server loads the data into the existing candidate or
copy. The basic syntax is as follows:
<rpc>
<!-- If providing configuration data in a file -->
<load-configuration url="file" [optional attributes]
<!-- If providing configuration data in a data stream -->
<load-configuration [optional attributes]>
<!-- configuration data -->
</load-configuration>
</rpc> - Accepts the tag stream emitted by the Junos XML protocol
server in response to each request and extracts its content, as described
in Parsing the Junos XML Protocol Server Response.
The Junos XML protocol server confirms that it incorporated the configuration data by returning the <load-configuration-results> tag element and <load-success/> tag in the <rpc-reply> tag element:
<rpc-reply xmlns:junos="URL">
<load-configuration-results>
<load-success/>
</load-configuration-results>
</rpc-reply>If the load operation fails, the <load-configuration-results> tag element instead encloses the <load-error-count> tag element, which indicates the number of errors that occurred. In this case, the application or an administrator must eliminate the errors before committing the configuration.
<rpc-reply xmlns:junos="URL">
<load-configuration-results>
<load-error-count>count</load-error-count>
</load-configuration-results>
</rpc-reply> - (Optional) Verifies the syntactic correctness of a configuration before attempting to commit it, as described in Verifying a Configuration Before Committing It.
- Commits changes made to the configuration, as described in Committing a Configuration.
- Unlocks the candidate configuration if it is locked, as described in Unlocking the Candidate Configuration. Other users and applications cannot change the configuration while it remains locked.
- Ends the Junos XML protocol session and closes the connection to the device, as described in Ending a Junos XML Protocol Session and Closing the Connection.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1