200-901 Cisco Platforms and Development Practice Question
A developer is writing a Python script to interact with a Cisco IOS XE device using the NETCONF protocol. The script uses the ncclient library to establish a connection and retrieve the running configuration. Which method should the developer use to retrieve the configuration?
⚠ Common exam trap
Candidates often confuse get_config with get; the former retrieves configuration, while the latter retrieves state data.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
manager.get_config(source='running')
The ncclient library provides the get_config method to retrieve configuration from a NETCONF server. The source parameter specifies the datastore, such as 'running' for the running configuration. The get method is for state data, edit_config is for modifying configuration, and dispatch is for custom RPCs. Therefore, the correct method is manager.get_config(source='running').
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
manager.edit_config(target='running')
Why it's wrong here
The edit_config method is used to modify configuration, not retrieve it. It requires a target datastore and a configuration snippet. Using it to retrieve configuration would not work and could inadvertently change the configuration if misused. The correct method for retrieval is get_config.
- ✗
manager.get(filter=('subtree', 'running'))
Why it's wrong here
The get method is used to retrieve state data and operational data, not configuration. The filter parameter is for filtering the data, not for specifying the datastore. Using 'running' as a filter would not retrieve the running configuration. The correct method for configuration is get_config with the source parameter.
- ✗
manager.dispatch(rpc='get-config')
Why it's wrong here
The dispatch method is used to send custom RPCs, but it requires a properly formatted RPC XML element, not a string like 'get-config'. While get-config is the underlying NETCONF operation, using dispatch with an incorrect argument would fail. The ncclient library provides a dedicated get_config method that is easier and correct.
- ✓
manager.get_config(source='running')
Why this is correct
In ncclient, the get_config method retrieves configuration data from a specified datastore. Using source='running' fetches the running configuration. This is the correct method for retrieving configuration via NETCONF. The method returns a response object containing the configuration in XML format, which can then be parsed.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.