View Full Cisco CCNA Automation 200-901 Exam Dumps and Practice Test Dumps.
Question 21
Which HTTP method is commonly used to partially modify an existing resource in a REST API?
- GET
- DELETE
- PATCH
- HEAD
Correct Answer: 3
Explanation
The HTTP PATCH method is commonly used to partially modify an existing resource. In network automation, PATCH can be useful when an application needs to change only selected attributes of a configuration object without replacing the entire resource. GET is normally used to retrieve information, DELETE removes a resource, and HEAD requests response headers without normally returning the complete response body. The exact behavior of HTTP methods depends on the API implementation, but PATCH is generally associated with partial updates in RESTful systems. Understanding these methods helps automation developers interact with APIs correctly and avoid unintended configuration changes.
Question 22
Which HTTP status code commonly indicates that a new resource was successfully created?
- 201
- 403
- 404
- 500
Correct Answer: 1
Explanation
HTTP status code 201, “Created,” commonly indicates that an API request successfully created a new resource. For example, a network automation application might send a POST request to create a new object, and the API could respond with status 201 when the operation succeeds. Status 403 indicates that the server understood the request but refuses to authorize it, 404 indicates that the requested resource was not found, and 500 indicates an internal server error. Automation scripts should inspect response codes so they can distinguish successful resource creation from authentication, authorization, or server-side problems.
Question 23
Which Python module is commonly used to parse and generate JSON data?
- socket
- json
- random
- time
Correct Answer: 2
Explanation
Python’s built-in json module provides functions for encoding Python objects into JSON and decoding JSON into Python objects. This is especially useful in network automation because REST APIs frequently exchange information using JSON. For example, an automation script can use the module to process a JSON API response and access values such as device names, interface states, or IP addresses. The socket module provides networking functionality, random generates pseudo-random values, and time provides time-related functions. Therefore, the json module is the appropriate choice for processing JSON information in Python automation programs.
Question 24
Which Python collection type stores data using unique unordered elements?
- List
- Tuple
- Set
- Dictionary
Correct Answer: 3
Explanation
A Python set is an unordered collection of unique elements. Sets are useful when an automation script needs to eliminate duplicate values or quickly determine whether a particular item exists in a collection. For example, a script processing device interfaces could use a set to create a unique collection of VLAN identifiers. Lists maintain an ordered collection and can contain duplicates, tuples are ordered and generally immutable, and dictionaries store key-value pairs. Understanding Python collection types is important because automation scripts frequently manipulate inventories, API responses, IP addresses, interfaces, and configuration parameters.
Question 25
Which Python keyword is used to make a decision based on whether a condition is true or false?
- if
- for
- import
- class
Correct Answer: 1
Explanation
The Python if statement is used to execute code conditionally. Automation programs frequently use conditional logic to determine what action should be taken based on device state, API responses, configuration values, or error conditions. For example, a script could check whether an interface is operational and then perform a different action depending on the result. A for statement is used for iteration, import loads modules, and class defines a class. Therefore, the if statement is the appropriate Python construct for making decisions based on conditions.
Question 26
Which Cisco platform provides APIs that can be used to automate network inventory, configuration, and assurance tasks?
- Cisco DNA Center
- Cisco ROMMON
- Cisco IOS boot loader
- Cisco Console Server
Correct Answer: 1
Explanation
Cisco DNA Center provides APIs that allow automation applications to interact programmatically with network-management functions. These capabilities can include retrieving inventory information, managing configurations, accessing assurance information, and performing supported automation workflows. This enables organizations to integrate network operations with scripts and external applications rather than relying exclusively on manual administration. ROMMON and the IOS boot loader are device startup environments, while a console server provides management connectivity to devices. Therefore, Cisco DNA Center is the platform among these choices designed to provide centralized APIs for enterprise network automation and management.
Question 27
Which protocol provides a RESTful interface to YANG-modeled network configuration and operational data?
- FTP
- RESTCONF
- Telnet
- TFTP
Correct Answer: 2
Explanation
RESTCONF provides a RESTful HTTP-based interface for accessing and manipulating YANG-modeled network configuration and operational data. It combines the concepts of REST APIs with standardized network data models, allowing automation applications to interact with network devices using structured resources. RESTCONF commonly uses HTTP methods such as GET, POST, PUT, PATCH, and DELETE, depending on the supported operations. FTP and TFTP are file-transfer protocols, while Telnet provides remote terminal access. Therefore, RESTCONF is the protocol designed specifically to provide a REST-style interface to YANG-modeled network data.
Question 28
Which protocol commonly uses XML-based RPC messages for programmatic network configuration?
- NETCONF
- SMTP
- SNMP Trap
- DNS
Correct Answer: 1
Explanation
NETCONF is a network-management protocol that uses XML-based Remote Procedure Calls (RPCs) to perform structured operations on network-device configuration and operational data. It can support operations such as retrieving configuration, editing configuration, validating changes, and committing changes, depending on the implementation. NETCONF commonly works with YANG data models to provide structured and standardized network management. SMTP is an email protocol, SNMP traps provide event notifications, and DNS provides name resolution. Therefore, NETCONF is the correct protocol when XML-based RPC mechanisms are used for programmatic network configuration.
Question 29
Which YANG concept defines a reusable grouping of data nodes that can be incorporated into other parts of a model?
- Container
- Leaf
- Grouping
- List
Correct Answer: 3
Explanation
A YANG grouping defines a reusable collection of schema nodes that can be incorporated into another part of a YANG model. This promotes modularity and avoids repeatedly defining the same structure. A model can use the grouping through the appropriate YANG mechanisms, allowing common structures to be reused across different sections. A container organizes related child nodes, a leaf represents a single data value, and a list represents repeated structured entries. Understanding YANG structures is important when working with NETCONF and RESTCONF because these protocols rely on models that describe network configuration and operational data.
Question 30
In YANG, which statement is used to represent a single configuration or operational value such as an IP address or hostname?
- Leaf
- Container
- List
- Module
Correct Answer: 1
Explanation
A YANG leaf represents a single data value. Examples include an IP address, hostname, interface description, Boolean setting, or numerical parameter. The leaf has an associated data type that determines what kind of value it can contain. A container organizes related child nodes, a list represents multiple instances of a structured data entry, and a module is a larger YANG definition containing data models and related constructs. In network automation, understanding leaf nodes is useful when applications need to retrieve or modify specific values through NETCONF or RESTCONF.
Question 31
Which YANG structure is appropriate for representing multiple instances of similar objects, such as a collection of network interfaces?
- Leaf
- List
- Action
- Notification
Correct Answer: 2
Explanation
A YANG list represents multiple instances of a structured set of data nodes. It is commonly used for resources such as interfaces, routing entries, users, or VLAN definitions where multiple entries share the same schema. A list can have keys that uniquely identify each instance. A leaf represents one value, while actions and notifications serve different purposes within YANG models. In network automation, lists allow applications using NETCONF or RESTCONF to work with repeated configuration or operational objects in a structured way. Therefore, a YANG list is appropriate for representing multiple similar network objects.
Question 32
Which Python data type is immutable and commonly written using parentheses?
- List
- Set
- Dictionary
- Tuple
Correct Answer: 4
Explanation
A Python tuple is an ordered collection that is generally immutable after it is created. Tuples are commonly represented using parentheses, such as (“router1”, “router2”). Because their contents cannot normally be changed after creation, tuples can be useful when a program needs a fixed collection of values. Lists are mutable ordered collections, sets contain unique unordered elements, and dictionaries store key-value pairs. Network automation scripts may use tuples to represent fixed combinations of values or structured information that should not be modified during processing.
Question 33
Which Python construct is used to define a reusable block of code that can be called multiple times?
- Function
- Comment
- Variable
- Operator
Correct Answer: 1
Explanation
A Python function is a reusable block of code defined with the def keyword. Functions allow automation developers to organize repeated operations into manageable units. For example, a function could connect to a device, send an API request, validate a response, or process configuration data. Functions can accept parameters and return values, making them useful for building modular automation applications. Variables store values, comments provide documentation, and operators perform calculations or comparisons. Therefore, functions are an important programming construct for creating maintainable and reusable network automation scripts.
Question 34
Which Python statement is used to handle exceptions that may occur while a program is running?
- switch
- try
- repeat
- catch
Correct Answer: 2
Explanation
Python uses the try statement together with constructs such as except to handle exceptions that may occur during program execution. Network automation scripts often encounter runtime problems such as unreachable devices, authentication failures, invalid API responses, or connection timeouts. Proper exception handling allows a program to respond to these conditions instead of terminating unexpectedly. Python does not use catch as its exception-handling keyword in the same way languages such as Java do. Therefore, try is the appropriate Python construct for beginning an exception-handling block.
Question 35
Which HTTP status code generally indicates that authentication is required or the supplied authentication credentials are invalid?
- 200
- 201
- 401
- 204
Correct Answer: 3
Explanation
HTTP status code 401 indicates that authentication is required or that the supplied authentication credentials were not accepted. In API automation, a 401 response can occur when a token is missing, expired, malformed, or otherwise invalid. This differs from HTTP 403, which generally indicates that the server understood the request but refuses access because the client lacks sufficient authorization. Status 200 indicates successful processing, 201 generally indicates successful resource creation, and 204 indicates successful processing with no response body. Therefore, 401 should prompt the automation developer to investigate authentication credentials or tokens.
Question 36
Which HTTP status code commonly indicates that the client is authenticated but does not have permission to perform the requested operation?
- 403
- 201
- 301
- 204
Correct Answer: 1
Explanation
HTTP status code 403, “Forbidden,” commonly indicates that the server understood the request but refuses to authorize the requested operation. In network automation, this can happen when a valid user or API token lacks the required permissions to access a resource or perform a configuration operation. A 401 response is generally associated with missing or invalid authentication, while 201 indicates resource creation and 204 indicates successful processing without a response body. Understanding the difference between authentication and authorization errors is important when troubleshooting API access. Therefore, 403 commonly represents an authorization or permission problem.
Question 37
Which authentication mechanism commonly allows an API client to send a token in an HTTP Authorization header?
- Token-based authentication
- ARP
- STP
- DHCP
Correct Answer: 1
Explanation
Token-based authentication allows an API client to present a token that identifies and authorizes the client when making requests. A common implementation places the token in the HTTP Authorization header, although exact syntax depends on the API. Tokens can be used instead of repeatedly sending a username and password with every request and may have expiration or scope restrictions. ARP resolves IP addresses to MAC addresses, STP prevents Layer 2 loops, and DHCP provides address-assignment services. Therefore, token-based authentication is the appropriate mechanism for securely identifying an API client through an authorization token.
Question 38
Which network automation approach generally uses templates to generate device configurations from variables and structured data?
- Template-based automation
- Manual console configuration
- Physical cabling
- Packet fragmentation
Correct Answer: 1
Explanation
Template-based automation uses predefined configuration templates together with variables and structured data to generate device configurations consistently. For example, an organization can create one template for interface configuration and supply different interface addresses, descriptions, VLANs, or device-specific values for each router. This reduces repetitive manual work and helps maintain configuration consistency across many devices. Template systems are commonly integrated with automation frameworks and tools. Manual console configuration requires individual administrative actions, while physical cabling and packet fragmentation are unrelated to configuration generation. Therefore, template-based automation is the appropriate approach described.
Question 39
Which automation principle helps reduce configuration differences between devices by applying the same defined process repeatedly?
- Configuration drift
- Consistency
- Randomization
- Manual variation
Correct Answer: 2
Explanation
Consistency is a major benefit of network automation. When the same defined process, template, or workflow is applied repeatedly, devices are more likely to receive standardized configurations. This can reduce human errors and configuration differences that arise when administrators manually configure many devices. Configuration drift refers to unwanted differences that develop between intended and actual configurations over time. Randomization and manual variation work against standardized deployment. Therefore, applying automation consistently can help organizations reduce configuration drift and improve operational reliability across large network environments.
Question 40
Which technology allows an automation application to receive structured information about network devices through a standardized data model?
- YANG
- Telnet
- Ethernet
- ICMP
Correct Answer: 1
Explanation
YANG provides a standardized data model that describes the structure and meaning of network configuration and operational information. Protocols such as NETCONF and RESTCONF can use YANG models to expose structured network data to automation applications. This allows software to understand resources such as interfaces, routing information, system settings, and other modeled objects in a consistent way. Telnet provides remote terminal access, Ethernet provides Layer 2 connectivity, and ICMP supports network control and diagnostic functions. Therefore, YANG is the technology that defines the structured model used by modern network-management automation protocols.