Courseiva

Juniper Networks Automation and DevOps, Associate (JNCIA-DevOps, JN0-224) (JNCIA-DevOps) (JNCIA-DevOps) — Questions 226300

307 questions total · 5pages · All types, answers revealed

Page 3

Page 4 of 5

Page 5
226
Multi-Selecteasy

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

Select 2 answers
A.JSON
B.YAML
C.Proprietary binary core dump format
D.Raw bitmap image (.bmp) format
E.Windows executable (.exe) format
AnswersA, B

Correct. JSON is widely used for structured data exchange.

Why this answer

YAML and JSON are standard data serialization formats used alongside Jinja2 templates.

227
MCQmedium

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?

A.The script will successfully parse the file and ignore the trailing comma.
B.The script will raise a JSONDecodeError.
C.The script will throw a TypeError during execution.
D.The script will convert the trailing comma into a null value automatically.
AnswerB

Trailing commas violate standard JSON syntax rules, causing the parser to fail with a decode error.

Why this answer

Standard JSON specification is strict and does not allow trailing commas. Attempting to parse it will raise a json.decoder.JSONDecodeError.

228
MCQmedium

When comparing NETCONF and the Junos REST API workflows, which statement accurately describes how configuration locks are handled?

A.NETCONF requires explicit lock and unlock commands, whereas REST API transactions typically manage locks implicitly during request execution.
B.Neither protocol utilizes locking mechanisms since Junos uses optimistic concurrency control.
C.The Junos REST API enforces exclusive global locking which prevents any concurrent NETCONF sessions.
D.Both NETCONF and Junos REST API require the client to manually issue an explicit lock RPC before making changes.
AnswerA

NETCONF clients must manage locks explicitly, whereas REST APIs handle database access sessions internally per transaction.

Why this answer

NETCONF explicitly requires lock and unlock operations on configuration datastores (candidate/running). The Junos REST API abstracts state management or handles implicit locking depending on the specific API call, whereas NETCONF leaves lock management entirely to the client's explicit RPC control.

229
MCQhard

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?

A.By appending numeric indexes to every key name automatically.
B.As a JSON array containing multiple objects.
C.By raising a DuplicateElementException.
D.By overwriting previous elements so only the last element is retained.
AnswerB

Correct. Sibling elements with identical tags are aggregated into a JSON array.

Why this answer

Conversion libraries like xmltodict represent repeated sibling XML elements as a JSON array (list) to preserve all instances under a single key.

230
MCQmedium

An engineer wants to inspect the differences between two committed configurations on a Junos device using the CLI or automation tools. Which operation does this correspond to in Junos configuration management?

A.Running a traceroute across the management network
B.Comparing configuration revisions (e.g., rollback comparison) to audit modifications before committing.
C.Performing a NETCONF <discard-changes> operation
D.Reloading the Junos kernel image
AnswerB

Correct. Configuration comparison allows auditing differences between revisions.

Why this answer

Comparing configuration revisions is done using comparison features (e.g., 'show configuration | compare').

231
MCQmedium

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

A.It encrypts the communication channel between the client and the Junos device.
B.It defines the structural rules, data types, and valid hierarchy for configuration and operational data models.
C.It acts as a firewall filter blocking unauthorized IP addresses on the management interface.
D.It compiles Python scripts into executable machine code for the Routing Engine CPU.
AnswerB

Correct. Schemas define the valid structure of XML/JSON data.

Why this answer

YANG or XSD schemas define the data model structure, types, and constraints for configuration and operational data.

232
MCQeasy

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

A.It defines the security credentials for SSH authentication.
B.It acts as a wrapper enclosing the specific NETCONF method request sent by the client to the server.
C.It stores error logs returned by the Junos routing engine.
D.It terminates the NETCONF session upon completion.
AnswerB

The <rpc> element encapsulates every request sent by a NETCONF client.

Why this answer

The <rpc> element is the protocol envelope used by the client to send a request to the NETCONF server.

233
MCQeasy

Which command or tool on a Junos device verifies that the NETCONF subsystem is enabled and listening for SSH connections?

A.show netconf settings
B.show xml-api status
C.show netconf status connections
D.show system services netconf ssh
AnswerD

This command verifies the NETCONF SSH service configuration status.

Why this answer

NETCONF over SSH runs as a subsystem on Junos and can be verified via system services configuration or operational commands.

234
MCQeasy

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?

A.from jnpr.junos.cfg import ConfigTemplate
B.from jinja2 import Environment, FileSystemLoader
C.from jnpr.junos.template import TemplateRenderer
D.import jnpr.junos.utils.jinja as jinja
AnswerB

FileSystemLoader and Environment are the standard classes used to load and render templates from files.

