Juniper JN0-220 (JNCIA – DEVNET) Practice Test Questions With Answers

JNCIA - DEVNET Jn0-220 Exam Questions Techhyme

The Automation and DevOps certification track enables you to demonstrate competency in common scripting languages and tools for automating device and network functions.

Also Read:

JNCIA-DEVNET, the associate-level certification in this track, is designed for networking professionals with introductory-level knowledge of automation tools and best practices.

Q1) You are creating a Python data type that contains a collection of multiple ordered values. As part of your script, you must make changes to the values that are stored in your data type. In this scenario, which data type should you use?

A. list
B. tuple
C. dictionary
D. set

Answer: A

Q2) Which statement is correct about Ansible? (Choose two.)

A. Ansible core modules for the Junos OS are developed by Ansible developers
B. Ansible Galaxy modules for the Junos OS are developed by Juniper Networks developers
C. Ansible Galaxy modules for the Junos OS and Ansible core modules for the Junos OS can coexist on the same
control machine
D. Ansible Galaxy modules for the Junos OS and Ansible core modules for the Junos OS cannot coexist on the same
control machine

Answer: A, C

Q3) Which statement is correct about Python variables once they are created?

A. A global variable can only be used by functions that are defined later
B. All variables in Python can be used by any function within the script
C. A global variable can be used by any function within the script
D. A global can only be used within the function that created it

Answer: C

Q4) Which two statements are correct about XML? (Choose two.)

A. XML is used to send an event notification to a client
B. XML is used to issue Junos operational commands
C. XML is used to view or modify a Junos configuration
D. XML is used to create a communications session to a remote device

Answer: B, C

Q5) Which statement is true about YAML?

A. YAML is a Unicode‐based serialization language designed around common data types
B. YAML is designed around parsing speed over human readability
C. YAML is widely used on the Internet as a method to mode data between webservers and AJAX clients on Web browsers
D. YAML follows the lowest common denominator data types and requires simple processing between different
programming environments

Answer: A

Q6) Which statement is true about using Ansible a Junos device?

A. The Junos device does not have an Ansible agent installed
B. SFTP must be used to allow communication between the Ansible control server and the Junos device
C. An Ansible playbook is a set of tasks written in XML
D. Ansible modules are copied and executed on the Junos device

Answer: A

Q7) According to the Manifesto for Agile Software Development, what is a principle of this development practice?

A. Software development cycles should be based on a quarterly time frame
B. Software development cycles should be scheduled on an annual time frame
C. After the development cycle has begun, new software requirements should not be added
D. After the development cycle has begun, new software requirements can be added at any point

Answer: D

Q8) Click the Exhibit button.
<hello>
<capability>
</hello>
The exhibit demonstrates the output from which type of session?

A. REST API
B. Ansible
C. PyEZ
D. NETCONF

Answer: D

Q9) What are two XML elements of the NETCONF Message layer? (Choose two.)

A. <lock>
B. <unlock>
C. <rpc>
D. <rpc‐reply>

Answer: C, D

Q10) Which two statements regarding NETCONF are true? (Choose two.)

A. NETCONF is a standardized protocol and works with multiple vendors’ devices
B. NETCONF operations are processed by the jsd process
C. NETCONF is a proprietary protocol and works only with Junos devices
D. NETCONF operations are processed by the mgd process

Answer: A, D

Q11) Which Python operator tests two variables to see if they contain the same value?

A. !=
B. != =
C. ==
D. =

Answer: C

Q12) Which two actions are performed by the PyEZ Python script shown in the exhibit? (Choose two.)
from jnpr.junos import Device
from jnpr.junos.utils.config import Config
from jnpr.junos.exception import ConnectError
host = ‘dcla.example.com’
def main():
dev = Device(host=host)
try:
dev.open()
except ConnectError as err:
print (“Cannot connect to device: {0}”.format(err))
return
cu = Config(dev)
try:
rescue = cu.rescue(action= ”get”, format = “text”)
if rescue is None:
print (“No existing rescue configuration.”)
print (“Saving rescue configuration.”)
cu.rescue(action=”save”)
else:
print (“Rescue configuration foundz”)
print (rescue)
except Exception as err:
print (err)
dev.close()
if _pame_ == “_main_”:
main()

