Courseiva
Junos Automation Stack And DevOps ConceptshardMultiple ChoiceObjective-mapped

JNCIA-DevOps Junos Automation Stack And DevOps Concepts Practice Question

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?

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

dev.rpc.get_interface_information()

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.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • dev.rpc.get_interface_information()

    Why this is correct

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

  • dev.get_config(format='xml')

    Why it's wrong here

    get_config retrieves the device configuration, not operational state statistics.

  • dev.load(action='set', format='xml')

    Why it's wrong here

    The load method is used for pushing configuration changes, not retrieving operational state.

  • dev.execute_cli('show interfaces')

    Why it's wrong here

    execute_cli returns raw string output, which violates the best practice of using structured RPCs.

About these practice questions

One of 307 original JNCIA-DevOps practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.