JN0-224 practice question 14 of 15
What are two Junos PyEZ configuration object methods? (Choose two.)
Full set: 66 questionsThe Junos PyEZ library provides a Config utility object, typically accessed via the config property of a Device instance (e.g., dev.config). This utility simplifies managing device configurations. The standard workflow for making configuration changes mirrors the Junos CLI process: lock the candidate configuration, load changes, commit the changes, and unlock. The lock() method is used to gain an exclusive lock on the candidate configuration database, preventing other users from making changes. The commit() method is used to check and activate the changes from the candidate configuration into the active running configuration.
B. device () Device is the primary class used to establish a connection to a Junos device, not a method of the configuration object.
D. config () config is the property of a Device object that returns the Config utility instance; it is not a method called on the Config object itself.
1. Juniper Networks TechLibrary, Junos PyEZ Developer Guide, "Using the Configuration Utilities": This document outlines the standard procedure for modifying the configuration using Junos PyEZ. It explicitly states, "To modify the configuration, you must first lock the configuration database... After you load and commit the configuration, you must unlock the database." It provides code examples showing the use of cu.lock() and cu.commit(), where cu is an instance of the Config utility. (Source: Junos PyEZ Developer Guide, Chapter: "Managing the Configuration").
2. Juniper Networks, Junos PyEZ API Reference, junos.utils.config.Config: The official API documentation for the Config class lists its available methods. The list includes lock(timeout=30) and commit(comment=None, timeout=300, detail=False, kwargs), confirming these are valid methods of the configuration object. The methods device() and config() are not listed as part of this class. (Source: Junos PyEZ API Reference, Module: junos.utils.config, Class: Config).
Keep practicing
Take the free JN0-224 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other JN0-224 practice questions
- Question 1You want to use a Python package or module. In this scenario, which statement would accom…
- Question 2Which two data structures are used in JSON? (Choose two.)
- Question 3You are asked to use the REST API to retrieve interface configuration information from yo…
- Question 4Which two statements are valid regarding Junos automation? (Choose two.)
- Question 5Which data construct is used to guarantee that element names and data values remain uniqu…
- Question 6Which statement is correct about DevOps?