A. It saves the current configuration as a rescue configuration only if one does not exist
B. It prints the rescue configuration if one already exists
C. It prints the rescue configuration after it has been replaced
D. It always saves the current configuration as a rescue

Answer: A, B

Q13) You are enabling HTTPS for the REST API on a Junos device. You are using a self‐signed SSL certificate and must ensure that the commit does not fail. In this scenario, which certificate must be provided for HTTPS?

A. client certificate
B. server certificate
C. PKI certificate
D. SSH certificate

Answer: B

Q14) You have enabled REST API trace options on your Junos device. Where does Junos store the associated log files in this scenario?

A. /var/chroot/rest‐api/var/log
B. /var/home
C. /var/tmp
D. /var/log

Answer: A

Q15) Which feature of Ansible provides encrypted files to house sensitive data such as login credentials and keys?

A. Ansible default feature
B. Ansible Vault
C. Ansible Galaxy
D. Ansible Tower

Answer: B

Q16) Which two statements are true regarding JSON? (Choose two.)

A. JSON can be used to evaluate conditional statements
B. JSON can be used to perform programming loops
C. JSON can be used to structure data
D. JSON can be used to format data between a client and a server

Answer: C, D

Q17) What is the default REST HTTPS port used on a Junos device?

A. 3000
B. 8443
C. 3443
D. 443

Answer: C

Q18) Which statement is correct about Python?

A. Python automatically deletes unused objects from memory
B. The Python interpreter is written in Java
C. Python behavior is influenced by the host OS
D. Python code must be compiled on a Junos device

Answer: A, C

Q19) What are two benefits of a DevOps approach? (Choose two.)

A. to reduce deployment anxiety
B. to reduce the number of managed objects
C. to quickly integrate software updates
D. to reduce the number of configuration releases

Answer: A, C

Q20) What does the statement “Ansible provides idempotent operations.” mean?

A. The result of performing the operation once is exactly the same as the result of performing it repeatedly
without any intervening actions.
B. The result of performing the operation once is not exactly the same as the result of performing it repeatedly
without any intervening actions.
C. The result of performing the operation once will not allow the operation to be run again without any intervening
actions to correct the failure.
D. The result of performing the operation once will not allow the operation to be run again without any intervening
actions.

Answer: A

Q21) What are two characteristics found in a modern DevOps environment? (Choose two.)

A. The development and operations environments are identical
B. The development and operations environments are different
C. The DevOps practice relies heavily on the use of physical hardware
D. The DevOps practice relies heavily on the use of virtualization

Answer: B, D

Q22) Which two Junos platforms support the REST API? (Choose two.)

A. SRX Series
B. ACX Series
C. EX Series
D. MX Series

Answer: A, D

Q23) Which Junos process handles automation requests involving the XML API, YANG, the REST API, and SNMP functions?

A. chassisd
B. rpd
C. jsd
D. mgd

Answer: D

Q24) Click the Exhibit button. Which YAML form is represented in the exhibit?

A. a mapping
B. a set
C. a tuple
D. a sequence

Answer: B

Q25) Which Junos process is responsible for handling automation requests involving the JET API?

A. mgd
B. dcd
C. rpd
D. jsd

Answer: D

Q26) Which automation tool provides closed‐loop automation and event‐driven infrastructure?

A. Ansible
B. Salt
C. Chef
D. Puppet

Answer: B

Q27) Your manager wants you to use Ansible to upgrade your Junos devices to the current JTAC supported release. Which two modules would you use to accomplish this task? (Choose two.)

A. junos_package
B. junos_config
C. juniper_junos_system
D. juniper_junos_software

Answer: A, D

Q28) Click the Exhibit button.
Referring to the exhibit, what is printed when you execute the python print (a[3]) command?
a = [1,4,5,2,3,8,7,9]

