Courseiva

JNCIA-DevOps · domain

NETCONF And XML API

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.

44 questions18 easy10 medium16 hard

Focused practice

Practice NETCONF And XML API questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about NETCONF And XML API

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.

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

Watch out for

Common NETCONF And XML API exam traps

  • ▸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

Question index

All NETCONF And XML API questions (44)

Click any question to see the full explanation, or start a practice session above.

1

You need to lock the candidate configuration datastore in your NETCONF script to prevent concurrent modifications by other administrators. Which XML element accomplishes this?

Medium
2

You 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?

Medium
3

Which TWO methods can an administrator use to verify that a Python script successfully established a NETCONF session with a Junos device? (Choose two)

Easy
4

Which Junos configuration statement enables the NETCONF service over SSH for remote automation clients?

Easy
5

When executing a NETCONF <get-config> request, you specify <source><candidate/></source> but omit any filtering tags. What is returned in the <rpc-reply>?

Hard
6

An 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?

Hard
7

An 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?

Medium
8

An engineer executes a NETCONF <discard-changes> RPC. What is the precise effect of this operation on the Junos device?

Hard
9

An 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?

Easy
10

A 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?

Easy
11

An 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?

Hard
12

Which TWO statements are true regarding NETCONF locking mechanisms on Junos devices? (Choose two)

Medium
13

An 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?

Hard
14

Which python module is part of the standard library that can be used to parse XML responses returned by NETCONF?

Easy
15

A 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?

Easy
16

Which TWO actions occur during the initial NETCONF session establishment phase between a client and a Junos device? (Choose two)

Easy
17

Which THREE attributes are available within the <edit-config> operation element in NETCONF to specify the modification action on a target node? (Choose three)

Hard
18

You 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?

Medium
19

An 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?

Medium
20

Which 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)

Hard
21

Which TWO benefits does NETCONF provide over traditional screen-scraping CLI automation? (Choose two)

Easy
22

Which THREE error-type values are defined in the NETCONF protocol specification (RFC 6241) for categorizing <rpc-error> messages? (Choose three)

Hard
23

An 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?

Medium
24

What is the standard IETF RFC that defines the core NETCONF protocol architecture and operations?

Easy
25

An 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?

Hard
26

What is the purpose of the <hello> element exchanged immediately after establishing a NETCONF SSH session?

Easy
27

Which THREE distinct operational states or configuration views can be queried using specific Junos XML API RPCs? (Choose three)

Hard
28

Which transport protocol is mandated by RFC 6241 as the standard secure connection mechanism for NETCONF when operating in typical Junos enterprise automation environments?

Easy
29

You are writing a script that parses NETCONF responses from Junos. You encounter an element named <ok/> inside an <rpc-reply>. What does this indicate?

Medium
30

An 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?

Hard
31

What is the role of the <rpc> element in a NETCONF message exchange?

Easy
32

While 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?

Hard
33

An 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?

Medium
34

A 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?

Hard
35

When using NETCONF to edit a Junos configuration, you include the attribute operation="create" on an existing configuration leaf. What behavior does the device exhibit?

Hard
36

An 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?

Hard
37

Which tool or library is commonly used in Python to simplify interacting with Junos NETCONF APIs by abstracting low-level XML handling?

Easy
38

Which NETCONF RPC tag is used to gracefully terminate an active NETCONF session with a Junos device?

Easy
39

Which XML tag encapsulates the entire response returned by a Junos device in reply to a valid NETCONF RPC request?

Easy
40

An 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?

Hard
41

You send an edit-config RPC with an invalid XML tag name. What is the standard structure of the error returned in the <rpc-reply>?

Medium
42

Which TWO statements are true regarding the NETCONF protocol hello message exchange? (Choose two.)

Easy
43

When establishing a NETCONF session over SSH, which standard capability announcement is exchanged during the initial hello message phase?

Easy
44

An 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?

Easy

Frequently asked questions

What does the NETCONF And XML API domain cover on the JNCIA-DevOps exam?
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.
How many questions are in this domain?
This page lists all 44 NETCONF And XML API questions in the JNCIA-DevOps question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only NETCONF And XML API questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
Juniper Networks Automation and DevOps, Associate (JNCIA-DevOps, JN0-224) (JNCIA-DevOps) NETCONF And XML API Practice Questions