Why this answer

Jinja2 utilizes a FileSystemLoader to find templates on disk and an Environment to manage them, allowing you to get_template() and render() with context variables.

235
MCQhard

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?

A.<error-option>rollback-on-error</error-option>
B.<test-option>test-then-set</test-option>
C.<default-operation>none</default-operation>
D.<error-option>stop-on-error</error-option>
AnswerA

'rollback-on-error' ensures atomicity by rolling back changes if an error is encountered.

Why this answer

The error-option element with the value 'rollback-on-error' instructs the device to abort and roll back if any error occurs.

236
MCQmedium

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

A.As XML CDATA blocks embedded within JSON keys.
B.As numerical indexed keys (e.g., 'route-0', 'route-1').
C.As JSON arrays containing objects for each list entry.
D.As a single concatenated string separated by semicolons.
AnswerC

Multi-instance list entries map to JSON arrays.

Why this answer

In Junos REST API JSON representations, multi-instance configuration lists are typically represented as arrays of JSON objects.

237
MCQmedium

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?

A.auto_reboot=1
B.reboot=True
C.reload_after_install=True
D.action='reboot'
AnswerB

Correct. Passing reboot=True to the sw.upgrade() method triggers a device reload upon completion.

Why this answer

The val parameter or reboot=True flag is typically used depending on the specific SW.upgrade() call signature. Specifically, reboot=True forces the reload.

238
Multi-Selectmedium

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

Select 2 answers
A.json.read()
B.json.decode()
C.json.loads()
D.json.load()
E.json.parse()
AnswersC, D

Correct. json.loads() deserializes JSON from a string.

Why this answer

The json module provides json.load() for file-like objects and json.loads() for strings.

239
Multi-Selectmedium

Which TWO methods or attributes are valid when using the PyEZ SW utility to manage Junos software? (Choose two)

Select 2 answers
A.sw.install(remote_path='/var/tmp/image.tgz')
B.sw.upgrade(package='junos-install-srx-x86-64-20.4R1.3.tgz', reboot=True)
C.sw.rollback_software()
D.sw.get_os_facts()
E.sw.commit_os()
AnswersA, B

Correct. install is a valid SW method.

Why this answer

SW utility methods include install, upgrade, and checking device readiness.

240
MCQmedium

You need to write a Python script that extracts interface status from a Junos device using PyEZ and converts the XML output directly into a Python dictionary. Which utility or function can assist with this conversion?

A.Using PyEZ Table and View abstractions
B.dev.rpc.convert_to_dict()
C.json.loads(dev.rpc.get_interface_information())
D.etree.to_dict()
AnswerA

Correct. PyEZ Table/View mapping structures automatically parse XML output into clean Python dictionaries and lists.

Why this answer

The XMLtoPy function from jnpr.junos.factory or standard table/view mappings helps convert XML to Python data structures.

241
MCQhard

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?

A.Reboot the Junos routing engine to clear the Git repository cache and force a fast-forward merge.
B.Run the 'git force-merge' command to automatically discard the older branch's changes.
C.Use 'git reset --hard' on the remote repository to delete both conflicting branches entirely.
D.Manually edit the conflict markers in the affected configuration file, stage the resolved file, and complete the merge commit.
AnswerD

Correct. Merge conflicts require manual intervention using conflict markers (<<<<, ====, >>>>), then staging and committing.

Why this answer

Git marks the conflicting lines in the file, requiring manual editing to choose the correct changes or combine them, followed by staging and committing the resolution.

242
MCQhard

When parsing a Junos configuration snippet in YAML, an engineer notices a string value starting with a zero (e.g., '01234') that is unquoted. How do YAML parsers typically interpret this value?

A.The parser throws a ScannerError due to invalid numeric formatting.
B.As a string literal matching the exact characters.
C.As a floating-point number with zero prefix.
D.As an octal integer.
AnswerD

Correct. Leading zeros in YAML 1.1 trigger octal integer interpretation.

Why this answer

In YAML 1.1, numbers starting with a leading zero are interpreted as octal (base 8) integers. To ensure it is treated as a string, it must be quoted.

243
MCQhard

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?

A.Proxy-Authenticate
B.Authorization
C.Junos-Auth-Token
D.X-API-Key
AnswerB

The 'Authorization' header is standard for passing Basic Authentication credentials in HTTP requests.

Why this answer

HTTP Basic Authentication requires the 'Authorization' header containing the keyword 'Basic' followed by the Base64-encoded username:password string.

244
MCQmedium

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

A.It allows non-engineers to modify device variables without altering the core template logic, promoting the DRY principle.
B.It eliminates the need for any version control system.
C.It converts all configuration files into binary format to save disk space.
D.It forces the Junos device to run all configuration commits in parallel across all line cards.
AnswerA

