Cisco CCNA Automation 200-901 Practice Test Questions and Exam Dumps Part5 Q81-100

View Full Cisco CCNA Automation 200-901 Exam Dumps and Practice Test Dumps.

 

Question 81

Which protocol is commonly used to retrieve structured network configuration data from a device using YANG models?

  1. NETCONF
  2. FTP
  3. Telnet
  4. SMTP

Correct Answer: 1

Explanation

NETCONF is a network-management protocol designed for programmatic access to configuration and operational data. It commonly works with YANG data models and uses XML-based RPC messages to perform operations such as retrieving configuration, editing configuration, validating changes, and committing updates. This model-driven approach allows automation applications to interact with network devices using structured information rather than relying exclusively on CLI output. FTP is used for file transfer, Telnet provides remote terminal access, and SMTP handles email transmission. Therefore, NETCONF is the appropriate protocol for structured network configuration using YANG models.

Question 82

Which protocol provides a RESTful interface for interacting with YANG-modeled network data?

  1. NETCONF
  2. RESTCONF
  3. TFTP
  4. SNMP

Correct Answer: 2

Explanation

RESTCONF provides an HTTP-based RESTful interface for accessing and manipulating YANG-modeled configuration and operational data. It combines REST principles with standardized network data models, allowing automation applications to use familiar HTTP methods such as GET, POST, PUT, PATCH, and DELETE when supported. NETCONF also works with YANG but uses XML-based RPC operations rather than a RESTful HTTP interface. TFTP provides simple file transfer, while SNMP is commonly used for network monitoring and management. Therefore, RESTCONF is the correct protocol for REST-style interaction with YANG-modeled network data.

Question 83

Which data modeling language is commonly used by NETCONF and RESTCONF to describe network configuration and operational data?

  1. YAML
  2. JSON
  3. YANG
  4. CSV

Correct Answer: 3

Explanation

YANG is a data modeling language specifically designed to describe configuration and operational data for network-management systems. NETCONF and RESTCONF can use YANG models to provide a structured representation of network resources such as interfaces, routing information, and system settings. YAML and JSON are data serialization formats, although JSON may be used to represent YANG-modeled data through RESTCONF. CSV is primarily used for tabular data. YANG defines the structure, relationships, constraints, and semantics of the modeled network information. Therefore, YANG is the correct answer.

Question 84

Which NETCONF operation retrieves configuration and state information from a network device?

  1. <get>
  2. <commit>
  3. <lock>
  4. <close-session>

Correct Answer: 1

Explanation

The NETCONF <get> operation is used to retrieve both configuration and operational state information from a network device. It can be used to request information from supported data stores and operational data depending on the implementation. <commit> applies candidate configuration changes to the running configuration in systems that support the candidate datastore. <lock> prevents other sessions from modifying a datastore while it is locked, and <close-session> terminates the NETCONF session. Therefore, <get> is the appropriate operation for retrieving configuration and state information.

Question 85

Which NETCONF operation is used to apply candidate configuration changes to the running configuration?

  1. <discard-changes>
  2. <commit>
  3. <get-config>
  4. <validate>

Correct Answer: 2

Explanation

The NETCONF <commit> operation is used to apply changes from the candidate configuration datastore to the running configuration on devices that support the candidate configuration capability. This provides a structured workflow in which changes can be prepared, reviewed, validated, and then committed. <discard-changes> removes uncommitted candidate changes, <get-config> retrieves configuration data, and <validate> checks whether configuration is valid according to supported rules. The candidate-and-commit model can help reduce accidental partial configuration changes. Therefore, <commit> is the correct NETCONF operation for applying candidate changes.

Question 86

Which NETCONF operation can be used to discard uncommitted changes in the candidate configuration?

  1. <lock>
  2. <discard-changes>
  3. <commit>
  4. <get>

Correct Answer: 2

Explanation

The NETCONF <discard-changes> operation removes pending modifications from the candidate configuration datastore and restores it to the previous committed state. This is useful when an administrator or automation application determines that proposed changes should not be applied. The <commit> operation applies candidate changes, <lock> controls access to a datastore, and <get> retrieves information. Using candidate configuration with explicit commit or discard operations can provide greater control over automated configuration workflows. Therefore, <discard-changes> is the appropriate operation for removing uncommitted candidate changes.

Question 87

Which YANG statement defines a single scalar data value such as an interface description?

  1. list
  2. container
  3. leaf
  4. grouping

