Be able to open a NETCONF session to Junos, read the hello capabilities, lock the candidate datastore, push an XML configuration edit, and parse the XML reply in Python. The key detail is targeting the correct datastore and locking it before changes.
Start practicing
NETCONF And XML API — choose a session length
Free · No account required
Domain overview
This domain covers programmatic configuration and monitoring of Junos devices using NETCONF and the Junos XML API over SSH. It tests the hello/capability exchange, datastore operations such as locking and candidate configuration edits, and Python tooling for building and parsing these XML RPCs, including standard-library XML handling.
Exam objectives
Using PyEZ and ncclient to abstract Junos NETCONF XML RPC handling in Python scripts
Locking the candidate datastore with the <lock> element before making configuration changes
Exchanging <hello> messages and capability announcements when a NETCONF session starts over SSH
Parsing NETCONF XML replies with Python's standard xml.etree.ElementTree module
Assuming a NETCONF session can edit the candidate configuration without first locking it, causing commit or lock failures
Confusing the <lock> and <edit-config> operations, or omitting the target datastore element inside the RPC
Trying to parse XML replies with string splitting or regex instead of a real XML parser like ElementTree
Click any question to see the full explanation and answer options, or start a focused practice session above.
Which NETCONF RPC tag is used to gracefully terminate an active NETCONF session with a Junos device?
2While executing a NETCONF edit-config operation, you want to ensure that any syntax errors or invalid statements immediately cause the device to roll back the entire transaction without applying partial changes. Which parameter achieves this?
3Which XML tag encapsulates the entire response returned by a Junos device in reply to a valid NETCONF RPC request?
4You need to lock the candidate configuration datastore in your NETCONF script to prevent concurrent modifications by other administrators. Which XML element accomplishes this?
5You are writing a Python script to retrieve the operational state of interfaces from a Junos device using NETCONF. Which XML RPC element must be enclosed within the <rpc> tag to request operational data?
6An administrator issues an edit-config RPC with default-operation="replace" targeting the candidate datastore. What is the impact on the existing configuration on the Junos device?
7An engineer needs to establish a NETCONF session with a Junos device securely. Which underlying transport protocol does NETCONF use by default according to RFC 6242?
8An engineer executes a NETCONF <discard-changes> RPC. What is the precise effect of this operation on the Junos device?
9An automation script attempts to load a configuration snippet using NETCONF <edit-config> with operation="delete" on a container statement. What happens if the specified container does not currently exist in the candidate configuration?
10When establishing a NETCONF session over SSH, which standard capability announcement is exchanged during the initial hello message phase?
11When executing a NETCONF <get-config> request, you specify <source><candidate/></source> but omit any filtering tags. What is returned in the <rpc-reply>?
12Which tool or library is commonly used in Python to simplify interacting with Junos NETCONF APIs by abstracting low-level XML handling?
13You need to load a set of configuration changes into the Junos candidate datastore from an inline XML string using NETCONF. Which RPC element is used to load configuration data?
14An automation script performs a NETCONF transaction that triggers an alarm. You want to retrieve current system alarms using the Junos XML API. Which RPC tag represents this request?
15What is the purpose of the <hello> element exchanged immediately after establishing a NETCONF SSH session?
16An automation script executes a NETCONF <get-config> query with a specific subtree filter for interface statistics. However, the response contains configuration data instead of operational statistics. Why did this occur?
17You send an edit-config RPC with an invalid XML tag name. What is the standard structure of the error returned in the <rpc-reply>?
18What is the role of the <rpc> element in a NETCONF message exchange?
19Which Junos configuration statement enables the NETCONF service over SSH for remote automation clients?
20When using NETCONF to edit a Junos configuration, you include the attribute operation="create" on an existing configuration leaf. What behavior does the device exhibit?
21An automation script attempts to unlock a candidate configuration datastore that was previously locked by a different NETCONF session. Which RPC is required to force-terminate that session and release the lock?
22You are writing a script that parses NETCONF responses from Junos. You encounter an element named <ok/> inside an <rpc-reply>. What does this indicate?
23What is the standard IETF RFC that defines the core NETCONF protocol architecture and operations?
24An engineer applies a configuration change using NETCONF with <edit-config> and specifies default-operation="replace" at the top level, but includes an element with operation="merge". How does Junos evaluate this?
25Which python module is part of the standard library that can be used to parse XML responses returned by NETCONF?
26Which TWO actions occur during the initial NETCONF session establishment phase between a client and a Junos device? (Choose two)
27Which THREE error-type values are defined in the NETCONF protocol specification (RFC 6241) for categorizing <rpc-error> messages? (Choose three)
28Which THREE distinct operational states or configuration views can be queried using specific Junos XML API RPCs? (Choose three)
29Which TWO statements are true regarding NETCONF locking mechanisms on Junos devices? (Choose two)
30Which THREE error-tag values defined in NETCONF RFC 6241 may be returned by a Junos device when an edit-config operation fails validation? (Choose three)
31Which TWO benefits does NETCONF provide over traditional screen-scraping CLI automation? (Choose two)
32Which TWO methods can an administrator use to verify that a Python script successfully established a NETCONF session with a Junos device? (Choose two)
33A network engineer is establishing a NETCONF session with a Junos device and needs to lock the candidate configuration to prevent concurrent modifications by other administrators. Which NETCONF operation should be executed?
34Which THREE attributes are available within the <edit-config> operation element in NETCONF to specify the modification action on a target node? (Choose three)
35Which transport protocol is mandated by RFC 6241 as the standard secure connection mechanism for NETCONF when operating in typical Junos enterprise automation environments?
36An engineer writes a Python script using ncclient to push changes to a Junos device. After sending the configuration via <edit-config>, the script needs to make the changes active without dropping the NETCONF session lock prematurely or requiring a separate explicit commit RPC if candidate workflows are bypassed. However, using standard candidate datastore workflow, what is the exact RPC required to activate the candidate configuration?
37Which TWO statements are true regarding the NETCONF protocol hello message exchange? (Choose two.)
38A network automation engineer is establishing a NETCONF session with a Junos device. After the SSH connection is established, the device and the client exchange <hello> messages. What is the primary purpose of this exchange?
39An automation engineer is writing a Python script that uses the ncclient library to connect to a Junos device via NETCONF. The engineer wants to retrieve the entire candidate configuration from the device. Which NETCONF operation should be used?
40An automation script uses the Junos XML API to retrieve interface statistics every 5 minutes. The script uses the <get-interface-information> RPC with the <interface-name> filter for a specific interface. After several successful runs, the script suddenly receives an empty <interface-information> element. What is the most likely cause?
41An automation engineer is using the Junos XML API over SSH to load a configuration snippet into the candidate datastore. The engineer wants to ensure that the configuration is merged with the existing candidate configuration. Which RPC and attribute should be used?
42An automation engineer is using the Junos XML API over NETCONF to load a configuration change into the candidate datastore. The engineer wants to ensure that the change is committed automatically only if the candidate configuration passes a validation check. Which NETCONF operation should the engineer use to validate the candidate configuration before committing?
43A network automation engineer is using the Junos XML API over NETCONF to make configuration changes. The engineer wants to ensure that if the commit fails, the candidate configuration is automatically rolled back to its previous state without manual intervention. Which NETCONF operation should the engineer use to achieve this?
44An automation engineer is using the Junos XML API to retrieve operational data from a device. The engineer wants to ensure that the response is well-formed XML and includes the Junos namespace so that it can be parsed correctly. Which XML namespace should the engineer expect in the response for Junos-specific operational tags?
Be able to open a NETCONF session to Junos, read the hello capabilities, lock the candidate datastore, push an XML configuration edit, and parse the XML reply in Python. The key detail is targeting the correct datastore and locking it before changes.
The Courseiva JNCIA-DevOps question bank contains 44 questions in the NETCONF And XML API domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the NETCONF And XML API domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included