Correct. Data/template separation allows reuse and simplifies updates.

Why this answer

Separating data from templates allows the same template to be reused across multiple devices with different data sets, adhering to DRY principles.

245
MCQhard

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?

A.NETCONF keepalive timers that drop the SSH session after 1 second.
B.A UNIX cron job that reboots the router every 5 minutes.
C.Python context managers ('with' statements) that automatically release locks and clean up session state upon exit.
D.Hardware watchdog timers built into the Routing Engine ASIC.
AnswerC

Correct. PyEZ configuration context managers ensure proper cleanup and lock release.

Why this answer

Python context managers (using the 'with' statement) automatically handle acquiring and releasing locks and rolling back candidate changes on exception in PyEZ.

246
Multi-Selectmedium

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

Select 2 answers
A.dev = Device(host='192.168.1.1', user='admin', password='secret')
B.dev = Device.connect('192.168.1.1')
C.dev = Device.from_cli('192.168.1.1')
D.dev = Device(database='candidate')
E.dev = Device('192.168.1.1', user='admin', ssh_private_key='/path/to/key')
AnswersA, E

Correct. Explicit keyword arguments are standard for initializing a Device.

Why this answer

PyEZ Device can take explicit keyword arguments or read from configuration files/environment variables.

247
MCQeasy

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

A.Junos PyEZ
B.Cisco IOS XE Embedded Event Manager (EEM)
C.Microsoft PowerShell Active Directory module
D.Arista eAPI Python client library
AnswerA

Correct. PyEZ is Juniper's Python library for Junos automation.

Why this answer

Junos PyEZ is the Python library tailored specifically for Junos devices using NETCONF.

248
MCQmedium

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?

A./api/configuration/system/software
B./netconf/rpc/software
C./api/operational/rpc/get-software-information
D./api/v1/packages/status
AnswerC

This operational RPC endpoint executes the get-software-information query.

Why this answer

Software inventory and package information can be retrieved by invoking the 'get-software-information' RPC via the operational RPC URI path.

249
Multi-Selecteasy

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

Select 2 answers
A.application/yaml
B.text/csv
C.application/json
D.application/xml
E.application/octet-stream
AnswersC, D

Clients can request JSON responses using application/json.

Why this answer

The Junos REST API supports application/json and application/xml in Accept headers to return responses in the desired format.

250
MCQhard

An administrator issues a NETCONF <get-config> request targeting the candidate datastore and includes a namespace prefix that does not match the device's loaded YANG/XML schema namespace. How does Junos respond?

A.The device returns an <rpc-error> indicating an invalid namespace or unrecognized element.
B.The device falls back to default CLI parsing mode.
C.The session is immediately terminated by the SSH server.
D.The device automatically strips the namespace prefix and processes the request.
AnswerA

Incorrect namespaces trigger parsing or validation errors returned in an <rpc-error>.

Why this answer

Mismatched or unknown namespaces in NETCONF requests result in a malformed message or invalid-element rpc-error.

251
MCQmedium

An automation engineer is trying to retrieve operational data from a Junos device using the REST API. They send an HTTP GET request to the URI path 'http://192.168.1.1:3000/api/font/operational/system/information', but the request fails with a 404 Not Found error. What is the cause of this failure?

A.Authentication credentials were missing from the HTTP header.
B.The URI path contains an invalid prefix segment 'font' instead of the required API root structure.
C.The port 3000 is reserved for NETCONF and cannot be used for REST API requests.
D.Operational data retrieval requires an HTTP POST method instead of GET.
AnswerB

The correct operational API route uses '/api/operational/system/information', and 'font' is an incorrect path segment.

Why this answer

The correct base path for Junos REST API operational data uses 'rpc' or 'initial' or specific resource endpoints like /api/restful/rit/rpc, but the standard path prefix for RPCs and operational data via the Junos REST API begins with /api/operational/ rather than /api/font/operational/.

252
Multi-Selectmedium

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

Select 2 answers
A.The REST API communicates directly over TCP port 830.
B.NETCONF requires explicit SSH key pairs for transport security, whereas REST API cannot use encryption.
C.The REST API uses standard HTTP methods (GET, POST, PUT, DELETE) over HTTP/HTTPS ports.
D.The REST API natively supports returning responses formatted in JSON.
E.NETCONF is stateless, whereas REST API maintains persistent interactive sessions by default.
AnswersC, D

REST operates over HTTP/HTTPS using standard CRUD verbs.

Why this answer

Junos REST API utilizes standard HTTP/HTTPS transport and commonly returns JSON formatted responses, whereas NETCONF uses port 830 and XML payloads.

