hardMultiple ChoiceObjective-mapped
200-901 Practice Question: Refer to the exhibit
Exhibit
from ncclient import manager
import xml.dom.minidom
with manager.connect(host='192.168.1.1', port=830, username='admin', password='cisco', hostkey_verify=False) as m:
c = m.get_config(source='running')
print(xml.dom.minidom.parseString(c.xml).toprettyxml())Refer to the exhibit. A developer executes this Python script against a Cisco device. Assuming valid credentials and network connectivity, what is printed to the console?
⚠ Common exam trap
Cisco often tests the distinction between `running` and `startup` configurations in NETCONF, and candidates may confuse `get_config` with `get` (which retrieves state data) or assume the output format is JSON due to common RESTCONF usage.
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
✓
The running configuration of the device in XML format
The script uses the `ncclient` library to connect to a Cisco device via NETCONF, which defaults to retrieving the running configuration. The `get_config(source='running')` method fetches the running configuration in XML format, so the output printed to the console is the running configuration in XML. Option C is correct because the code explicitly requests the running configuration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
An exception due to invalid credentials
Why it's wrong here
The problem states valid credentials are assumed, so no exception occurs.
- ✗
The startup configuration of the device in XML format
Why it's wrong here
The source parameter is 'running', so it retrieves the running config, not startup.
- ✓
The running configuration of the device in XML format
Why this is correct
The script calls m.get_config(source='running') which returns the running config as XML, then prints it prettified.
- ✗
A JSON representation of the device interfaces
Why it's wrong here
The output is XML because NETCONF uses XML and the script prints XML; no JSON conversion is done.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 200-901 question from scratch — 989 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.