Courseiva

JNCIA-DevOps · domain

troubleshooting

Practise Juniper Networks Automation and DevOps, Associate (JNCIA-DevOps, JN0-224) (JNCIA-DevOps) troubleshooting practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

273 questions83 easy102 medium88 hard

Focused practice

Practice troubleshooting 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 troubleshooting

troubleshooting questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common troubleshooting exam traps

  • ▸Answering from memory before reading the full scenario.
  • ▸Missing a constraint such as cost, availability, security, scope or command context.
  • ▸Choosing a broad answer when the question asks for the most specific fix.
  • ▸Ignoring why the wrong options are tempting.

Question index

All troubleshooting questions (273)

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

1

In a Jinja2 template designed for Junos configuration, how do you correctly output the value of a variable named 'hostname'?

Medium
2

Which PyEZ utility module should you import if you need to upgrade the Junos operating system on a remote device via a Python script?

Easy
3

Your CI/CD pipeline includes a linters step before deployment. Why is running a linter against YAML or Jinja2 template files critical in a Junos automation workflow?

Medium
4

An engineer needs to convert an existing YAML-formatted inventory file into JSON format using a Python script. Which workflow accomplishes this transformation?

Medium
5

You are developing a PyEZ script that loads a configuration snippet onto a Junos device. You want to ensure the configuration is merged with the existing candidate configuration and then committed. Which sequence of PyEZ methods should you use?

Hard
6

An engineer is troubleshooting a script that updates Junos configuration via the REST API. The payload is sent as JSON, but the device returns a 415 Unsupported Media Type error. What is the root cause?

Hard
7

You are writing a Python automation tool that reads telemetry data from a Junos device. The data is received as a JSON string containing forward slashes escaped as '\/'. When you load this string using json.loads(), how does Python handle the escaped slashes?

Hard
8

When troubleshooting REST API authentication and authorization on Junos devices, which THREE log files or diagnostic tools can an administrator inspect? (Choose three)

Hard
9

Which TWO statements are true regarding PyEZ Table and View definitions? (Choose two)

Medium
10

Which THREE mechanisms are valid methods for authenticating and establishing a NETCONF session with a Junos device? (Choose three)

Medium
11

Which THREE advanced features or methods are available on a PyEZ Device instance for session management and inspection? (Choose three)

Hard
12

In the context of network DevOps, what is the purpose of implementing idempotency in automation scripts or playbooks targeting Junos devices?

Medium
13

When using PyEZ to push a configuration, you want to log out all NETCONF XML traffic exchanged between the script and the Junos device for debugging purposes. How do you enable this logging in Python?

Hard
14

An engineer needs to execute a custom Junos RPC (such as 'get-route-information') using the REST API. Which HTTP method and general URI structure should be used?

Medium
15

What is JSNAPy primarily used for in Junos network automation?

Easy
16

Which TWO advantages does structured telemetry and data streaming offer over traditional SNMP polling in Junos automation? (Choose two)

Easy
17

An automation engineer wants to log structured data from a Junos device automation run. The Python script formats a dictionary into a JSON string and prints it. However, the engineer wants all keys sorted alphabetically to ensure consistent log diffing. Which parameter accomplishes this in json.dumps()?

Medium
18

An enterprise network is adopting a CI/CD pipeline for Junos network changes using GitLab CI. A developer wants to ensure that a test job automatically runs whenever a merge request is opened against the main branch. In which configuration file must this pipeline behavior be defined, and what is the primary keyword used to control branch execution?

Hard
19

An automation engineer writes a Python script that reads a Junos configuration exported as JSON and uses json.loads to parse it. The script then searches for a key named "interfaces". The JSON document contains two objects at the same nesting level, each with an "interfaces" key, because the configuration was merged from two sources. What will json.loads produce, and how should the script handle it?

Hard
20

What Jinja2 feature allows you to include the contents of another template file into your main configuration template?

Easy
21

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
22

When writing a Python script to interact with a Junos device via PyEZ, you receive an object representing RPC output. You want to serialize a custom Python class instance containing device metadata into JSON, but calling json.dumps() raises a TypeError. What is the standard approach to resolve this?

Hard
23

An automation script attempts to connect to the Junos REST API via HTTPS, but the Python script throws an SSL certificate verification error. What is the most appropriate way to resolve this in a development environment while maintaining security best practices?

Medium
24

Which of the following primitive data types is NOT supported natively in JSON?

Easy
25

In a Git repository managing Junos configurations, which TWO files or directories are typically added to the '.gitignore' file to prevent sensitive or temporary files from being tracked? (Choose two)

Hard
26

An automation script needs to compare pre- and post-change states on a Junos device using JSNAPy (Junos Snapshot Administrator). Which configuration file format is used by JSNAPy to define snapshot checks and test assertions?

Medium
27

Which Jinja2 construct is used to define reusable blocks of template code that can be called with arguments like a function?

Easy
28

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
29

An engineer is comparing how NETCONF and the Junos REST API handle candidate configuration validation. In NETCONF, the client can issue a <validate> RPC. How is configuration validation typically handled in the Junos REST API workflow?

Hard
30