A. 2
B. 8
C. 0
D. 5

Answer: A

Q29) You want to restrict access to the REST API on a Junos device? What are two ways to accomplish this task? (Choose two.)

A. Enable a maximum number of connections
B. Restrict access by the source MAC address
C. Restrict access by the source IP address
D. Enable a schedule of specific access times

Answer: A, C

Q30) What are two components of continuous integration and continuous delivery? (Choose two.)

A. to use a version control system
B. to have a large consolidated code delivery
C. to allocate time at the end of the project for testing
D. to have the ability to fork or merge code branches

Answer: A, B, D

Q31) Which protocol supports the GET and POST methods?

A. HTTP
B. XML
C. JSON
D. YAML

Answer: A

Q32) Which two commands would be used to view the interface configuration on a Junos device in JSON format? (Choose two.)

A. user@router> show configuration interfaces | match json
B. user@router> show configuration interfaces | display json
C. [edit] user@router# show interfaces | display json
D. [edit] user@router# show interfaces | match json

Answer: B, C

Q33) The Junos CLI communicates directly with which API?

A. REST API
B. JET API
C. SNMP API
D. XML API

Answer: D

Q34) You are asked to securely copy a software image to a remote device using a Python script. Which PyEZ module would you use to perform these changes?

A. utils
B. config
C. ftp
D. scp

Answer: D

Q35) What is considered the foundation for DevOps success?

A. sharing
B. automation
C. culture
D. measurement

Answer: C

Q36) Which two statements are true for Network Reliability Engineering (NRE)? (Choose two.)

A. NRE is a proactive process against network failures and monitors every meaningful performance indicator
B. NRE focuses on customer satisfaction instead of service functionality
C. NRE embraces failure and ensures that the same failure does not happen again
D. NRE provides an understanding that the network is separate from its connected systems and applications

Answer: A, C

Q37) The REST API retrieves data from a connected device in which two formats? (Choose two.)

A. XML
B. YAML
C. binary
D. JSON

Answer: A, D

Q38) Which statement is correct about automation?

A. Automation increases the amount of time it takes to retrieve information from a large number of devices
B. Automation reduces the costs of managing a large number of devices
C. Automation increases the number of commands in the CLI
D. Automation increases the amount of time needed to make changes to large numbers of devices

Answer: B

Q39) What is Python?

A. Python is a product developed by Juniper to facilitate automation
B. Python is the name of a switch that Juniper sells
C. Python is the name of a router that Juniper sells
D. Python is a programming language

Answer: D

Q40) Which statement is correct about Python?

A. The Python interpreter is written using the Visual Basic programming language
B. Python strictly enforces the use of indentation and white space
C. Python requires that you manually delete unused objects from memory
D. Python behavior is influenced by the host OS

Answer: D

Q41) The REST API uses which two protocols for transport? (Choose two.)

A. HTTPS
B. HTTP
C. TELNET
D. SSH

Answer: A, B

Q42) YAML was designed as a superset of which format?

A. XML
B. XSD
C. Ansible
D. JSON

Answer: D

Q43) Given the <name> username </name> XML code, what is the entire string, including the opening and closing tags, called?

A. element node
B. name node
C. text node
D. data node

Answer: A

Q44) Ansible code modules are typically written in which language?

A. SLAX
B. Python
C. YAML
D. XML

Answer: B

Q45) PyEZ is an extension library for which programming tool?

A. Ruby
B. Puppet
C. Chef
D. Python

Answer: D

Q46) a = list()
a.append(2)
a.append(4)
a.append(6)
b = a
a[0] = 5
print(B)

A. [5]
B. [5,4,6]
C. [5,2,4,6]
D. [2,4,6]

Answer: B

Q47) What are two data structures in JSON? (Choose two.)

A. objects
B. array
C. string
D. number

Answer: A, B

Q48) Which two commands belong to the NETCONF Operation layer? (Choose two.)

A. <commit>
B. <rpc>
C. <rpc‐reply>
D. <get>

Answer: A, D

