ExamGecko
Home Home / Cisco / 200-901

Cisco 200-901 Practice Test - Questions Answers, Page 46

Question list
Search
Search

Refer to the exhibit.

What are two results of running the RESTCONF query? (Choose two.)

A.

Interfaces are created as containers.

A.

Interfaces are created as containers.

Answers
B.

The module letf-interfaces:interfaces is created.

B.

The module letf-interfaces:interfaces is created.

Answers
C.

GigabitEthemet2 becomes shut down.

C.

GigabitEthemet2 becomes shut down.

Answers
D.

GigabitEthernetl becomes shut down.

D.

GigabitEthernetl becomes shut down.

Answers
E.

Descriptions for two interfaces are applied.

E.

Descriptions for two interfaces are applied.

Answers
Suggested answer: C, E

Explanation:

The provided RESTCONF query is configuring network interfaces using the YANG data model. Based on the JSON data:

GigabitEthernet1: This interface has an enabled status set to true and an IP address configured.

GigabitEthernet2: This interface has an enabled status set to false, which means it is being shut down.

GigabitEthernet3: This interface is also set with an enabled status of false.

The descriptions for these interfaces are also included in the configuration, so the descriptions for two interfaces (GigabitEthernet1 and GigabitEthernet2) are applied.

RESTCONF and YANG Model Basics

Refer to the exhibit.

What occurs when the script runs?

A.

The contents of both files are displayed.

A.

The contents of both files are displayed.

Answers
B.

The total length of the files is displayed.

B.

The total length of the files is displayed.

Answers
C.

The files are combined.

C.

The files are combined.

Answers
D.

File differences are compared.

D.

File differences are compared.

Answers
Suggested answer: D

Explanation:

The diff command is used to compare the contents of two files and display the differences. The -u option stands for 'unified' and shows the differences in a unified format, which includes the lines that differ between the two files along with a few lines of context.

When running the command diff -u file1.txt file2.txt, it compares the two files and shows the differences between them.

GNU Diffutils: Unified Format

DRAG DROP

Refer to the exhibit.

An engineer needs to retrieve all the organizations in a Cisco UCS Manager deployment. Drag and drop the code snippets from the bottom onto the blanks in.. Python script to print the information to standard output. Some options may be used more than once. Not all options are used.


Question 453
Correct answer: Question 453

Explanation:

Cisco DevNet Associate Certification Guide, Sections on UCS Manager API and Python SDK

UCS Python SDK Documentation

