Network automation and programmability fundamentals
What the domain tests
Network automation and programmability fundamentals covers the data formats, API styles, and model-driven interfaces that make network devices programmable. DevNet Professional candidates must distinguish device-level APIs from controller APIs and know when a model-driven workflow is declarative rather than a scripted sequence of CLI commands.
Core rules
- Encodings: JSON is common for RESTCONF, XML for NETCONF, YAML for Ansible playbooks, and protobuf for gNMI. The encoding is not the protocol; RESTCONF can return XML and NETCONF does not use JSON.
- API styles: REST exposes resources addressed by URIs and uses HTTP verbs (
GET,POST,PUT,PATCH,DELETE). RPC-style APIs use one endpoint and put the operation in the payload. RESTCONF is REST-like; NETCONF is RPC over SSH. - YANG: a schema, not data. It defines a tree with containers, lists, leaves, types, keys, and constraints. A list key becomes part of the RESTCONF URL, e.g.
interface=GigabitEthernet1. - Datastores: NETCONF has running, candidate, and startup. Editing candidate usually requires
<commit>; RESTCONF writes directly to running unless the implementation exposes a datastore. - Declarative intent: you send the desired state and the platform computes changes. Idempotency means repeating the same request produces no additional change.
Worked example
A device exposes ietf-interfaces. To read one interface, send GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1 with Accept: application/yang-data+json. The response nests the list entry under ietf-interfaces:interface. To set a description, send PATCH to the same URI with a body containing the module-qualified interface object. PATCH merges the supplied leaves; PUT replaces the target resource, so omitted leaves may be reset. If you used NETCONF, the equivalent is <edit-config> targeting running with a merge operation. The reasoning: the URI is derived from YANG list keys, and the HTTP method determines merge-versus-replace semantics.
Traps
Assuming NETCONF carries JSON; omitting the YANG module prefix; using PUT when you mean a partial update; forgetting that RESTCONF media types include application/yang-data+json; treating a YANG model file as a data instance; and expecting a candidate-datastore commit in a RESTCONF call that writes running directly.