JNCIA-DevOps Python And PyEZ Practice Question
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?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
from jnpr.junos.device import Device
The Device class from the jnpr.junos module is the foundational class used in PyEZ to manage connections and sessions with Junos devices.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
from jnpr.junos.rpcs import RPC
Why it's wrong here
Incorrect. The RPC module is used for executing XML RPCs, not for initializing the connection object.
- ✗
from jnpr.junos.facts import Facts
Why it's wrong here
Incorrect. Facts are gathered via a method on the Device object, not instantiated directly as a connection target.
- ✓
from jnpr.junos.device import Device
Why this is correct
Correct. The Device class is imported directly from jnpr.junos.device to create the connection handle.
- ✗
from jnpr.junos.utils.sw import SW
Why it's wrong here
Incorrect. The SW utility is used for software management, not for initial connection establishment.
About these practice questions
Courseiva writes every JNCIA-DevOps question from scratch — 307 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Juniper Networks exam blueprint
This JNCIA-DevOps practice question is part of Courseiva's free Juniper Networks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the JNCIA-DevOps exam.