253
MCQeasy

An administrator wants to disable the Junos REST API daemon entirely. Which CLI command achieves this?

A.deactivate protocols rest-api
B.set system services jpagent disable
C.delete system services jpagent
D.stop system services rest
AnswerC

Deleting the jpagent service configuration stops the REST API daemon.

Why this answer

To disable the jpagent service, the administrator uses the 'delete system services jpagent' command in configuration mode.

254
MCQeasy

Which NETCONF capability URI indicates that the server supports rolling back configuration changes to previous commit points?

A.urn:ietf:params:netconf:capability:rollback-on-error:1.0
B.http://xml.juniper.net/netconf/junos/1.0
C.urn:ietf:params:netconf:base:1.0
D.Juniper specific capability strings for commit/rollback features advertised in the hello banner.
AnswerD

Juniper advertises specific capability URIs for commit features and rollbacks during the hello phase.

Why this answer

Junos supports rollback capabilities advertised via specific NETCONF capability URIs.

255
MCQeasy

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?

A.dev.close()
B.dev.terminate()
C.dev.end_session()
D.dev.disconnect()
AnswerA

Correct. dev.close() cleanly shuts down the NETCONF session.

Why this answer

The .close() method terminates the NETCONF session cleanly.

256
MCQeasy

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

A.They eliminate the need to establish a Device connection object
B.They automatically convert XML into structured Python data structures like dictionaries and lists
C.They allow direct execution of Junos CLI operational commands without NETCONF
D.They automatically commit configurations to the active database
AnswerB

Correct. Tables and Views abstract XML parsing into clean Python objects.

Why this answer

Tables and Views abstract complex XML trees into clean Python dictionaries and lists.

257
MCQeasy

Which service daemon must be explicitly enabled in the Junos CLI configuration to allow REST API requests to be processed by the routing engine?

A.set system services api-daemon
B.set system services netconf
C.set system services rest http
D.set system services jpagent
AnswerD

Enabling jpagent starts the Junos REST API daemon.

Why this answer

The Junos REST API is managed by the 'jpagent' (Junos Plugin Agent) service. It must be enabled under the 'system services' hierarchy for REST API requests to function.

258
MCQhard

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?

A.The attribute is ignored, and the operation defaults to merge.
B.The configuration value is updated successfully.
C.The device returns an rpc-error indicating that the target data model element already exists.
D.The existing node is deleted and recreated with the new value.
AnswerC

'create' fails if the item already exists.

Why this answer

The 'create' operation adds a configuration node only if it does not already exist; if it exists, it returns an error.

259
Multi-Selectmedium

An automation engineer is designing a Junos XML API workflow that uses the <get-config> operation. Which THREE parameters or filtering methods are valid when retrieving configuration data from a Junos device using NETCONF? (Choose three.)

Select 3 answers
A.Using SQL queries enclosed in <sql-query> tags to extract table rows directly from the configuration database.
B.Specifying the source datastore (e.g., <source><running/></source>).
C.Using subtree filtering inside the <filter> element to retrieve specific configuration nodes.
D.Using XPath expressions within the <filter> element with type="xpath".
E.Using the <max-depth> attribute within the <get-config> tag to limit configuration tree traversal.
AnswersB, C, D

The <source> element is mandatory in <get-config> to specify which datastore to retrieve.

Why this answer

Valid filtering and parameter methods for <get-config> include specifying the target datastore source, applying subtree filtering, and using xpath-based filters under specific namespace conditions.

260
MCQeasy

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

A.Semicolon (;)
B.Arrow (->)
C.Colon (:)
D.Equals sign (=)
AnswerC

Correct. A colon separates keys and values in YAML mapping pairs.

Why this answer

In YAML, a key-value mapping is represented by a colon followed by a space (: ).

261
MCQhard

An automation pipeline tests Junos configuration changes against a virtual Junos device (such as vSRX or cRPD) in a CI environment before deploying to physical hardware. What is this practice called?

A.Production traffic shedding
B.Virtual staging and pre-deployment validation testing
C.Static code linting
D.Hardware refactoring
AnswerB

Correct. Using virtual network functions in CI pipelines validates changes safely before production.

Why this answer

Testing against virtualized network functions in a staging or CI environment is known as lab validation or digital twinning/staging.

262
Multi-Selectmedium

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)

Select 2 answers
A.json
B.yaml
C.socket
D.urllib.request
E.pickle
AnswersA, D

Correct. json is required to parse API responses.

Why this answer

The 'urllib.request' module handles HTTP requests, and the 'json' module handles parsing the resulting JSON response.

263
MCQhard

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?