An automation engineer is designing a data model for Junos device inventory that will be serialized to JSON and consumed by multiple tools. The engineer wants to include a null value, a boolean, and a string that contains a colon and a space. Which TWO statements correctly describe JSON serialization rules that apply to this model? (Choose two.)

Hard
31

A DevOps engineer is building a pipeline that uses Junos PyEZ to retrieve operational data from a fleet of Junos devices. The engineer wants to understand which transport protocol PyEZ uses by default and why this matters for firewall rules. Which statement is correct?

Medium
32

An automation scripter needs to load a YAML configuration file in Python. To prevent arbitrary code execution vulnerabilities associated with untrusted files, which function should always be called?

Medium
33

An automation team is designing a script that uses the Junos REST API to manage configurations on a fleet of Junos devices. They need to ensure secure communication and proper error handling. Which two practices should they implement? (Choose two.)

Hard
34

Which THREE features are provided by the Junos REST API daemon (jpagent) when running on a Junos device? (Choose three)

Medium
35

An engineer is designing a Junos automation solution that requires programmatic access to retrieve operational data and configuration from devices. The solution must use a standardized, vendor-neutral protocol that supports capabilities exchange and transactions. Which protocol should be used?

Easy
36

Which TWO characters or sequences are valid in YAML for representing lists or sequences? (Choose two)

Easy
37

Which TWO benefits are provided by implementing automated CI/CD pipelines for Junos network changes? (Choose two)

Easy
38

Which TWO characteristics describe declarative network automation compared to imperative scripting? (Choose two)

Easy
39

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
40

An engineer compares NETCONF and Junos REST API when fetching operational state via RPCs. How does the REST API transmit an RPC request compared to a NETCONF <rpc> wrapper?

Hard
41

An automation engineer writes a Python script that reads a Junos configuration file serialized in JSON. The file opens successfully, but parsing fails with a JSONDecodeError due to trailing commas at the end of object lists. How does standard JSON handle trailing commas compared to YAML?

Medium
42

When converting a deeply nested JSON data structure representing Junos device health metrics into YAML using PyYAML, the output uses complex block styles that are difficult for team members to read. Which parameter in yaml.safe_dump() can force scalar values or containers to prefer flow style (JSON-like curly braces and brackets) instead?

Hard
43

A developer is writing a script that uses the Junos REST API to make configuration changes. The script needs to handle errors gracefully. After sending a load-configuration RPC, the developer receives an HTTP 400 Bad Request response with a JSON body containing an error message. What is the most likely cause of this error?

Hard
44

You are developing a Python script using Junos PyEZ to retrieve and process operational data. You need to handle exceptions that may occur during device interaction. Which two exceptions are raised by PyEZ when a connection or authentication issue occurs? (Choose two.)

Hard
45

When comparing the Junos REST API workflow to the NETCONF protocol workflow, which characteristic is unique to the REST API?

Easy
46

An automation engineer is writing a Python script to parse a Juniper Junos NETCONF reply received in XML format and needs to convert it into a JSON structure for easier manipulation in a web application. Which built-in Python module is primarily used to handle JSON data serialization and deserialization?

Easy
47

An automation engineer uses a Python script to pull interface statistics from a Junos device through the Junos PyEZ Table and View framework. The View definition must map the XML element <name> to the Python attribute interface_name. Which PyEZ View syntax correctly performs this mapping?

Medium
48

Why is it considered a best practice to store sensitive secrets (such as SNMP community strings or API tokens) outside of plaintext Jinja2 templates in a Git repository?

Medium
49

You are writing a Python script that parses a multi-document YAML stream containing Junos device site configurations. One of the documents contains a custom YAML tag. When parsing with yaml.safe_load_all(), how does the safe loader handle custom tags?

Hard
50

Which term describes the practice of continuously building, testing, and validating software or network configurations in an automated pipeline?

Easy
51

Which TWO error response categories or HTTP status codes are commonly returned by the Junos REST API when client requests are malformed or unauthorized? (Choose two)

Medium
52

An automation script reads interface names and VLAN IDs from a CSV file and converts each row into a JSON object before sending it to a Junos device REST API. Which Python module is specifically designed to parse CSV (Comma-Separated Values) files?

Medium
53

You are writing a Python automation script that reads a Junos configuration file in JSON format. The JSON file contains duplicate keys within the same object scope. According to the JSON specification RFC 8259, how should a conforming JSON parser handle duplicate keys?

Hard
54

Which TWO commands or tools are associated with running JSNAPy snapshot verifications from a CLI environment? (Choose two)

Medium
55

You are writing a script that performs multiple configuration changes inside a single PyEZ Config context. How can you verify that the candidate configuration has syntax errors before committing it?

Hard
56

When interacting with Junos devices via NETCONF, which TWO RPC operations are part of standard NETCONF protocol capabilities? (Choose two)

Hard
57

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

Easy
58

An engineer needs to explain the primary advantage of treating network configurations as code in a modern DevOps workflow. Which principle best describes this approach?

Easy
59

An engineer receives a YAML configuration snippet for a PyEZ automation script, but the script fails with a parser error. Upon inspection, the error is caused by improper indentation levels. Which rule must be strictly followed regarding indentation in YAML syntax?

