Cisco
300-535 · Question #63
Refer to the exhibit. A Python script is created to add a new device on Cisco NSO using RESTCONF API. The device is added successfully, but a 405 Method Not Allowed RESTCONF error code has received as
The correct answer is B. response = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys",. See the full explanation below for the reasoning.
Question
Refer to the exhibit. A Python script is created to add a new device on Cisco NSO using RESTCONF API. The device is added successfully, but a 405 Method Not Allowed RESTCONF error code has received as the line to fetch SSH keys runs. Which code is missing to complete the script?
Exhibit
Options
- Aresponse = requests.put(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys",
- Bresponse = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys",
- Cresponse = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/request-host-
- Dresponse = requests.put(baseUriOperation + "/devices/device=ios-device/ssh/request-host-keys",
How the community answered
(47 responses)- A15% (7)
- B74% (35)
- C4% (2)
- D6% (3)
Community Discussion
No community discussion yet for this question.