A.The session was not locked prior to executing the query.
B.Interface statistics cannot be retrieved via NETCONF; CLI parsing is required.
C.The <get-config> RPC targets configuration datastores, whereas interface statistics are operational state data retrieved via the <get> RPC.
D.The subtree filter syntax was invalid, causing the device to fallback to the default configuration view.
AnswerC

<get-config> only returns configuration; operational stats require <get>.

Why this answer

<get-config> retrieves configuration data, whereas operational statistics require the <get> RPC with operational filters.

264
MCQhard

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?

A.dev.rpc.get-ethernet-switching-table-information()
B.dev.get_ethernet_switching_table_information()
C.dev.execute_rpc('get-ethernet-switching-table-information')
D.dev.rpc.get_ethernet_switching_table_information()
AnswerD

Correct. PyEZ converts hyphens in RPC names to underscores for Python method calls.

Why this answer

PyEZ maps XML RPC hyphens to Python underscores, allowing you to call rpc methods directly as attributes on dev.rpc.

265
MCQhard

You are configuring NETCONF traceoptions on a Junos device to debug an XML parsing issue. Which configuration statement enables logging of all NETCONF protocol messages to a file named 'netconf-debug.log'?

A.set system services netconf traceoptions file netconf-debug.log set system services netconf traceoptions flag all
B.set protocols netconf traceoptions file netconf-debug.log flag detail
C.set security netconf logging file netconf-debug.log
D.set system netconf trace file netconf-debug.log level debug
AnswerA

This is the correct Junos CLI syntax for enabling comprehensive NETCONF tracing.

Why this answer

Traceoptions under the netconf system services hierarchy control logging of NETCONF traffic.

266
MCQeasy

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

A.Netmiko
B.Junos PyEZ (juniper-eznc)
C.Paramiko
D.Requests
AnswerB

PyEZ provides high-level abstractions for Junos NETCONF APIs.

Why this answer

PyEZ is Juniper's official Python library designed specifically for interacting with Junos devices via NETCONF.

267
Multi-Selecthard

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

Select 2 answers
A.YANG data models defining the structure and constraints of configuration and state data
B.Standardized management protocols such as NETCONF or gRPC/gNMI
C.Manual terminal emulation sessions using Telnet
D.Proprietary screen-scraping PERL scripts parsing raw CLI text
E.Physical serial port multiplexers
AnswersA, B

Correct. YANG models define structured data schemas.

Why this answer

Model-driven architecture relies on structured data models (YANG) and standardized transport protocols (NETCONF, gRPC).

268
MCQeasy

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

A.<terminate-session>
B.<close-session>
C.<disconnect>
D.<kill-session>
AnswerB

<close-session> gracefully closes the current NETCONF session.

Why this answer

The <close-session> RPC requests graceful termination of the NETCONF session.

269
Multi-Selecteasy

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

Select 2 answers
A.Elimination of all network documentation requirements
B.Mandatory requirement for physical console cables on every device
C.Consistent, repeatable deployments through automation and version control
D.Exclusive reliance on manual CLI configuration commands
E.Improved collaboration and shared ownership between network and software engineering teams
AnswersC, E

Correct. Version control and automation ensure repeatability.

Why this answer

DevOps brings increased agility, faster deployments, better visibility, and reduced human error through automation and version control.

270
MCQhard

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?

A.Creating a separate permanent branch for every physical router in the network and never merging them.
B.Locking the master branch for 12 months while developing a single monolithic configuration update offline.
C.Using tag-based releases exclusively without utilizing any version control branches.
D.Trunk-based development where developers merge small, frequent changes into a central main branch that drives automated pipelines.
AnswerD

Correct. Trunk-based development facilitates continuous integration and automated testing.

Why this answer

GitFlow and trunk-based development describe common branching models; trunk-based development or short-lived feature branches with continuous integration are standard for modern DevOps.

271
Multi-Selectmedium

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

Select 2 answers
A.They automatically compile Python scripts into binary executable files for Junos.
B.They allow installing specific versions of PyEZ, lxml, and Jinja2 independently of system Python.
C.They remove the need to install SSH clients on the local machine.
D.They enable direct root-level execution of Junos CLI commands on physical routers.
E.They isolate Python package dependencies for specific projects, preventing version conflicts.
AnswersB, E

Correct. Local package management gives version control.

Why this answer

Virtual environments isolate project dependencies and prevent version conflicts.

272
Multi-Selecthard

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

Select 2 answers
A.Direct packet capture on port 0
B.Check-only validation (verifying syntax without activating the configuration)
C.Confirmed commit (with timeout/rollback functionality)
D.Instant kernel bypass switching
E.Format hard disk partition primary
AnswersB, C

Correct. Check-only validates the config without committing it to production.

Why this answer

