Cisco DNA Center SDK get_device_list() Functionality
Short answer
A Retrieves device list from Catalyst Center
Question
Key Takeaways
The dnacentersdk get_device_list() function retrieves the inventory of all managed devices from Catalyst Center. It is a read-only operation used for discovery and validation, distinct from configuration, deletion, or reboot actions.
Expert Analysis
get_device_list returns all managed devices.
The Cisco DNA Center SDK (dnacentersdk) is a Python library designed to simplify programmatic interactions with Cisco Catalyst Center (formerly Cisco DNA Center). When automating network operations, it is critical to understand the distinction between data retrieval functions and configuration or management actions. The method get_device_list is specifically engineered for read-only operations within the device inventory management scope.
Option A is correct because the function queries the Catalyst Center API endpoint responsible for listing managed network devices. In the context of network automation workflows, retrieving this list is often the first step in provisioning, compliance checking, or telemetry collection. The SDK abstracts the underlying REST API calls, returning a structured object containing details such as device IDs, names, IP addresses, and current status. This aligns directly with the reference explanation that states it "returns all managed devices."
Option B is incorrect because configuring devices involves write operations. In the Cisco DNA Center ecosystem, configuration changes are typically handled through templates, policy definitions, or specific configuration tasks initiated via methods like create_task or by pushing configurations through Ansible playbooks. The get_device_list method does not have the capability to modify running configurations on network devices; it only retrieves metadata about them.
Option C is incorrect for similar reasons. Deleting a device from the network inventory is a destructive administrative action. While the SDK may provide endpoints to remove a device from management (often requiring a specific task ID or deletion request), get_device_list is strictly a retrieval mechanism. It cannot delete entities. Attempting to use it for deletion would result in an error or no operation, depending on how the SDK handles unsupported actions on read-only endpoints.
Option D is incorrect because rebooting a device is a runtime management action. Reboots are triggered through specific device control APIs or via CLI commands executed over SSH/NETCONF. The dnacentersdk might offer methods to initiate a reboot task, but get_device_list does not interact with the device's operational state in terms of power cycling. It only provides static or near-static inventory information.
Understanding this separation of concerns—read vs. write—is vital for writing robust automation scripts. Confusing inventory retrieval with configuration execution can lead to failed deployments or unintended side effects. The Cisco DNA Center architecture separates the intent-based networking controller (which manages policies and templates) from the actual device state. The SDK acts as a bridge, and get_device_list is the standard interface for discovering what devices are currently under management. This allows engineers to iterate over devices, check their health scores, or verify connectivity before proceeding with any configuration changes. Therefore, recognizing get_device_list as a discovery tool is fundamental to mastering Day 1 and Day N automation tasks using the Cisco DNA Center API.
Official Reference
https://developer.cisco.com/docs/dna-center/
This link opens the official vendor documentation in a new tab.
Exam Strategy
When working with network automation SDKs, always distinguish between read-only inventory methods and write-enabled configuration methods. For Cisco DNA Center, identify whether a method starts with 'get' (read) or implies an action like 'create', 'delete', or 'push'. Focus on the API documentation to map SDK methods to their underlying REST endpoints, ensuring you do not attempt configuration changes through discovery endpoints.
Related Analysis
Practice All 300-435 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-435 Practice Test →