nerdexam
Cisco

200-901 · Question #274

Refer to the exhibit. A network engineer must change the configuration on devices daily. The Python script must collect CLI arguments from the user, organize data according to the Cisco…

The correct answer is A. updating an existing route on the device. The script uses a PATCH request against the Cisco IOS XE RESTCONF API, which updates specific fields of an existing resource rather than creating or replacing it.

Infrastructure and Automation

Question

Refer to the exhibit. A network engineer must change the configuration on devices daily. The Python script must collect CLI arguments from the user, organize data according to the Cisco- IOS-XE-native YANG model, and utilize Cisco REST APIs to make the configuration. Which workflow is being automated by the Python script?

Exhibit

200-901 question #274 exhibit

Options

  • Aupdating an existing route on the device
  • Badding a new route to a device
  • Cincluding a route on the device and overwriting the current routes
  • Ddeleting the route that is passed through the command-line variables

How the community answered

(33 responses)
  • A
    79% (26)
  • B
    3% (1)
  • C
    12% (4)
  • D
    6% (2)

Why each option

The script uses a PATCH request against the Cisco IOS XE RESTCONF API, which updates specific fields of an existing resource rather than creating or replacing it.

Aupdating an existing route on the deviceCorrect

The PATCH HTTP method performs a partial update on an existing resource, modifying only the specified fields while leaving others intact. Because the script targets an existing route entry under the Cisco-IOS-XE-native YANG model and issues a PATCH, it updates that route's attributes rather than adding a new entry or replacing the entire routing table.

Badding a new route to a device

Adding a new route would require a POST request to create a new resource instance, not a PATCH to an existing one.

Cincluding a route on the device and overwriting the current routes

Overwriting all current routes would require a PUT request, which replaces the entire resource representation at the target URI.

Ddeleting the route that is passed through the command-line variables

Deleting a route requires a DELETE HTTP method; a PATCH request cannot remove a resource.

Concept tested: RESTCONF PATCH method for partial resource updates

Source: https://developer.cisco.com/docs/ios-xe/restconf/

Topics

#Network Automation#REST APIs#YANG Models#Python Scripting

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice