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

Overview of Configuration Changes

To change configuration information, the client application performs the procedures described in the indicated sections:

  1. Establishes a connection to the JUNOScript server on the routing platform, as described in Connecting to the JUNOScript Server.
  2. Opens a JUNOScript session, as described in Starting the JUNOScript Session.
  3. (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.
  4. 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 JUNOScript 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>
  5. Accepts the tag stream emitted by the JUNOScript server in response to each request and extracts its content, as described in Parsing the JUNOScript Server Response.

    The JUNOScript 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>
  6. (Optional) Verifies the syntactic correctness of a configuration before attempting to commit it, as described in Verifying a Configuration Before Committing It.
  7. Commits changes made to the configuration, as described in Committing a Configuration.
  8. 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.
  9. Ends the JUNOScript session and closes the connection to the routing platform, as described in Ending a JUNOScript Session and Closing the Connection.

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