Infrastructure and Automation · Topic 1 of 8
Model Driven Programmability and Management Levels
Understand why model driven programmability helps automation, and compare controller level management with device level management and their trade offs.
- 5 min
- Includes a diagram
- Model driven programmability uses formal data models, so data is structured and validated.
- It avoids screen scraping, which breaks when CLI output changes.
- Device level management configures each device directly.
What it is
Model driven programmability uses a formal data model to describe a device, and controller level and device level management are two places where you can apply it.
A data model gives every setting a defined name, type and place. Automation tools can then read and write those settings in a predictable way, without scraping CLI text.
Device level management talks to each box separately. Controller level management talks to one system that manages many boxes.
How it works
The model makes the data consistent, and the management level decides how far one call reaches.
The value of model driven programmability
- Structured data. Replies are JSON or XML with named fields, so a script reads a value by its key and not by its position in screen text.
- Consistency. The same model works across tools, languages and, with standard models, across vendors.
- Validation. The model defines types and ranges, so a bad value is rejected before it changes the device.
- Transactions. NETCONF can apply a change as a whole or not at all, and roll it back.
- Separation of configuration and state. The model marks what you can change and what is read only.
- Telemetry. Models also describe operational data that a device can stream out.
CLI scripting still works. Its weakness is that output formats change between releases, so the script that parsed text yesterday may break today.
Device level management
In device level management, your tool connects to each device and configures it directly, using the CLI over SSH, SNMP, NETCONF, RESTCONF or a vendor API.
| Strengths | Weaknesses |
|---|---|
| Full access to every device feature | One connection and one change per device |
| No extra controller is needed | You must keep an inventory and handle each login |
| Works on any device that supports the interface | No central view of intent or compliance |
| Good for a small network or a special task | The work grows with the number of devices |
Tools such as Ansible, ncclient and plain Python scripts often work at this level.
Controller level management
In controller level management, you tell a central controller what you want, and it configures the devices. Cisco examples are Catalyst Center, Meraki, ACI and the SD-WAN manager.
| Strengths | Weaknesses |
|---|---|
| One API for many devices | A cost for the controller, and a skill to run it |
| Policy based and intent based configuration | The controller may not expose every device feature |
| Central inventory, health and compliance view | The controller becomes a key dependency |
| Consistent change at scale | You depend on the controller's release schedule |
The same task at both levels
Suppose you must create a VLAN on 50 switches.
At device level, a script loops over 50 addresses, logs in to each, and sends the change. At controller level, you send one call or define one template, and the controller applies it to the group.
# device level: one call per switch
for switch in SWITCHES:
push_vlan(switch, vlan_id=110, name="CAMERAS")
# controller level: one call to the controller
requests.post(CONTROLLER_URL + "/templates/deploy", json=payload)
The second call is illustrative. Every controller defines its own path and body, so check its documentation.
Mixing the two
Many networks use both. The controller handles day to day work, and device level access remains for troubleshooting, for features the controller does not cover, and for devices that it does not manage.
A caution applies here. A manual change on a device that a controller manages may be overwritten by the controller, or may make the device drift from the intended state. Decide which level owns each setting.
Model driven at both levels
Models help at both levels. At device level, YANG backed NETCONF and RESTCONF give structured access to a box. At controller level, the controller often uses its own models behind its REST API, and NSO uses YANG for both devices and services.
When a scenario says many devices, one policy and one consistent change, think controller. When it says one device or a feature the controller lacks, think device level.
What to remember for the exam
Six facts cover this topic.
- Model driven programmability uses formal data models, so data is structured and validated.
- It avoids screen scraping, which breaks when CLI output changes.
- Device level management configures each device directly.
- Controller level management uses one system and one API to manage many devices.
- Controllers scale well and give policy and a central view, but may not expose every feature.
- Pick one level to own each setting, to avoid drift.
Common mistakes
Four mistakes are typical.
Saying a controller removes the need for device access. Engineers still use the device for troubleshooting.
Thinking models only matter for NETCONF. Controllers and tools use models too.
Changing a managed device by hand. The controller can overwrite the change or report drift.
Choosing device level for a very large network. The effort grows with every device.
Test any bulk change on one device or a lab first. At scale, a mistake reaches every device at once.
Check yourself
Work through these three questions.
Why is model driven programmability better than parsing CLI text?
A model gives structured, typed data with named fields, so scripts do not break when CLI output changes.
What is the main benefit of controller level management?
One system and one API manage many devices, so a change is applied consistently at scale.
Why can a manual change on a controller managed device cause trouble?
The controller may overwrite it, or the device may drift from the intended state.
Topic 1 of 8 in Infrastructure and Automation
Test yourself on Infrastructure and Automation
The full Cisco CCNA 200-901 DEVASC question bank has 808 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.