NETCONF commit options on Junos include confirmed commits, check-only validation, log messages, etc.

273
Multi-Selecteasy

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)

Select 2 answers
A.YAML
B.BMP
C.JSON
D.RTF
E.EXE
AnswersA, C

YAML is extensively used for playbooks, variable definitions, and configuration templates in tools like Ansible and PyEZ.

Why this answer

JSON and YAML are the primary lightweight data serialization formats universally utilized across modern network automation toolchains and APIs.

274
MCQeasy

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

A.<rpc-reply>
B.<response-data>
C.<xml-reply>
D.<netconf-response>
AnswerA

RFC 6241 specifies <rpc-reply> as the container for responses to <rpc> requests.

Why this answer

Every NETCONF response from a Junos device is wrapped in an <rpc-reply> tag.

275
Multi-Selectmedium

Which TWO configuration datastores are commonly supported and utilized when interacting with Junos devices via NETCONF? (Choose two)

Select 2 answers
A.startup
B.ephemeral
C.candidate
D.running
E.factory
AnswersC, D

The candidate datastore is where edits are staged before committing.

Why this answer

Junos primarily supports the candidate and running datastores for configuration management via NETCONF.

276
MCQhard

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?

A.They are converted to floating-point numbers.
B.They remain integer objects.
C.The parser raises a KeyError because JSON keys must be alphabetic.
D.They are converted to Python string objects.
AnswerD

Correct. JSON keys are strictly strings, so json.loads() converts them to string keys in Python.

Why this answer

JSON specification dictates that object keys must be strings. When json.loads() parses an object, any keys (even if numeric-looking) are converted to Python strings.

277
Multi-Selecthard

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

Select 3 answers
A.Using the PyEZ Config context manager to ensure locks are released and rollbacks occur on error
B.Hardcoding administrative passwords inside template files for easy rendering
C.Using try-except blocks to catch specific PyEZ exceptions like ConnectError and ConfigError
D.Avoiding device.close() calls to keep network sessions open permanently
E.Separating Jinja2 template files from core Python execution scripts
AnswersA, C, E

Correct. Context managers handle resource cleanup safely.

Why this answer

Best practices include proper exception handling, using context managers, and separating templates from logic.

278
MCQeasy

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

A.A JSON dictionary
B.An XML Element (lxml.etree)
C.A raw plain text string
D.A Python list of strings
AnswerB

Correct. PyEZ returns response data as an lxml Element object.

Why this answer

PyEZ RPC calls return an ElementTree object (XML Element) representing the response from the Junos device.

279
MCQhard

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?

A.dev.rpc.get_interface_information()
B.dev.get_config(format='xml')
C.dev.load(action='set', format='xml')
D.dev.execute_cli('show interfaces')
AnswerA

PyEZ allows executing RPCs either dynamically via dev.rpc.get_interface_information() or via dev.rpc('get-interface-information').

Why this answer

In Junos PyEZ, the dev.rpc() method is used to execute native Junos XML RPCs directly against the device and return the results as an ElementTree XML object.

280
MCQeasy

Which Junos automation tool utilizes NETCONF over SSH by default to manage network devices using Python libraries or configuration management frameworks?

A.The local Junos shell (sh) utility
B.Junos PyEZ
C.Wireshark packet analyzer
D.Junos Space Network Management Platform GUI
AnswerB

Correct. Junos PyEZ is a Python library designed for Junos that uses NETCONF over SSH by default.

Why this answer

Ansible, PyEZ, and NETCONF clients communicate with Junos using NETCONF over SSH by default.

281
MCQeasy

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

A.Python set
B.Complex number
C.Python tuple
D.Boolean
AnswerD

Correct. Boolean values (true and false) are natively supported primitive types in JSON.

Why this answer

JSON natively supports strings, numbers, booleans, null, arrays, and objects (dictionaries with string keys). Python tuples or sets are not natively supported.

282
Multi-Selecthard

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)

Select 3 answers
A.ConnectError exception for handling connection failures to the device
B.Config context manager (e.g., 'with Config(dev) as cu:') for handling configuration blocks
C.Docker container orchestration module for spinning up microservices
D.Playbook execution engine for running local bash shell scripts
E.Device class from 'jnpr.junos' for managing connections and sessions
AnswersA, B, E

ConnectError is a standard PyEZ exception raised when a connection cannot be established.

Why this answer

Junos PyEZ provides the Device class for connection management, the Config table/view context manager for configuration transactions, and exception handling classes like ConnectError.

283
Multi-Selectmedium

When comparing the workflow and capabilities of the Junos REST API versus NETCONF, which THREE statements are correct? (Choose three)