Medium
60

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
61

An automation engineer needs to convert a JSON payload representing Junos interface configurations into equivalent YAML format to reuse in an Ansible playbook. Which fundamental structural relationship between JSON and YAML makes this conversion straightforward?

Medium
62

An automation engineer is reviewing data serialization formats used within Junos automation workflows. Which TWO statements are correct regarding JSON syntax and data types? (Choose two)

Medium
63

Which protocol is natively used by Junos XML management APIs to provide structured, session-oriented configuration and operational data exchange?

Easy
64

During script development, an engineer encounters a YAML file containing comments and multiple configuration documents separated by document markers. Which characters are used to denote the start of a new document within a single YAML file stream?

Medium
65

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
66

When designing a version control workflow for Junos configurations using Git, which THREE practices are considered industry best standards? (Choose three)

Medium
67

A network architect is designing a version control strategy for multi-vendor network operations. They need a system that tracks changes to text-based configuration files, allows multiple engineers to work on separate feature branches concurrently, and merges changes systematically. Which category of tool is being utilized?

Easy
68

A Python script retrieves interface statistics from a Junos device in JSON format, modifies a threshold value, and needs to output it back into a formatted JSON string with an indentation level of 4 spaces for readability. Which Python snippet achieves this?

Medium
69

Which user credential validation mechanism does the Junos REST API use by default when authenticating incoming API calls?

Easy
70

You are reviewing a pull request that updates Junos interface configurations using Jinja2 templates. The template contains a conditional statement checking an interface speed variable. What happens if the variable is undefined during template rendering?

Hard
71

Which statement best describes the primary architectural difference between NETCONF and the Junos REST API?

Easy
72

Which TWO actions can be performed using the JSNAPy command-line interface (CLI) tool during network verification workflows?

Medium
73

An automation engineer needs to pretty-print a JSON payload in the Linux terminal for debugging Junos telemetry. Which built-in Python command-line utility can be invoked to validate and pretty-print a JSON file?

Medium
74

An automation engineer wants to verify the syntax of a large YAML playbook before executing it against a production Junos device. Which python one-liner command can be run in the terminal to quickly check if the file is syntactically valid YAML?

Medium
75

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
76

A Python automation script extracts routing table entries from a Junos device. The data structure contains deeply nested dictionaries and lists. The engineer needs to perform a deep copy of this deserialized JSON structure before modifying it. Which Python module provides the deepcopy function needed to duplicate nested containers safely?

Hard
77

When writing Python automation scripts for Junos using PyEZ, which THREE objects or methods are commonly used for device interaction and configuration management? (Choose three)

Medium
78

You are writing a PyEZ script that must retrieve interface statistics from a Junos device. You want to use a predefined PyEZ Table to avoid writing custom parsing logic. Which predefined Table should you use to get operational status and statistics for all interfaces?

Medium
79

In a CI/CD pipeline for network changes, what is the role of automated unit testing?

Medium
80

A network automation script is reading a YAML configuration file containing Junos device credentials. The script encounters an unhandled exception when attempting to load the file using PyYAML. Upon inspection, the error is caused by a tab character used for indentation instead of spaces. Which YAML specification rule does this violate?

Medium
81

What is a primary characteristic of a DevOps culture when applied to network operations (NetOps)?

Easy
82

An automation engineer is writing a Python script using Junos PyEZ to connect to a device. Which module and class must be imported to instantiate a device object representing the Junos target?

Easy
83

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

Hard
84

An automation engineer writes a Python script that loads a YAML file containing Junos device connection parameters. The file includes a line `timeout: 30` and another line `description: 30 seconds`. The script then uses the values in a template. Which statement correctly describes how a standard YAML parser will interpret these two scalar values?

Hard
85

When retrieving configuration data in JSON format from the Junos REST API, how are Junos hierarchical container statements represented in the JSON payload structure?

Medium
86

An engineer executes an HTTP GET request to retrieve interface operational details using the Junos REST API, but receives a 403 Forbidden status code. What is the most likely reason?

Medium
87

You are configuring a CI/CD pipeline for Junos network deployments. The pipeline must validate the syntax of generated candidate configurations against a physical or virtual Junos device before committing them to production. Which stage of the CI/CD pipeline does this validation step represent?

Medium
88

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
89

Which TWO of the following are valid scalar values in a YAML document? (Choose two)

Easy
90

Which TWO benefits are gained by using the Junos REST API instead of traditional CLI screen-scraping in automation workflows? (Choose two)

Easy
91

Which of the following valid JSON values represents a boolean true state?

Easy
92

Which command is used in Git to save staged changes to the local repository with a descriptive commit message?

Easy
93

You have captured a baseline snapshot using JSNAPy and want to compare a newly taken snapshot against that baseline. Which JSNAPy command-line action executes this comparison?

Medium
94

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
95

An automation developer is writing a script to modify candidate configuration data on a Junos device using the REST API. Which HTTP method and request body format should be used to replace an existing configuration hierarchy?

Medium
96

An automation developer is examining a JSON response payload returned by a Juniper device via a REST API call. Which valid JSON data type is used to represent an ordered list of values enclosed within square brackets?