Correct Answer: 3

Explanation

The YANG leaf statement defines a single data value. Examples include an interface description, hostname, IP address, Boolean setting, or numeric parameter. A leaf includes a data type that determines what kind of value it can contain. A container organizes related child nodes, a list represents multiple instances of structured data, and a grouping defines reusable sets of schema nodes. In network automation, leaf nodes are frequently accessed or modified when applications interact with YANG-modeled data through NETCONF or RESTCONF. Therefore, leaf is the correct answer.

Question 88

Which YANG structure represents a collection of related child nodes grouped under a single logical object?

  1. Container
  2. Leaf
  3. RPC
  4. Notification

Correct Answer: 1

Explanation

A YANG container groups related child data nodes into a logical structure. For example, a container might organize several parameters associated with a network interface or system service. Containers help create a hierarchical and understandable data model. A leaf represents one value, while RPC and notification statements have different purposes related to operations and event reporting. In network automation, containers allow applications using NETCONF or RESTCONF to navigate structured configuration and operational data. Therefore, the container structure is appropriate for grouping related child nodes under a logical object.

Question 89

Which YANG construct represents an operation that can be invoked by a client?

  1. Leaf
  2. Action
  3. Container
  4. Typedef

Correct Answer: 2

Explanation

The YANG action statement represents an operation that can be invoked by a client on a particular data node. Actions can be used to model operations that are not simply configuration changes, such as initiating a supported device operation. This provides a standardized way for management applications to invoke modeled operations through supported protocols. A leaf represents a data value, a container groups data nodes, and a typedef defines a reusable type definition. Therefore, action is the YANG construct associated with an invokable operation.

Question 90

Which YANG construct is designed to describe an event notification sent from a device to a management application?

  1. Action
  2. Leaf
  3. Notification
  4. Container

Correct Answer: 3

Explanation

The YANG notification statement defines event information that can be sent from a device to a management application. Notifications can describe events such as state changes, alarms, or other operational conditions modeled by the device. This differs from an action, which is invoked by a client to request an operation. A leaf represents an individual data value, while a container organizes related data nodes. Notifications are important in model-driven management because they can allow management systems to react to events rather than relying exclusively on periodic polling. Therefore, notification is the correct YANG construct.

Question 91

Which network automation method typically involves directly sending commands to a device CLI over SSH?

  1. CLI-based automation
  2. Model-driven telemetry
  3. REST API
  4. NETCONF

Correct Answer: 1

Explanation

CLI-based automation uses software to connect to a network device’s command-line interface and execute commands, commonly through SSH. Automation libraries and frameworks can send commands, collect output, and perform configuration tasks. Although CLI automation can be useful, the returned output may be designed for human readability rather than structured machine processing. REST APIs, NETCONF, and other model-driven methods generally provide more structured interfaces. Model-driven telemetry is focused on streaming operational data rather than sending CLI commands. Therefore, CLI-based automation is the approach that directly interacts with the device CLI over SSH.

Question 92

Which automation approach uses structured models rather than relying primarily on human-readable CLI output?

  1. Model-driven automation
  2. Console automation
  3. Keyboard macros
  4. Manual configuration

Correct Answer: 1

Explanation

Model-driven automation uses structured data models to describe configuration and operational information. Technologies such as YANG, NETCONF, and RESTCONF allow automation systems to interact with network resources in a predictable, machine-readable way. This can reduce the need to parse human-oriented CLI output and can make automation workflows more consistent. Console automation and keyboard macros depend heavily on interactive interfaces, while manual configuration requires direct administrator involvement. Therefore, model-driven automation is the approach that relies on structured models rather than primarily interpreting CLI text.

Question 93

Which Python library is commonly used to make REST API calls over HTTP and HTTPS?

  1. Requests
  2. Paramiko
  3. PyYAML
  4. NumPy

Correct Answer: 1

Explanation

The Python Requests library provides a straightforward interface for sending HTTP and HTTPS requests. Automation developers commonly use it to interact with REST APIs by performing operations such as GET, POST, PUT, PATCH, and DELETE. Requests can also handle headers, authentication information, parameters, request bodies, and response processing. Paramiko focuses on SSH communication, PyYAML is commonly used for YAML parsing, and NumPy is primarily a numerical-computing library. Therefore, Requests is the appropriate Python library for making REST API calls over HTTP and HTTPS.