Select 3 answers
A.NETCONF requires explicit <lock> and <unlock> RPC workflows, whereas REST API abstracts transaction locking implicitly.
B.Junos REST API only supports JSON format, while NETCONF only supports binary streams.
C.NETCONF operates over TCP port 830 using an SSH subsystem, while Junos REST API operates over HTTP/HTTPS ports.
D.NETCONF does not support commit operations, whereas REST API automatically commits every keystroke.
E.Both protocols allow interaction with Junos configuration and operational databases.
AnswersA, C, E

NETCONF requires manual lock management, while REST API handles resource locking internally.

Why this answer

NETCONF uses SSH port 830 and XML RPCs with explicit candidate locking, whereas Junos REST API uses HTTP/HTTPS (port 3000/3443) and supports JSON and XML resource operations.

284
MCQeasy

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?

A.mgd (Management Daemon)
B.jails
C.rpd (Routing Protocol Daemon)
D.jsd (Junos Script Daemon)
AnswerA

mgd processes CLI, NETCONF, and Junos XML/JSON-RPC API requests.

Why this answer

MGD (Management Daemon) is the primary user interface handler in Junos OS. It processes CLI commands, Netconf XML requests, and JSON-RPC APIs, translating them into operations interacting with the Junos kernel and individual routing daemons via RRDS.

285
MCQhard

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?

A.The transaction fails because default-operation and element operations conflict.
B.The specific element operation ('merge') takes precedence over the transaction-level default-operation ('replace').
C.The device rolls back the configuration due to ambiguous parameters.
D.The default-operation takes precedence, ignoring the merge attribute.
AnswerB

Per-element attributes override the default-operation setting.

Why this answer

Per-element operation attributes override the default-operation specified at the transaction level.

286
MCQhard

A Python script receives a JSON payload from a Junos device containing 64-bit interface counter integers. When loaded using the standard 'json' module, the script experiences precision loss on counter values exceeding standard integer limits. Which alternative JSON parser package for Python should be used to handle high-precision integers without data degradation?

A.simplejson with use_decimal=True
B.corejson
C.xmljson
D.fastjson
AnswerA

Correct. simplejson supports parsing numbers into Python Decimal objects to prevent precision loss.

Why this answer

The 'ujson' (UltraJSON) or 'simplejson' libraries provide options like parse_float or parse_int to handle high-precision numbers. Specifically, simplejson supports a 'use_decimal=True' parameter to decode JSON numbers into Python Decimal objects.

287
MCQeasy

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

A.443
B.3443
C.8080
D.830
AnswerB

Port 3443 is the default TCP port for secure Junos REST API connections.

Why this answer

The default TCP port for secure HTTPS requests in the Junos REST API daemon (jpagent) is port 3443.

288
MCQmedium

An administrator wants to retrieve the configuration of a specific interface (e.g., ge-0/0/0) using the Junos REST API. Which URI structure is appropriate for fetching this configuration resource in JSON format?

A./rpc/get-config?interface=ge-0/0/0
B./netconf?subsystem=ge-0/0/0
C./api/operational/interfaces/ge-0/0/0
D./api/configuraton/interfaces/interface/name/ge-0/0/0
AnswerD

This follows the hierarchical Junos configuration REST path structure.

Why this answer

The Junos REST API uses structured paths matching the configuration hierarchy, typically prefixed by /api/configuraton/interfaces/interface/ge-0/0/0 or similar resource roots depending on the Junos release.

289
MCQeasy

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

A.They allow automation scripts to parse device output reliably without relying on brittle regular expressions.
B.Structured data formats take up less memory on the Junos Routing Engine hard drive.
C.They eliminate the need to authenticate when connecting via NETCONF or gRPC.
D.They automatically convert all IPv4 addresses to IPv6 format.
AnswerA

Correct. Structured data eliminates the need for complex, error-prone regex parsing of CLI text.

Why this answer

Structured data formats can be easily parsed programmatically without relying on fragile regular expressions.

290
MCQeasy

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

A.set system rest-api
B.set protocols rest
C.set management-plane api
D.set system services jpagent
AnswerD

The jpagent hierarchy manages REST API configuration settings.

Why this answer

The jpagent service is configured under the 'set system services jpagent' CLI hierarchy.

291
Multi-Selecthard

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

Select 3 answers
A.NETCONF maintains a persistent, stateful connection over an SSH session with capability exchanges.
B.NETCONF requires an HTTP web server running on port 80 to maintain session state.
C.NETCONF sessions automatically expire every 30 seconds if an interactive keystroke is not received.
D.Junos REST API relies on standard HTTP headers for authentication per request rather than maintaining an interactive shell session.
E.Junos REST API utilizes stateless HTTP request/response transactions.
AnswersA, D, E

NETCONF establishes a stateful SSH session with hello message capability exchanges.