Easy
97

What is the primary templating engine used alongside Python for generating structured Junos configuration text in network automation workflows?

Easy
98

Which file extension is conventionally used for YAML data serialization files?

Easy
99

An engineer is applying a candidate configuration using PyEZ and needs to load it from an external text file named 'interfaces.conf'. Which Config method should be used?

Medium
100

A Python script reads a Junos configuration snippet stored in YAML. The configuration uses YAML anchors and aliases to duplicate common routing policy definitions across multiple VRFs. When the script parses the file using yaml.safe_load(), what happens to the anchors and aliases?

Hard
101

An engineer is building a CI/CD pipeline for Junos device configuration. The pipeline must validate configuration changes before deployment and ensure that only tested configurations are merged into the main branch. Which two practices are essential for achieving this goal? (Choose two.)

Hard
102

Which of the following characters is used to start a comment line in a YAML document?

Easy
103

Which THREE architectural features distinguish the Junos REST API from traditional CLI screen-scraping (CLI automation via expect scripts)? (Choose three)

Hard
104

An automation engineer is writing a script that saves operational telemetry data gathered from a Junos router. The data needs to be written directly to an open file stream in JSON format. Which method from the Python 'json' module should be used?

Medium
105

Which data serialization formats are natively supported by the Junos REST API for both input and output payloads?

Easy
106

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
107

An engineer needs to represent an ordered list of IP addresses in a YAML configuration file for a Junos automation playbook. Which valid YAML syntax correctly defines a sequence of items?

Easy
108

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

Medium
109

Which THREE exceptions can be raised by PyEZ during script execution when interacting with a Junos device? (Choose three)

Hard
110

You are writing a Python automation script that processes JSON output from a Junos device's 'show interfaces' operational command via PyEZ. One of the interface descriptions contains raw control characters. When the script attempts to dump this data to a JSON string using json.dumps(), it raises a ValueError. Which parameter should you pass to json.dumps() to handle non-printable or out-of-range character encoding gracefully?

Hard
111

You are writing a PyEZ script that must connect to a Junos device and run several RPCs, but you need the connection to automatically recover if the NETCONF session drops during a long-running task. Which PyEZ connection parameter should you configure to enable this behavior?

Medium
112

When implementing Jinja2 templates for Junos configuration generation, which THREE features or syntax constructs are natively supported by the Jinja2 engine?

Hard
113

Which Python function deserializes a JSON-formatted string into a native Python dictionary?

Easy
114

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
115

An organization is implementing a Git-based version control strategy for Junos network configurations. Which THREE practices are considered standard DevOps workflows when managing network configurations in Git? (Choose THREE)

Medium
116

An engineer is building a Python application to manage Junos devices. They need to open a NETCONF session, retrieve the device's hostname and model, and handle exceptions if the device is unreachable. Which Junos PyEZ component is designed specifically for establishing the NETCONF session and executing RPCs?

Medium
117

An automation engineer needs to retrieve the operational status of all interfaces from a Junos device using the Junos REST API over HTTPS. The device is configured with the REST API enabled and the engineer has valid credentials. Which HTTP request accomplishes this task?

Medium
118

An automation engineer is writing a Python script that takes a complex nested Python dictionary containing Junos telemetry parameters and converts it into a YAML string. Which PyYAML function should be used?

Medium
119

Which TWO features are supported by YAML but are notably absent in standard JSON? (Choose two)

Medium
120

An automation engineer is using the Junos REST API to manage configuration. The engineer needs to perform a commit that includes a descriptive comment and also synchronizes the commit across both Routing Engines in a dual-RE chassis. Which TWO parameters must be included in the commit RPC request? (Choose two.)

Medium
121

When serializing complex nested Python dictionaries to JSON, which THREE data types will cause a TypeError unless handled by a custom default encoder function? (Choose three)

Hard
122

When writing an automation script that converts data formats between YAML and JSON for Junos configuration pipelines, which THREE potential pitfalls should an engineer account for? (Choose three)

Hard
123

When an automation engineer queries operational data using the Junos REST API, how does the API format the returned structure if the 'Accept: application/json' header is supplied?

Medium
124

An engineer needs to retrieve the entire candidate configuration in JSON format from a Junos device using the Junos REST API. Which HTTP header must be included in the GET request to ensure the response is returned in JSON format?

Hard
125

When designing an automation workflow that uses the Junos REST API for configuration management, which THREE practices ensure robust execution? (Choose three)

Medium
126

Which TWO HTTP response status codes indicate a successful Junos REST API request where data was successfully retrieved or modified? (Choose two)

Easy
127

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

Easy
128

During a NETCONF session with a Junos device, an automation script issues an RPC to load a configuration. The device returns a response containing an <rpc-error> tag. What does this indicate?

Hard
129

A network engineer is establishing a version control workflow for network configurations using Git. Which Git command should the engineer use to stage newly created configuration template files in the local repository working directory so they are included in the next commit?

Easy
130

An automation script reads a configuration template where boolean values are represented as 'yes' and 'no' in YAML. When parsed using PyYAML in Python, how are these values interpreted?

