Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Upload Configuration Data as a Data Stream Using the Junos XML Protocol

Junos XML protocol client applications can use the <load-configuration> operation to load configuration data onto a Junos device as a data stream.

A Junos XML protocol client application can load configuration data as a data stream onto a device running Junos OS or a device running Junos OS Evolved. To load the configuration as a data stream, a client application emits the <rpc> element and the <load-configuration> element with the appropriate child tags. The configuration data format can be Junos XML elements, formatted ASCII text, Junos OS configuration mode commands, or JavaScript Object Notation (JSON).

To load configuration data as Junos XML elements, the application emits the elements representing all levels of the configuration hierarchy from the root (represented by the <configuration> element) down to each element to change.

To load configuration data as formatted ASCII text, the application includes the format="text" attribute in the opening <load-configuration> tag. The application encloses the configuration statements in a <configuration-text> element.

To load configuration data as Junos OS configuration mode commands, the application includes the action="set" and format="text" attributes in the opening <load-configuration> tag. The application encloses the configuration mode commands in a <configuration-set> element.

To load configuration data using JSON format, the application includes the format="json" attribute in the opening <load-configuration> tag. The application encloses the JSON data in a <configuration-json> element.

For information about the syntax for Junos XML elements, formatted ASCII text, configuration mode commands, and JSON format, see Define the Format of Configuration Data to Upload in a Junos XML Protocol Session.