Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

edit-config

Direct answer

edit-config changes a datastore with an XML payload, using operations like merge, replace, create, delete and remove on specific nodes of the YANG data tree.

When to use this

Use this when changing configuration via edit-config.

First 30 seconds

1. edit-config changes configuration.

2. Operations: merge (default), replace, create, delete, remove.

3. error-option rollback-on-error when supported.

4. Validate payloads against YANG.

5. Prefer candidate datastore.

Operational verification

payload + operation → datastore

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
NETCONF / YANG datastore automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNETCONF / YANG datastore automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when changing configuration via edit-config.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

The negative fixture should deliberately exercise risks such as capability mismatch, namespace drift, wrong datastore, lock contention, partial edit semantics and assuming <ok/> shows final device behavior, choosing the cases most relevant to target datastore, default-operation/test-option/error-option capability, edit operation attributes and verifying exact affected subtree.

Step 2 Common mistakes Narrow the fault
  • Using replace at a high level and deleting siblings.
  • Not reading back after the edit.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Operations: merge, replace, create, delete.
  • Payload must follow YANG.
  • Target datastore matters.
Key checks
  • <edit-config> with operation=merge/replace/create/delete — semantics
  • default-operation setting — behaviour
  • test-option/error-option — validation and rollback
ReferenceWhy it matters1 section · depth on demand

What it is

<edit-config> changes a datastore with operations merge (default), replace, create, delete and remove.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

<edit-config> changes configuration in a target datastore. The operation attribute on elements controls how the change is applied, which is the key to writing safe NETCONF changes.

OperationEffect
merge (default)Combine with existing configuration
replaceReplace the element and its children
createCreate; error if it exists
deleteDelete; error if it does not exist
removeDelete if present; no error if absent
<edit-config>
  <target><candidate/></target>
  <config>
    <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
        <name>GigabitEthernet2</name>
        <description>Uplink to core</description>
      </interface>
    </interfaces>
  </config>
</edit-config>

A misplaced replace high in the tree can wipe large parts of the configuration; scope it to the exact element.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNETCONF / YANG datastore automation current

Authoritative/upstream documentation reviewed for bounded claims in NETCONF > edit-config. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc6241 · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For target datastore, default-operation/test-option/error-option capability, edit operation attributes and verifying exact affected subtree, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?