Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Configuration Data

Direct answer

Configuration data in YANG is the writable part of a model, marked config true, such as interface descriptions and IP addresses, which NETCONF and RESTCONF can change.

When to use this

Use this when working with writable YANG data.

First 30 seconds

1. Configuration data (config true) is writable intent.

2. Stored in datastores.

3. Read with get-config or content=config.

4. Write via edit-config/RESTCONF.

5. Validate before commit.

Operational verification

config nodes → datastore → device behaviour

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
YANG 1.1 data modeling
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.

PlatformYANG 1.1 data modeling · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior. · libyang / yanglint
Key commandyanglint <model.yang> <data.json>
Scope / prerequisiteUse this when working with writable YANG data.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

3 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 Command read-back and what it shows Verify boundary

Verification for YANG → Configuration Data must distinguish state, not merely report that a command ran. With yanglint <model.yang> <data.json>, known-good means instance data validates against the exact module revision/feature/deviation set expected for the target and a bounded server-side validate/read-back accepts the same intended configuration; known-broken/suspicious means module import/revision mismatch, schema constraint errors, unresolved references or offline-valid data rejected by the target because capabilities/model set differ. yanglint <module.yang> <data-file> shows instance-data conformance to the locally supplied YANG schema set, but it does not show target device capabilities, datastore locks or successful application.

Step 2 Common mistakes Narrow the fault
  • Writing to config data that is not supported by the device.
Step 3 Observation-driven branch and next-check logic Narrow the fault

When YANG → Configuration Data fails, reproduce the smallest original case and capture yanglint <model.yang> <data.json> before mutation. Use the observation to choose the next check: if module/schema cannot load, fix revision/import path first; if data violates type/must/reference rules, correct instance semantics; if offline validation passes but server rejects, compare advertised modules/features/deviations and datastore operation semantics.

Key points
  • config true nodes are writable.
  • NETCONF and RESTCONF can change them.
  • They persist in datastores.
Key checks
  • config true nodes — configuration
  • get-config / GET ?content=config — read config
  • edit-config / PUT/PATCH — write config
ReferenceHow it works1 section · depth on demand

How it works

YANG → Configuration Data should be reasoned about as a state pipeline, not as one command outcome. The responsible state is YANG module/schema set, instance-data encoding, datastore context and leaf/list constraints that determine whether configuration data conforms to the intended network data model. YANG-based validation loads the relevant module revisions and evaluates instance data against schema structure, types, must/when constraints and references before it is sent through NETCONF/RESTCONF; meanwhile module feature flags, deviations, vendor augmentations, datastore state and server capabilities are separate things to check. This distinction is especially important because syntactically valid XML/JSON can violate the YANG model, while data that validates against one module revision may be rejected by a device advertising another revision/deviation set.

ReferenceImportant terms & boundaries1 section · depth on demand

Method

YANG configuration data is the config true part of a model — settings you can write — as opposed to config false operational state. Working with it reliably follows a fixed method.

1. Find the configuration path in the model tree (pyang -f tree, YANG Suite).

2. Read the current value with <get-config> or RESTCONF GET (?content=config).

3. Build the payload with the exact namespace, keys and types.

4. Choose the operation: merge, replace or delete (nc:operation / PATCH vs PUT).

5. Apply to candidate or running, validate, commit.

6. Read back and compare with the intended data.

MistakeEffect
PUT/replace on a parent containerRemoves siblings not in payload
Wrong namespace prefixunknown-element
Writing a config false nodeRejected
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 docYANG 1.1 data modeling current

Authoritative/upstream documentation reviewed for bounded claims in YANG > Configuration Data. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc7950 · confidence 94%
Confirmation

Confirm action

Continue?