JNCIA-DevOps Python And PyEZ Practice Question
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?
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.close()
The .close() method terminates the NETCONF session cleanly.
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.close()
Why this is correct
Correct. dev.close() cleanly shuts down the NETCONF session.
- ✗
dev.terminate()
Why it's wrong here
Incorrect. terminate is not a valid method.
- ✗
dev.end_session()
Why it's wrong here
Incorrect. end_session is not a valid method.
- ✗
dev.disconnect()
Why it's wrong here
Incorrect. The method is close().
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 →
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.