- play_arrow Overview
- play_arrow Junos XML Management Protocol and Junos XML API Overview
- play_arrow Junos XML Protocol and Junos XML Tags Overview
- XML and Junos OS Overview
- XML Overview
- XML and Junos XML Management Protocol Conventions Overview
- Map Junos OS Commands and Command Output to Junos XML Tag Elements
- Map Configuration Statements to Junos XML Tag Elements
- Using Configuration Response Tag Elements in Junos XML Protocol Requests and Configuration Changes
- play_arrow Junos XML Protocol and JSON Overview
-
- play_arrow Manage Junos XML Protocol Sessions
- play_arrow Junos XML Protocol Session Overview
- play_arrow Manage Junos XML Protocol Sessions
- Satisfy the Prerequisites for Establishing a Connection to the Junos XML Protocol Server
- Configure clear-text or SSL Service for Junos XML Protocol Client Applications
- Connect to the Junos XML Protocol Server
- Start a Junos XML Protocol Session
- Authenticate with the Junos XML Protocol Server for Cleartext or SSL Connections
- Send Requests to the Junos XML Protocol Server
- Parse the Junos XML Protocol Server Response
- Parse Response Tag Elements Using a Standard API in NETCONF and Junos XML Protocol Sessions
- How Character Encoding Works on Juniper Networks Devices
- Handle an Error or Warning in Junos XML Protocol Sessions
- Halt a Request in Junos XML Protocol Sessions
- Lock, Unlock, or Create a Private Copy of the Candidate Configuration Using the Junos XML Protocol
- Terminate a Junos XML Protocol Session
- End a Junos XML Protocol Session and Close the Connection
- Sample Junos XML Protocol Session
- play_arrow Junos XML Protocol Tracing Operations
- play_arrow Junos XML Protocol Operations
- play_arrow Junos XML Protocol Processing Instructions
- play_arrow Junos XML Protocol Response Tags
- play_arrow Junos XML Element Attributes
- active
- count
- delete
- inactive
- insert
- junos:changed
- junos:changed-localtime
- junos:changed-seconds
- junos:commit-localtime
- junos:commit-seconds
- junos:commit-user
- junos:group
- junos:interface-range
- junos:key
- junos:position
- junos:total
- matching
- protect
- recurse
- rename
- replace
- replace-pattern
- start
- unprotect
- xmlns
-
- play_arrow Request Operational and Configuration Information Using the Junos XML Protocol
- play_arrow Request Operational Information Using the Junos XML Protocol
- play_arrow Request Configuration Information Using the Junos XML Protocol
- Request Configuration Data Using the Junos XML Protocol
- Specify the Source for Configuration Information Requests in a Junos XML Protocol Session
- Specify the Output Format for Configuration Data in a Junos XML Protocol Session
- Request Commit-Script-Style XML Configuration Data Using the Junos XML Protocol
- Specify the Output Format for Configuration Groups and Interface Ranges Using the Junos XML Protocol
- Request Identifier Indicators for Configuration Elements Using the Junos XML Protocol
- Request Change Indicators for Configuration Elements Using the Junos XML Protocol
- Specify the Scope of Configuration Data to Return in a Junos XML Protocol Session
- Request the Complete Configuration Using the Junos XML Protocol
- Request a Configuration Hierarchy Level or Container Object Without an Identifier Using the Junos XML Protocol
- Request All Configuration Objects of a Specific Type Using the Junos XML Protocol
- Request a Specific Number of Configuration Objects Using the Junos XML Protocol
- Request Identifiers for Configuration Objects of a Specific Type Using the Junos XML Protocol
- Request a Single Configuration Object Using the Junos XML Protocol
- Request Subsets of Configuration Objects Using Regular Expressions
- Request Multiple Configuration Elements Using the Junos XML Protocol
- Retrieve a Previous (Rollback) Configuration Using the Junos XML Protocol
- Retrieve the Rescue Configuration Using the Junos XML Protocol
- Compare the Active or Candidate Configuration to a Prior Version Using the Junos XML Protocol
- Compare Two Previous (Rollback) Configurations Using the Junos XML Protocol
- Request an XML Schema for the Configuration Hierarchy Using the Junos XML Protocol
-
- play_arrow Junos XML Protocol Utilities
- play_arrow Develop Junos XML Protocol C Client Applications
-
- play_arrow Configuration Statements and Operational Commands
Request Configuration Changes Using the Junos XML Protocol
In a Junos XML protocol session with a device running
Junos OS, you can use Junos XML protocol operations along with Junos
XML, command-line interface (CLI) configuration statements, set
commands, or JSON data to change the configuration on a routing,
switching, or security platform. The Junos XML protocol <load-configuration>
operation and its attributes
offer functionality that is analogous to configuration mode commands
in the Junos OS CLI. The Junos XML tag elements described here correspond
to configuration statements, which are described in the Junos OS configuration
guides.
To change the configuration on a device running Junos OS, 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.
Starts a Junos XML protocol session, as described in Starting Junos XML Protocol Sessions.
Optionally locks the candidate configuration, creates a private copy of the candidate configuration, or opens an instance of the ephemeral configuration database.
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 configuration until the copy is committed. For more information, see Locking and Unlocking the Candidate Configuration or Creating a Private Copy Using the Junos XML Protocol.
For information about the ephemeral configuration database, see Understanding the Ephemeral Configuration Database and Enabling and Configuring Instances of the Ephemeral Configuration Database.
Encloses the
<load-configuration>
tag element in an<rpc>
tag element. By including various attributes in the<load-configuration>
tag, the application can provide the configuration data either in a file or as a directly loaded tag stream, and as Junos XML tag elements, formatted ASCII text, JSON-formatted data, or Junos OS configuration modeset
commands. The client application can specify that the configuration data completely replace the existing candidate configuration, or the application can specify the manner in which the Junos XML protocol server loads the data into the existing candidate configuration, private copy, or open instance of the ephemeral configuration database. The basic syntax is as follows:content_copy zoom_out_map<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:content_copy zoom_out_map<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.content_copy zoom_out_map<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 the candidate configuration or a private copy before attempting to commit it, as described in Verifying Configuration Syntax Using the Junos XML Protocol.
Commits changes made to the candidate configuration or private copy, as described in Committing the Candidate Configuration Using the Junos XML Protocol, or commits changes made to an open instance of the ephemeral configuration database, as described in Committing and Synchronizing Ephemeral Configuration Data Using the NETCONF or Junos XML Protocol.
Unlocks the candidate configuration if it is locked, or closes a private copy of the configuration or an open instance of the ephemeral configuration database.
Other users and applications cannot change the configuration while it remains locked. For more information, see Locking and Unlocking the Candidate Configuration or Creating a Private Copy Using the Junos XML Protocol.
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.