Q49) You need to retrieve the last_reboot_reason value from a Junos device. Which Ansible Galaxy library module is used to accomplish this task?

A. juniper_junos_rpc
B. juniper_junos_config
C. juniper_junos_command
D. juniper_junos_facts

Answer: D

Q50) Which two statements are true about data structures? (Choose two.)

A. YAML is human readable and supports serializing arbitrary native data structures
B. YAML follows the lowest common denominator data types and requires simple processing between different
programming environments
C. JSON is language dependent, which uses conventions that are familiar to programmers of languages like C, C++,
Java, Perl, and Python
D. JSON is simple to generate and parse, though human readability is sacrificed

Answer: A, D

Q51) Which statement is correct about Ansible playbooks?

A. A playbook is a collection of tasks to be performed on the host.
B. A playbook is called by multiple Python modules.
C. A playbook is a specific Python module that is executed on a host.
D. A playbook is a collection of host files?

Answer: A

Q52) Click the Exhibit button.
Referring to the exhibit, what is being represented?
<subject>
<name>subject‐1</name>
<section>
<name>section‐1</name>
</subject>

A. XML document
B. JSON document
C. Python coding
D. Ruby coding

Answer: A

Q53) An XML schema definition file uses which extension?

A. .tar
B. .xml
C. .xls
D. .xsd

Answer: D

Q54) How does YAML differ from JSON in data interchange formats?

A. YAML supports comments
B. JSON is language specific
C. JSON is a superset of YAML
D. YAML is not indentation aware

Answer: A

Q55) Which type of command is show interfaces | display xml?

A. an XML command
B. a CLI command
C. a SLAX command
D. an XLST command

Answer: B

Q56) You are asked to gather interface information from a Junos device. Your environment supports the JSON format. To determine how interface information is represented, you decide to view all of the configured interface key‐value pairs in the current Junos candidate configuration. In this scenario, which command will provide the information that you need?

A. user@router# show interfaces | find json
B. user@router# show interfaces | display json
C. user@router# show interfaces | except json
D. user@router# show interfaces | match json

Answer: B

Q57) Which two statements about the XML API are true? (Choose two.)

A. The XML API can only be used by off‐box automation tools
B. The XML API on‐box solutions leverage the NETCONF protocol
C. The XML API can be used by on‐box and off‐box automation tools
D. The XML API off‐box solutions leverage the NETCONF protocol

Answer: C, D

Q58) You are asked to update a PyEZ script that will check for errors when connecting or loading configurations on a Junos device. Which two command statements should be added to the script to accomplish this task? (Choose two.)

A. elseif statement
B. try statement
C. else statement
D. except statement

Answer: B, D

Q59) Which pipe command is used to show the XML response to a Junos CLI command?

A. | display xml
B. | match xml
C. | compare xml
D. | find xml

Answer: A

Q60) Which statement is true regarding Python?

A. To obtain functionality from a package, it must be imported using the Python keyword module
B. A Python set is an ordered collection of unique elements
C. Python 3.x is not fully backwards compatible with Python 2.x
D. An object within a Python tuple can be modified

Answer: C

Q 61) Which service is needed for Ansible to function on a Junos device?

A. FTP
B. NETCONF
C. HTTPS
D. Telnet

Answer: B

Q62) You are automating your Junos devices using NETCONF. Which two actions will help to accomplish this task? (Choose two.)

A. Enable the NETCONF service
B. Specify the YAML version
C. Specify the transport protocol for NETCONF
D. Enable SSH access for the root user

Answer: A, C

Q63) What is the correct command to enable the REST API Explorer on a Junos device?

A. set system services rest http
B. set system services web‐management http
C. set system services web‐management webapi https default‐certificate
D. set system services rest enable‐explorer

Answer: D

Q64) Which statement is correct about Ansible playbooks?

A. A playbook is a configuration file that defines the Ansible related parameters
B. A playbook contains one or more tasks written in XML
C. A playbook can contain multiple tasks and execute multiple Python modules
D. A playbook is a specific Python module that is executed on a host

Answer: C