Related Documentation
<edit-config>
Usage
<rpc>
<edit-config>
<target>
<candidate/>
</target>
<!-- EITHER -->
<config>
<configuration>
<!-- tag elements representing the data to incorporate -->
</configuration>
</config>
<!-- OR -->
<config-text>
<configuration-text>
<!-- tag elements inline configuration data in text format -->
</configuration-text>
</config-text>
<!-- OR -->
<url format=“(xml | text)">
<!-- location specifier for file containing data -->
</url>
<default-operation>(merge | none | replace)</default-operation>
<error-option>(ignore-error | stop-on-error)</error-option>
<test-option>(set | test-then-set)</test-option>
<edit-config>
</rpc>
]]>]]>
Description
Request that the NETCONF server incorporate configuration data into the candidate configuration. Provide the data in one of three ways:
- Include the <config> tag element to provide a data stream of Junos XML configuration tag elements to incorporate. The tag elements are enclosed in the <configuration> tag element.
- Include the <config-text> tag element to provide a data stream of CLI configuration statements to incorporate. The configuration statements are enclosed in the <configuration-text> tag element.
- Include the <url> tag element to specify the location of a file that contains the Junos XML configuration tag elements to incorporate.
<config> | — | Encloses the <configuration> tag element. |
<configuration> | — | Encloses the configuration data written in Junos XML. This configuration data will be incorporated into the candidate configuration and provided as a data stream. For information about the syntax for representing the elements to create, delete, or modify, see Mapping Configuration Statements to Junos XML Tag Elements. |
<config-text> | — | Encloses the <configuration-text> tag element. |
<configuration-text> | — | Encloses the configuration data written in CLI configuration statements. This configuration data will be incorporated into the candidate configuration and provided as a data stream. |
<default-operation> | — | (Optional) Specifies how to incorporate the new configuration data into the candidate configuration, particularly when there are conflicting statements. The following are acceptable values:
|
<error-option> | — | (Optional) Specifies how the NETCONF server handles errors encountered while it incorporates the configuration data. The following are acceptable values:
|
<test-option> | — | (Optional) Specifies whether the NETCONF server validates the configuration data before incorporating it into the candidate configuration. The acceptable values defined in the NETCONF specification are set (no validation) and the default test-then-set (do not incorporate data if validation fails). Regardless of the value provided, the NETCONF server for the Junos OS performs a basic syntax check on the configuration data in the <edit-config> tag element. It performs a complete syntactic and semantic validation in response to the <validate> and <commit> tag elements, but not for the <edit-config> tag element. |
<url> | — | Specifies the full pathname of the file that contains the configuration data to load. When the configuration data is formatted as Junos XML tag elements, set the <url> format attribute to xml or omit the attribute. When the configuration data is formatted as CLI configuration statements, you set the <url> format attribute to text. For more information, see Uploading and Formatting Configuration Data in a NETCONF Session. |
The <target> tag element and its contents are explained separately.