Medium
131

When serializing Python data structures to JSON for Junos automation payloads, which THREE parameters can be passed to json.dumps() to control formatting and readability? (Choose three)

Hard
132

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
133

Which TWO characteristics describe JSNAPy snapshot operations? (Choose two)

Medium
134

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

Easy
135

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
136

An automation engineer needs to include comments explaining complex network parameters inside a Junos automation data file. Which serialization format should the engineer select?

Medium
137

An operations team is applying DevOps principles to network automation on Junos devices. They want to ensure that all changes to device operational states and configurations are treated as disposable and repeatable. Which DevOps practice best describes rebuilding device configurations completely from centralized version-controlled templates rather than performing manual incremental hot-patches?

Medium
138

A DevOps engineer is designing a CI/CD pipeline for validating Junos configuration changes prior to deployment. Which THREE actions are typically performed during the automated CI pipeline 'test' or 'validate' stage? (Choose THREE)

Hard
139

Which statement correctly identifies the relationship between Junos REST API and NETCONF data models?

Easy
140

Which THREE advantages are associated with using the Junos REST API over NETCONF in lightweight automation scripts? (Choose three)

Medium
141

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
142

You are writing a Python script using the PyEZ library to retrieve interface facts from a Juniper EX Series switch. The resulting data structure is stored in a Python dictionary. You need to dump this dictionary into a YAML file so it can be read by an Ansible playbook later. Which PyYAML function should you use to convert the Python dictionary into a YAML-formatted string or file stream?

Hard
143

A network automation team stores Junos device inventory in JSON. A developer notices that the JSON file contains a field "last_updated": "2024-05-01T12:00:00Z" and wants to compare it against the current time in a Python script. Which statement correctly describes how a standard JSON parser handles this value?

Medium
144

What is the native data format returned by Junos devices when queried via REST API or NETCONF operations configured with JSON output formatting?

Easy
145

Which THREE actions can be performed using the Junos REST API operational endpoints? (Choose three)

Medium
146

When using Jinja2 templates in Python to generate configurations, how can you load a template file from disk prior to rendering it with variables?

Medium
147

An automation engineer is comparing YAML and JSON for storing Junos device configuration data. Which TWO statements accurately describe differences between the two formats? (Choose two.)

Hard
148

When modifying a Junos device configuration using the PyEZ Config table-driven or Context manager (with Config(dev) as cu:), what is the default behavior regarding locking the candidate configuration?

Hard
149

Which THREE principles are foundational to the DevOps movement when applied to network engineering? (Choose three)

Medium
150

You are utilizing PyEZ Table and View abstractions to parse interface statistics. Which base class must your custom Table class inherit from to map to Junos XML output?

Medium
151

Which THREE tasks are typical responsibilities of a network DevOps engineer managing a Junos infrastructure? (Choose three)

Medium
152

You want to run a JSNAPy verification test via Python code. Which Python class should you import and instantiate to execute the snapshot comparison programmatically?

Hard
153

In JSNAPy, what file format is used to define test cases and expected operational states?

Easy
154

Which TWO of the following are valid primitive data types in JSON? (Choose two)

Easy
155

An automation engineer is building a Python script that generates Junos configuration snippets from a JSON payload. The payload contains nested objects representing interfaces, units, and addresses. The engineer uses json.loads and then accesses data['interfaces']['ge-0/0/0']['unit'][0]['family']['inet']['address'][0]['name']. Which JSON structural feature makes this nested access pattern possible?

Hard
156

When comparing error handling between NETCONF and the Junos REST API, how are protocol-level errors communicated back to the client?

Hard
157

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
158

You are writing a PyEZ script to retrieve the configured hostname from a Junos device. You want to use the simplest method that returns the hostname as a string without parsing XML manually. Which PyEZ feature should you use?

Easy
159

You are writing a Python script that uses PyEZ to connect to a Junos device. After calling `dev.open()`, you need to verify that the NETCONF session is active before performing operational commands. Which statement correctly checks the connection status and returns a Boolean value?

Medium
160

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
161

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

Easy
162

Which TWO characteristics are true regarding the Junos REST API? (Choose two)

Easy
163

An automation script makes a REST API request to modify a Junos configuration. To ensure that the changes are validated and committed in a single workflow step without leaving dangling candidate changes, how can the commit parameter be handled?

Hard
164

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

Hard
165

An automation developer is designing a tool that interacts with multiple network vendors, including Juniper Junos. They evaluate using Junos REST API versus NETCONF. Which workflow advantage does the REST API offer over NETCONF in web-centric application environments?

Hard
166

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
167

A network automation team is using the Junos REST API to manage configurations on a Junos device. They need to perform a commit operation that includes a commit comment and also synchronizes the commit across all Routing Engines in a dual-RE system. Which HTTP method and URI combination should they use to achieve this with a single request?

Hard
168

A Python script processes a YAML configuration template for Junos BGP neighbors. The configuration contains a multi-line banner string description. Which YAML block scalar indicator preserves newlines exactly as written in the text block?

Hard
169

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

Easy
170