Which two HTTP code series relate to errors? (Choose two.

A.

400

A.

400

Answers
B.

200

B.

200

Answers
C.

500

C.

500

Answers
D.

300

D.

300

Answers
E.

100

E.

100

Answers
Suggested answer: A, C

Explanation:

HTTP status codes are divided into five classes:

1xx (Informational): Request received, continuing process

2xx (Success): The action was successfully received, understood, and accepted

3xx (Redirection): Further action must be taken to complete the request

4xx (Client Error): The request contains bad syntax or cannot be fulfilled

5xx (Server Error): The server failed to fulfill an apparently valid request

Thus, the series that relate to errors are:

400 series (Client Error)

500 series (Server Error)

RFC 7231, Section 6: HTTP/1.1 Semantics and Content

How do XML and JSON compare regarding functionality?

A.

XML provides more human readability than JSON.

A.

XML provides more human readability than JSON.

Answers
B.

JSON natively supports arrays and XML does not natively support arrays.

B.

JSON natively supports arrays and XML does not natively support arrays.

Answers
C.

XML provides more support for mapping data structures into host languages than JSON.

C.

XML provides more support for mapping data structures into host languages than JSON.

Answers
D.

JSON provides less support for data types than XML.

D.

JSON provides less support for data types than XML.

Answers
Suggested answer: B

Explanation:

JSON (JavaScript Object Notation) and XML (eXtensible Markup Language) are both used for data interchange but have different characteristics:

Human Readability: JSON is often considered more human-readable because it is more concise and closely resembles the structure of programming languages like JavaScript.

Support for Arrays: JSON natively supports arrays, making it straightforward to represent lists of values. XML can represent arrays, but it does not do so natively and requires additional markup to represent arrays.

Data Mapping: XML provides extensive support for mapping data structures, including attributes and mixed content, making it suitable for complex data structures.

Data Types: JSON is lighter and provides sufficient data types for many applications (strings, numbers, objects, arrays, booleans, and null), whereas XML can be more verbose and supports a broader range of data types.

JSON vs XML - W3Schools

What is a benefit of using Python classes?

A.

They improve code organization by keeping data members and methods together.

A.

They improve code organization by keeping data members and methods together.

Answers
B.

They remove the concept of inheritance to improve code readability and maintainability.

B.

They remove the concept of inheritance to improve code readability and maintainability.

Answers
C.

They allow a Python script to import code from various independent modules.

C.

They allow a Python script to import code from various independent modules.

Answers
D.

They simplify integration by testing the classes independently from other components.

D.

They simplify integration by testing the classes independently from other components.

Answers
Suggested answer: A

Explanation:

Python classes are a fundamental aspect of object-oriented programming (OOP) in Python. They offer several benefits: Improved Code Organization: Classes bundle data (attributes) and functionality (methods) together. This encapsulation helps keep related parts of the code together, making it easier to understand and manage. Reusability and Inheritance: Classes support inheritance, allowing the creation of new classes based on existing ones. This promotes code reuse and can lead to a more logical structure. Modularity: By using classes, you can create modules that encapsulate specific functionalities, making the code modular and easier to maintain. Encapsulation and Abstraction: Classes allow for encapsulating data and functionality, providing a clear structure and abstraction layers, which enhance code readability and maintainability.

Python Classes and Objects - W3Schools

Python Documentation on Classes

What is a capability of model-driven programmability for infrastructure automation?

A.

compatibility with any networking device

A.

compatibility with any networking device

Answers
B.

automatic version control

B.

automatic version control

Answers
C.

generic APIs that are compatible with multiple platforms

C.

generic APIs that are compatible with multiple platforms

Answers
D.

a single data model acr oss the network

D.

a single data model acr oss the network

Answers
Suggested answer: D

Explanation:

Model-driven programmability refers to the use of a consistent data model to manage and automate network devices. Key capabilities include:

Single Data Model Across the Network: Ensures uniformity and consistency in how data is represented and managed across different network devices and platforms.

Automation and Scalability: Facilitates automated network configurations and operations, enabling scalability.

Interoperability: Using standardized models (like YANG) allows for interoperability between different network devices and management tools.

Abstracted API Interfaces: Provides abstracted and consistent APIs that can be used across multiple devices, reducing the complexity of network automation scripts.

Cisco Model-Driven Programmability

What is a feature of a MAC address?

A.

It consists of 6 hexadecimal numbers.

A.

It consists of 6 hexadecimal numbers.

Answers
B.

It consists of 24 bits.

B.

It consists of 24 bits.

Answers
C.

It consists of 38 bits.

C.

It consists of 38 bits.

Answers
D.

It consists of 12 hexadecimal numbers.

D.

It consists of 12 hexadecimal numbers.

Answers
Suggested answer: D

Explanation:

A MAC (Media Access Control) address is a unique identifier assigned to network interfaces for communications at the data link layer of a network segment. Key features of a MAC address include:

Length and Format: A MAC address is 48 bits in length, typically represented as 12 hexadecimal digits (e.g., 00:1A:2B:3C:4D:5E).

Hexadecimal Representation: The 12 hexadecimal digits are often grouped into pairs separated by colons or hyphens for readability (e.g., 00:1A:2B:3C:4D:5E or 00-1A-2B-3C-4D-5E).

IEEE 802 MAC Address Standard

Cisco MAC Address Basics

DRAG DROP

Drag and drop the common API styles from the left onto the requirement on the right.


Question 459
Correct answer: Question 459

Explanation:

Cisco DevNet Associate Certification Guide, Sections on API styles and their characteristics

Official Cisco documentation on RESTful and RPC APIs

General programming resources on synchronous vs. asynchronous API calls

Therefore, the correct mapping is:

synchronous 'Code execution must wait for an API call to return before continuing.'

asynchronous 'Code execution does not need to wait for an API call to return before continuing.'

REST 'Data is called indirectly using generic HTTP methods such as GET, POST, PUT, and DELETE.'

RPC 'Calls to request a service from a remote server must execute the same way as a request to the local system.'

Refer to the exhibit.

A developer needs to create a webhook to send all Cisco Webex messages to a third-party tool by using the Cisco Webex API. The developer must Auhenticate with the API before any API calls can be made. To automate the procedure, a Python script is used. Which code snippet must be placed onto the blank in the code?

A)

B)

C)

D)

A.

Option A

A.

Option A

Answers
B.

Option B

B.

Option B

Answers
C.

Option C

C.

Option C

Answers
D.

Option D

D.

Option D

Answers
Suggested answer: C

Explanation:

Importing Libraries: The script imports the requests and json libraries necessary for making HTTP requests and handling JSON data.

URLs Definition: The url1 variable holds the Webex API endpoint for creating webhooks, and url2 is the target URL where Webex will send the messages.

Token Handling: The token variable contains the OAuth2 token required for authentication with the Webex API.

Setting Headers: The headers dictionary includes the Content-Type set to application/json and the correct Authorization header that uses the Bearer token.

Payload Preparation: The payload dictionary contains the necessary information to create the webhook, including its name, target URL, resource type, and event.

Making the Request: The requests.request method sends a POST request to the Webex API endpoint with the specified headers and payload.

Printing the Response: The response from the Webex API is printed out, encoded in 'utf-8'.

Cisco Webex API Authentication

Cisco Webex API Guide

By correctly setting the Authorization header to include the Bearer token, the developer ensures that the script can authenticate and interact with the Webex API as required.

=========================

Total 471 questions
Go to page: of 48