Question 94

Which Python library can be used to parse YAML configuration files?

  1. PyYAML
  2. Paramiko
  3. Requests
  4. Flask

Correct Answer: 1

Explanation

PyYAML is a Python library commonly used to parse and generate YAML data. Automation programs can use it to read configuration files containing structured information such as device inventories, variables, credentials references, or automation parameters. YAML is frequently used in automation frameworks because it is relatively human-readable and supports hierarchical structures. Paramiko provides SSH capabilities, Requests handles HTTP communication, and Flask is a web application framework. Therefore, PyYAML is the appropriate library when a Python automation program needs to process YAML configuration data.

Question 95

Which Python feature allows a function to receive values supplied by the caller?

  1. Parameters
  2. Comments
  3. Modules
  4. Exceptions

Correct Answer: 1

Explanation

Function parameters allow a Python function to receive values supplied by the caller. Parameters make functions reusable because the same function can perform an operation using different inputs. For example, an automation function could accept a device IP address, username, or configuration value as parameters rather than hard-coding those values. Comments document code, modules provide reusable code collections, and exceptions represent runtime error conditions. Using parameters effectively can help network automation developers create modular and maintainable programs that work with many devices or different data sets.

Question 96

Which Python statement is used to send a value back from a function to the calling code?

  1. yield
  2. return
  3. continue
  4. break

Correct Answer: 2

Explanation

The return statement sends a value from a Python function back to the code that called the function. In network automation, a function might connect to a device, retrieve information, process an API response, and return the resulting data to the main program. yield is associated with generators, continue skips to the next iteration of a loop, and break terminates a loop. Returning values allows automation programs to separate individual operations into reusable functions and then combine their results into larger workflows. Therefore, return is the correct statement.

Question 97

Which Python keyword is used to define a function?

  1. function
  2. define
  3. def
  4. func

Correct Answer: 3

Explanation

Python uses the def keyword to define a function. A function definition specifies the function name, parameters, and the block of code that should execute when the function is called. Functions are important in automation because they allow developers to organize repetitive tasks into reusable components. For example, a developer can create a function that retrieves device information and call it for many devices. function, define, and func are not Python keywords used to define standard functions. Therefore, def is the correct answer.

Question 98

Which practice helps prevent sensitive API credentials from being hard-coded directly into automation scripts?

  1. Store credentials securely using secrets management
  2. Publish credentials in comments
  3. Put passwords directly in source code
  4. Use the same password everywhere

Correct Answer: 1

Explanation

Secure secrets management helps prevent sensitive information such as API tokens, passwords, and private keys from being embedded directly in source code. Credentials can instead be stored using mechanisms such as encrypted secret stores, environment variables, Ansible Vault, or other supported secrets-management systems. Hard-coding credentials creates security risks because source code may be copied, shared, or committed to version-control systems. Publishing credentials in comments or reusing the same password across systems increases exposure. Therefore, securely managing secrets is the appropriate practice for protecting automation credentials.

Question 99

Which version-control system is widely used to track changes to automation scripts and configuration files?

  1. Git
  2. DHCP
  3. DNS
  4. NTP

Correct Answer: 1

Explanation

Git is a distributed version-control system widely used to track changes to source code, automation scripts, templates, and configuration files. It allows developers to maintain history, compare changes, create branches, collaborate with others, and revert to earlier versions when necessary. These capabilities are especially valuable in network automation because configuration logic can evolve rapidly and multiple engineers may work on the same automation project. DHCP provides dynamic addressing, DNS provides name resolution, and NTP synchronizes time. Therefore, Git is the appropriate technology for version-controlling automation code and configuration artifacts.

Question 100

Which automation practice helps ensure that changes to network automation code are reviewed before being merged into a shared codebase?

  1. Pull request review
  2. Telnet access
  3. Manual console logging
  4. DHCP renewal

Correct Answer: 1

Explanation

Pull request review is a common software-development practice in which proposed changes are reviewed before being merged into a shared codebase. In network automation projects, this can help identify coding errors, incorrect configuration logic, security problems, and unintended behavior before automation is executed in production. Version-control platforms can provide comments, approvals, automated checks, and change history as part of this process. Telnet access, console logging, and DHCP renewal do not provide a structured code-review workflow. Therefore, pull request review is an important practice for maintaining quality and reducing risks in collaborative automation development.