You are writing a Python automation script that processes configuration data. The script reads a YAML file containing Junos firewall filters, modifies them, and writes them back out. However, you notice that all the original comments in the file are stripped out in the output. What is the fundamental reason for this behavior in standard PyYAML dump operations?

Hard
171

You are writing a script that uses PyEZ to load a partial configuration merge. By default, what configuration database mode does the Config utility lock and load into?

Hard
172

When managing Junos configuration changes in a team environment, why is atomic configuration rollback capability crucial during automated deployments?

Medium
173

An automation engineer is tasked with implementing a REST API client that authenticates to a Junos device. The engineer must choose an authentication method supported by the Junos REST API and ensure that credentials are transmitted securely. Which two statements are correct about authentication for the Junos REST API? (Choose two.)

Medium
174

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
175

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

Easy
176

What is the primary function of a version control system (VCS) like Git in a Junos automation workflow?

Easy
177

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

Hard
178

In a CI/CD pipeline configured for Junos network changes, which THREE automated testing steps are typically performed before production deployment? (Choose three)

Medium
179

What type of brackets enclose an array in a JSON document?

Easy
180

When an automation script issues a POST request to create a new static route via the Junos REST API, what HTTP status code indicates that the resource was successfully created?

Medium
181

When writing a Python script that connects to multiple Junos devices concurrently using PyEZ, which Python module is commonly used to manage thread pooling and parallel execution?

Medium
182

An automation engineer is writing a Python script using Juniper PyEZ to connect to a Junos device. Which context manager approach is best practice to ensure the Device session is properly closed even if an exception occurs?

Easy
183

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
184

When executing a configuration change via the Junos REST API, what is the role of the HTTP DELETE method?

Medium
185

A network automation team is using the Junos REST API to manage configurations on a fleet of Junos devices. They need to ensure that configuration changes are applied atomically and that they can roll back if an error occurs. They decide to use the REST API to load a configuration, commit it, and then verify the commit. Which sequence of REST API calls should they use to load a configuration snippet, commit it, and then confirm the commit was successful?

Hard
186

In a Junos NETCONF automation workflow, what happens during a lock operation on the configuration database? (Choose two)

Hard
187

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
188

Which TWO tools or platforms are commonly used for version control and hosting of Junos automation code repositories? (Choose two)

Easy
189

A network team uses a CI/CD pipeline to manage Junos device configurations. After a developer merges a change to the main branch, the pipeline is triggered automatically. Which DevOps principle is primarily demonstrated when the pipeline deploys the tested configuration to production devices without manual intervention?

Medium
190

When using Jinja2 inheritance, which tag is placed in a base template to indicate where child templates can insert their custom content?

Medium
191

An automation engineer is writing a Python script that retrieves the operational status of all interfaces from a Junos device using the Junos REST API. The script sends a GET request to https://device/rest/interface. The device returns an HTTP 200 OK response, but the response body is empty. The engineer examines the request and confirms that the URL is correct and the device is reachable. Which action should the engineer take to retrieve the interface status information?

Medium
192

An automation engineer uses a Python script with the PyEZ library to retrieve interface statistics from a Junos device and wants to store the results in a file that preserves data types such as integers, booleans, and null values for later processing by another tool. The engineer needs a serialization format that is compact, widely supported by APIs, and preserves these primitive types. Which format should the engineer choose?

Medium
193

An engineer is using Junos PyEZ to load a configuration change onto a device. The script uses the Config class to lock the candidate configuration, load a set of changes, and then commit. During testing, the commit fails because another user has an exclusive lock on the configuration. What is the correct behavior of the engineer's script when it attempts to lock the configuration in this situation?

Hard
194

You are using PyEZ to retrieve the operational status of all interfaces on a Junos device. You want to get the output in a structured Python dictionary rather than raw XML. Which method should you use on the Device object?

Easy
195

A network automation developer is writing a Python script that uses the Junos REST API to load a candidate configuration from a file and commit it. The developer wants to ensure the configuration is merged with the existing candidate configuration. Which HTTP method and endpoint should be used to load the configuration?

Easy
196

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
197

Which of the following describes the fundamental structural difference between JSON and YAML regarding syntax design?

Easy
198

Which TWO tasks are typically automated using Python and PyEZ in a network DevOps pipeline? (Choose two)

Medium
199

An automation engineer is troubleshooting a Junos REST API script that intermittently fails with HTTP 401 Unauthorized errors when retrieving operational data. The script uses HTTP Basic Authentication with a valid username and password. The engineer confirms that the credentials are correct and that the REST API is enabled. What is the most likely cause of the intermittent failures?

Hard
200

Which TWO file formats are commonly used for structuring network configuration data and automation templates in Junos DevOps pipelines? (Choose two)

Easy
201

An engineer writes a Python script that loads a JSON configuration file using the json.load() method. The file contains configuration parameters for a Junos device. If the JSON file contains a trailing comma at the end of the last element in an array, what will happen when the script executes?

Medium
202

A Python script using PyEZ loads a configuration from a file and commits it on a Junos device. The commit fails with a `CommitError` exception. You need to retrieve the specific error message returned by the device. Which method or attribute should you use to obtain the detailed error text?

Hard
203