Why this answer

NETCONF sessions are stateful, persistent SSH sessions requiring explicit greetings and channel management. Junos REST API requests operate over HTTP/HTTPS where each request is handled via stateless HTTP semantics, though underlying device sessions are managed by the jpagent daemon.

292
MCQhard

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?

A.Validating a shared secret token or HMAC cryptographic signature sent in the webhook request headers.
B.Opening TCP port 22 directly to the public internet without firewall rules.
C.Hardcoding the developer's Linux user password inside the webhook listener script.
D.Disabling all SSL/TLS certificates to allow unencrypted HTTP packet inspection.
AnswerA

Correct. Secret tokens and signatures ensure webhook authenticity.

Why this answer

Webhooks should be secured using secret tokens or HMAC signatures to ensure requests genuinely originate from the trusted VCS platform.

293
Multi-Selecteasy

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

Select 2 answers
A..xml
B..jsn
C..yaml
D..txt
E..yml
AnswersC, E

Correct. .yaml is a standard extension for YAML.

Why this answer

YAML files commonly use either .yaml or .yml file extensions.

294
MCQhard

When designing a custom PyEZ Table and View mapping in Python, what configuration parameter in the YAML definition file specifies the RPC or CLI command executed to gather the raw data?

A.get-rpc:
B.exec:
C.rpc:
D.command_string:
AnswerC

Correct. The rpc key in a Table YAML definition specifies the XML RPC tag name.

Why this answer

The 'rpc' or 'command' keyword in a PyEZ Table YAML definition specifies the underlying command to run.

295
MCQeasy

What is the default TCP port used by the Junos jpagent for unencrypted HTTP REST API connections?

A.80
B.830
C.8080
D.3000
AnswerD

Port 3000 is the default TCP port for unencrypted Junos REST API connections.

Why this answer

The Junos REST API daemon (jpagent) listens on TCP port 3000 by default for HTTP traffic, and port 3443 for HTTPS traffic.

296
MCQhard

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?

A.Writing custom Python scripts that use regex to parse 'show route' outputs on the fly.
B.Defining routing policies in Jinja2 templates and YAML data files, committing them to Git, and automatically pushing them via Ansible playbooks.
C.Manually logging into each router via SSH during a maintenance window to type out policy-options statements.
D.Using dynamic routing protocols like BGP to automatically advertise prefixes without human intervention.
AnswerB

Correct. Using templates, data files, version control, and automation tools embodies IaC.

Why this answer

IaC defines infrastructure in declarative configuration files stored in version control, allowing automated testing and deployment.

297
MCQmedium

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?

A.Disabling authentication in the script
B.Storing credentials in plaintext in a public GitHub repository
C.Hardcoding credentials in base64 encoding
D.Using SSH key-based authentication or environment variables/config files (.junodes)
AnswerD

Correct. PyEZ supports SSH keys and standard credential management practices.

Why this answer

PyEZ natively supports configuration files like ~/.junodes or passing parameters dynamically, but also respects environment variables or SSH keys.

298
MCQmedium

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

A.A standard Linux kernel panic log string.
B.An HTTP 400 Bad Request status code.
C.A syslog message printed directly to the terminal emulator.
D.An <rpc-error> element containing diagnostic sub-elements like <error-message> and <error-tag>.
AnswerD

NETCONF protocol defines structured <rpc-error> XML blocks for reporting faults.

Why this answer

NETCONF errors are returned inside an <rpc-error> element containing details such as error-type, error-tag, and error-message.

299
Multi-Selecteasy

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

Select 2 answers
A.The client uses the hello message to lock the configuration database before session initialization.
B.The client hello message must include the list of YANG modules it intends to modify during the session.
C.Both client and server exchange capabilities using XML elements containing URI strings.
D.The server hello message includes a session ID attribute assigned to the NETCONF session.
E.The hello message exchange is optional if a pre-shared SSH key is used for authentication.
AnswersC, D

Capabilities are advertised inside the <capabilities> element using specific capability URIs.

Why this answer

During the initial NETCONF hello message exchange, both the client and server advertise their supported capabilities using URIs, and the session ID is assigned by the server.

300
MCQeasy

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

A.http://xml.juniper.net/junos/rpc/v1
B.urn:ietf:params:netconf:base:1.0
C.netconf:params:xml:ns:netconf:base:2.0
D.urn:juniper:params:netconf:ssh:1.0
AnswerB

The base NETCONF capability URI is exchanged in the initial hello messages.

Why this answer

NETCONF capabilities are exchanged in <hello> messages at session startup, referencing URIs like urn:ietf:params:netconf:base:1.0.

Page 3

Page 4 of 5

Page 5

All pages