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.
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
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)- A79% (26)
- B3% (1)
- C12% (4)
- D6% (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.
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.
Adding a new route would require a POST request to create a new resource instance, not a PATCH to an existing one.
Overwriting all current routes would require a PUT request, which replaces the entire resource representation at the target URI.
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
Community Discussion
No community discussion yet for this question.