You are writing a Python script that converts a Junos operational state output from XML (via NETCONF) into JSON. The XML structure contains sibling elements with the same tag name. When converted naively, how do standard XML-to-JSON conversion libraries (like xmltodict) typically represent these repeated sibling elements in the resulting JSON dictionary?

Hard
204

An automation engineer needs to parse a JSON payload returned by the Junos REST API that contains a list of interfaces, each with a name and a list of addresses. The engineer wants to iterate over the interfaces and then over each interface's addresses in Python. Which Python data structure mapping does the `json` module produce for this payload?

Medium
205

A network automation team is evaluating Junos PyEZ for managing a fleet of Junos devices. They want to understand which capabilities PyEZ provides natively. (Choose two.)

Medium
206

In a Junos automation environment, what role does a schema (such as YANG or Junos XSD) play when interacting with NETCONF?

Medium
207

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

Easy
208

You are writing a script that uses Jinja2 to dynamically render a Junos interface configuration. Which Python module and function are required to load a template from the local filesystem and render it with a dictionary of variables?

Easy
209

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
210

When using the Junos REST API to configure static routes, how does the JSON payload structure represent list items that can have multiple instances (such as multiple next-hops or static routes)?

Medium
211

You are using the PyEZ SW utility to install a new Junos image on a device. Which method parameter allows the script to automatically reboot the device after a successful installation?

Medium
212

Which TWO methods are provided by the Python standard library 'json' module for deserializing JSON data? (Choose two)

Medium
213

You are developing a Python script using PyEZ to load a configuration onto a Junos device. You need to ensure that the configuration is merged with the existing candidate configuration, and that the load operation does not perform a commit check automatically. Which method should you use to load the configuration from a file?

Medium
214

A network engineer is using Git for version control of Junos configurations. During a peer review on a pull request, a merge conflict arises because two engineers modified the same interface description line in different branches. What is the correct procedure to resolve this conflict in Git?

Hard
215

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
216

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
217

You are writing a Python script to retrieve interface statistics from a Junos device using the REST API. You use HTTP Basic Authentication. Which HTTP header must be included to pass the encoded credentials correctly?

Hard
218

What is the primary benefit of decoupling network configuration data (YAML/JSON) from presentation templates (Jinja2) in network automation?

Medium
219

A network engineer writes a Python script using Junos PyEZ to push a configuration change. The script uses the ConfigTable or Config class. What mechanism does PyEZ use under the hood to ensure the configuration lock is released even if the script encounters an unhandled exception?

Hard
220

Which TWO of the following are valid ways to instantiate a PyEZ Device object in Python, providing connection parameters? (Choose two)

Medium
221

A network engineer is designing a new automation workflow for Junos devices and wants to understand how the Junos automation stack separates its responsibilities. Which statement accurately describes the role of the Junos management daemon (mgd) in this stack?

Easy
222

Which Junos automation toolset relies heavily on XML over NETCONF and provides robust Python libraries tailored specifically for Junos network devices?

Easy
223

An automation engineer wants to retrieve information about all software packages installed on a Junos device using the REST API. Which operational RPC endpoint category is typically targeted?

Medium
224

Which TWO data serialization formats can an automation engineer request using the 'Accept' header in a Junos REST API GET request? (Choose two)

Easy
225

Which TWO characteristics distinguish the Junos REST API from NETCONF when interacting with Junos devices? (Choose two)

Medium
226

In a Python script utilizing PyEZ, what method must be called on the Device instance after all configuration and operational tasks are complete to properly terminate the NETCONF session?

Easy
227

What is the primary benefit of using PyEZ Table and View abstractions over raw RPC XML parsing in Python scripts?

Easy
228

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
229

Which character is used to indicate a mapping key-value pair in YAML syntax?

Easy
230

Which TWO Python standard library modules are commonly combined when a script needs to fetch web content (such as Junos REST API data) and parse the resulting payload? (Choose two)

Medium
231

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
232

You need to execute a custom remote procedure call (RPC) in PyEZ to retrieve the Ethernet switching table. The tag in Junos XML API is get-ethernet-switching-table-information. How should you write this method call in Python?

Hard
233

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

Easy
234

Which TWO components are essential parts of a model-driven network automation architecture on Junos devices? (Choose two)

Hard
235

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

Easy
236

Which TWO benefits are gained by applying DevOps principles to Junos network management? (Choose two)

Easy
237

An automation engineer is designing a deployment strategy for Junos devices using Git branches. Which branching strategy model aligns best with continuous delivery where feature branches are merged frequently into a shared integration branch that automatically triggers staging tests?

Hard
238

You are writing a PyEZ script that needs to handle exceptions when connecting to a Junos device and executing RPCs. Which TWO exceptions are raised by PyEZ when authentication fails or when the device is unreachable? (Choose two.)

Medium
239

Which TWO benefits are gained by using Python virtual environments when developing PyEZ and Jinja2 automation scripts? (Choose two)

Medium
240

When executing a configuration commit in Junos via NETCONF, which TWO commit parameters or modifiers can be specified in the RPC? (Choose two)

Hard
241

