<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>
<!-- 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 statemetnts 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 and Changing Individual Configuration 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. For information about the CLI configuration statements, see the Junos CLI User Guide.
<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:
- merge—Combines the new configuration data with the candidate configuration according to the rules defined in Setting the Edit Configuration Mode. This is the default mode if the <default-operation> tag element is omitted. It applies to all elements in the new data that do not have the operation attribute in their opening container tag to specify a different mode (for information about the operation attribute, see Changing Individual Configuration Elements).
- none—Retains each configuration element in the existing candidate configuration unless the new data includes a corresponding element that has the operation attribute in its opening container tag to specify an incorporation mode. This mode prevents the NETCONF server from creating parent hierarchy levels for an element that is being deleted. For more information, see Deleting Configuration Elements.
- replace—Discards the existing candidate configuration and replaces it with the new data. For more information, see Using <edit-config>.
<error-option>—(Optional) Specifies how the NETCONF server handles errors encountered while it incorporates the configuration data. The following are acceptable values:
- ignore-error—Specifies that the NETCONF server continue to incorporate the new configuration data even if it encounters an error.
- stop-on-error—Specifies that the NETCONF server stop incorporating the new configuration data when it encounters an error. This is the default behavior if the <error-option> tag element is omitted.
<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. The file must reside on the routing platform’s local disk. For more information, see Referencing Configuration Data Files.
The <target> tag element and its contents are explained separately.
Usage Guidelines
See Changing Configuration Information.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1