300-435 · Question #29
The automation engineer must replace device configuration using RESTCONF. How is this configured using the Python Library Requests?
The correct answer is C. put(). To completely replace device configuration using RESTCONF, the put() method from the Python Requests library is used, corresponding to the HTTP PUT operation.
Question
Options
- Adelete()
- Bpost()
- Cput()
- Dpatch()
How the community answered
(30 responses)- A3% (1)
- B3% (1)
- C87% (26)
- D7% (2)
Why each option
To completely replace device configuration using RESTCONF, the `put()` method from the Python Requests library is used, corresponding to the HTTP PUT operation.
The `delete()` method is used to remove an existing resource, not to replace it with new configuration.
The `post()` method is typically used to create a new resource or perform an action, rather than replacing an entire configuration.
The HTTP PUT method is used to entirely replace a resource at a specified URI; therefore, `put()` in the Requests library is the appropriate choice for replacing existing device configuration via RESTCONF.
The `patch()` method is used for partial updates to an existing resource, not for a complete replacement of the configuration.
Concept tested: RESTCONF HTTP methods for configuration
Source: https://www.rfc-editor.org/rfc/rfc8040
Topics
Community Discussion
No community discussion yet for this question.