An automation developer is designing a script that reads routing policy parameters from a configuration file. Which TWO data formats are natively supported and commonly used across Junos automation toolchains like PyEZ, Ansible, and REST APIs for data serialization? (Choose two)

Easy
242

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

Easy
243

A Python automation script parses a Junos telemetry stream in JSON. The JSON payload uses integer keys in a dictionary (e.g., {443: 'HTTPS'}). When loaded into Python using json.loads(), what data type do the dictionary keys become?

Hard
244

When developing Python scripts that utilize PyEZ and Jinja2, which THREE best practices ensure robust and maintainable automation code? (Choose three)

Hard
245

When executing an RPC call in PyEZ, what format is typically returned by default if you do not parse it into another structure?

Easy
246

An automation engineer is designing a Python script that converts Junos device configuration data between JSON and YAML formats. The script must correctly handle data types to avoid misconfiguration. Which TWO statements about JSON and YAML data type handling are correct? (Choose two.)

Hard
247

A network automation engineer is writing a Python script using the Junos PyEZ library to retrieve operational state from a QFX Series switch. The script needs to retrieve interface statistics using an RPC instead of raw CLI text parsing. Which PyEZ method should the engineer execute to invoke the 'get-interface-information' RPC and receive the structured XML response?

Hard
248

Which of the following data types is natively supported in JSON without requiring custom serialization handlers?

Easy
249

A network automation engineer is using a Python script with the PyYAML library to load a YAML file that defines a Junos device's configuration. The script needs to ensure that the loaded data is a Python dictionary and that no arbitrary Python objects are instantiated during parsing. Which function should the engineer use to safely load the YAML content?

Medium
250

A network automation engineer is utilizing the Junos PyEZ library in Python to manage device configurations. Which THREE methods or classes are part of the core Junos PyEZ library functionality? (Choose THREE)

Hard
251

You are writing a Python script using PyEZ to retrieve and process operational data from a Junos device. Which TWO statements correctly describe the use of PyEZ Table and View for parsing operational data? (Choose two.)

Hard
252

An automation engineer is designing a Junos network automation workflow and needs to select the component of the Junos automation architecture responsible for parsing XML and JSONRPC client requests and interacting directly with the Junos kernel and daemons. Which component fulfills this role?

Easy
253

A network automation team is using Junos PyEZ to retrieve interface statistics from a device. They need to ensure that the script can handle multiple devices concurrently and that each device connection is properly closed after the operation. Which approach should they take?

Medium
254

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
255

An administrator configures the Junos REST API service. By default, which TCP port does the device listen on for secure HTTPS REST requests?

Easy
256

What is the primary benefit of using structured data formats (such as XML, JSON, or YAML) over unstructured CLI text output in Junos automation?

Easy
257

Which Junos configuration hierarchy is used to configure system services parameters related to the REST API agent?

Easy
258

Which THREE statements correctly contrast the session handling of NETCONF versus the Junos REST API? (Choose three)

Hard
259

You are configuring a webhook in your version control system to trigger an automated CI/CD pipeline whenever a developer pushes a configuration commit to the main branch of your Junos automation repository. What security mechanism should be implemented on the receiving pipeline webhook endpoint?

Hard
260

Which TWO of the following are valid extensions commonly used for YAML files? (Choose two)

Easy
261

In a DevOps pipeline managing Junos devices, an engineer implements 'Infrastructure as Code' (IaC). Which practice best exemplifies this methodology when applied to Junos routing policies?

Hard
262

When writing a Python script to interact with Junos devices, you want to ensure that password credentials are not hardcoded in the source code. What is a recommended best practice supported by PyEZ?

Medium
263

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
264

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

Easy
265

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

Easy
266

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
267

You are automating the retrieval of operational data from a Junos device using PyEZ. You write a Python script that calls the RPC method `get_interface_information` with the argument `terse=True` on a `Device` object. The script executes successfully, but the returned XML contains only a subset of interface details, missing fields like `admin-status` and `oper-status`. You need the full operational status for each interface. What should you do to obtain the complete data?

Medium
268

In Git version control, which TWO commands are used to integrate changes from one branch into another? (Choose two)

Hard
269

You are writing a Python script to gather operational state information from a Junos device using PyEZ. Which method should you call on an open Device instance to retrieve standard hardware and OS inventory facts into a dictionary?

Medium
270

An automation script needs to check if a Junos device supports a specific feature before executing an RPC. Which PyEZ property can be checked to inspect the software version loaded on the device?

Medium
271

Which THREE HTTP methods are commonly used within the Junos REST API for managing configuration and operational resources? (Choose three)

Hard
272

Which Python module is part of the standard library and provides functions to serialize and deserialize JSON data?

Easy
273

An automation engineer stores Junos interface descriptions in a YAML file. One description includes the text 'Link: 10G uplink to core-sw-01'. After loading the file with a standard YAML parser, the engineer finds the value is not parsed as expected. Which YAML syntax should the engineer use to store this value correctly?

Easy

Frequently asked questions

What does the troubleshooting domain cover on the JNCIA-DevOps exam?
troubleshooting questions test whether you can apply the concept in context, not just recognise a definition.
How many questions are in this domain?
This page lists all 273 troubleshooting 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 troubleshooting questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.